基础组件库
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.
 
 
 
 
 

35 lines
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. }