基础组件库
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 

63 rindas
2.2 KiB

  1. import 'dart:convert';
  2. import 'package:cached_network_image/cached_network_image.dart';
  3. import 'package:flutter/cupertino.dart';
  4. import 'package:flutter/material.dart';
  5. import 'package:zhiying_base_widget/pages/bil_detail_page/bil_detail_page.dart';
  6. import 'package:zhiying_base_widget/pages/wallet_page/wallet_detail_page.dart';
  7. import 'package:zhiying_base_widget/widgets/wallet/wallet_bil/model/wallet_bli_model.dart';
  8. import 'package:zhiying_base_widget/widgets/wallet/wallet_income/wallet_income_sk.dart';
  9. import 'package:zhiying_comm/zhiying_comm.dart';
  10. ///查看明细部件
  11. class WalletBil extends StatelessWidget {
  12. Map<String, dynamic> data;
  13. WalletBil(this.data, {Key key}) : super(key: key);
  14. @override
  15. Widget build(BuildContext context) {
  16. WalletBilModel model;
  17. if (data != null) {
  18. model = WalletBilModel.fromJson(json.decode(data['data']));
  19. }
  20. return data == null
  21. ? WalletIncomeSkeleton()
  22. : GestureDetector(
  23. onTap: () {
  24. RouterUtil.route(
  25. SkipModel.fromJson(json.decode(data['data'])), data, context);
  26. },
  27. child: Container(
  28. decoration: BoxDecoration(
  29. color: Colors.white,
  30. borderRadius: BorderRadius.circular(8)),
  31. margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 10),
  32. child: ListTile(
  33. title: Row(
  34. mainAxisSize: MainAxisSize.min,
  35. children: <Widget>[
  36. CachedNetworkImage(
  37. imageUrl: model.bilIcon,
  38. width: 18,
  39. height: 18,
  40. fit: BoxFit.fill,
  41. ),
  42. SizedBox(
  43. width: 7.5,
  44. ),
  45. Text(
  46. model.bilText,
  47. style: TextStyle(fontSize: 12),
  48. ),
  49. ],
  50. ),
  51. trailing: Text(
  52. model.skipText,
  53. style: TextStyle(color: Colors.grey),
  54. ),
  55. )),
  56. );
  57. }
  58. }