基础组件库
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

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