基础组件库
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_appbar.dart 1.0 KiB

123456789101112131415161718192021222324252627282930313233343536
  1. import 'dart:convert';
  2. import 'package:flutter/material.dart';
  3. import 'package:zhiying_comm/zhiying_comm.dart';
  4. import 'model/wallet_appbar_model.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. elevation: 0,
  15. leading: Navigator.canPop(context)
  16. ? IconButton(
  17. icon: Icon(Icons.arrow_back_ios),
  18. onPressed: () {
  19. Navigator.of(context).pop();
  20. })
  21. : Container(),
  22. backgroundColor: HexColor.fromHex(model.appBarBgColor??""),
  23. centerTitle: true,
  24. title: Text(
  25. model.appBarName??"",
  26. style: TextStyle(color: HexColor.fromHex(model.appBarNameColor??"")),
  27. ),
  28. ),
  29. );
  30. }
  31. }