|
1234567891011121314151617181920212223242526272829303132333435 |
- import 'dart:convert';
-
- import 'package:flutter/material.dart';
- import 'package:zhiying_base_widget/widgets/wallet/wallet_appbar/model/WalletAppbarModel.dart';
- import 'package:zhiying_comm/zhiying_comm.dart';
-
- class WalletAppbar extends StatelessWidget {
- final Map<String, dynamic> data;
-
- const WalletAppbar({Key key, this.data}) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- var model = WalletAppbarModel.fromJson(json.decode(data['data']));
- return Container(
- height: MediaQuery.of(context).padding.top + 56,
- child: AppBar(
- elevation: 0,
- leading: Navigator.canPop(context)
- ? IconButton(
- icon: Icon(Icons.arrow_back_ios),
- onPressed: () {
- Navigator.of(context).pop();
- })
- : Container(),
- backgroundColor: HexColor.fromHex(model.appBarBgColor??""),
- centerTitle: true,
- title: Text(
- model.appBarName??"",
- style: TextStyle(color: HexColor.fromHex(model.appBarNameColor??"")),
- ),
- ),
- );
- }
- }
|