基础组件库
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

35 行
1.0 KiB

  1. import 'dart:convert';
  2. import 'package:flutter/material.dart';
  3. import 'package:zhiying_base_widget/widgets/wallet/wallet_appbar/model/WalletAppbarModel.dart';
  4. import 'package:zhiying_comm/zhiying_comm.dart';
  5. class WalletAppbar extends StatelessWidget {
  6. final Map<String, dynamic> data;
  7. const WalletAppbar({Key key, this.data}) : super(key: key);
  8. @override
  9. Widget build(BuildContext context) {
  10. var model = WalletAppbarModel.fromJson(json.decode(data['data']));
  11. return Container(
  12. height: MediaQuery.of(context).padding.top + 56,
  13. child: AppBar(
  14. leading: Navigator.canPop(context)
  15. ? IconButton(
  16. icon: Icon(Icons.arrow_back_ios),
  17. onPressed: () {
  18. Navigator.of(context).pop();
  19. })
  20. : Container(),
  21. backgroundColor: HexColor.fromHex(model.appBarBgColor),
  22. centerTitle: true,
  23. title: Text(
  24. model.appBarName,
  25. style: TextStyle(color: HexColor.fromHex(model.appBarNameColor)),
  26. ),
  27. ),
  28. );
  29. }
  30. }