基础组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wallet_bil.dart 1.6 KiB

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