基础组件库
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

47 rader
1.5 KiB

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