update bottom navigation bar style

hmxc
小赖 4 years ago
parent 2fb3494745
commit 7e833f80b7

@ -120,4 +120,11 @@ class SystemStyle {
statusBarIconBrightness: Brightness.light, statusBarIconBrightness: Brightness.light,
systemNavigationBarColor: Color(0xFFFFD000), systemNavigationBarColor: Color(0xFFFFD000),
); );
static genStyle({@required Color bottom}) {
return SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.light,
systemNavigationBarColor: bottom,
);
}
} }

@ -1,3 +1,4 @@
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -203,6 +204,7 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
systemStyle: SystemStyle.yellowBottomBar,
title: '活动详情', title: '活动详情',
bodyColor: Colors.white, bodyColor: Colors.white,
body: EasyRefresh( body: EasyRefresh(

@ -1,3 +1,4 @@
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -64,6 +65,9 @@ class _GoodsDetoPageState extends State<GoodsDetoPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
UserProvider userProvider = Provider.of<UserProvider>(context); UserProvider userProvider = Provider.of<UserProvider>(context);
return BeeScaffold( return BeeScaffold(
systemStyle: _isEdit
? SystemStyle.genStyle(bottom: Color(0xFFFFD000).withOpacity(0.2))
: SystemStyle.yellowBottomBar,
title: '物品出户', title: '物品出户',
actions: [ actions: [
IconButton( IconButton(

@ -1,3 +1,4 @@
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -133,6 +134,7 @@ class _IndustryCommitteePageState extends State<IndustryCommitteePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
title: '业委会', title: '业委会',
systemStyle: SystemStyle.genStyle(bottom: Color(0xFF2A2A2A)),
body: BeeListView( body: BeeListView(
path: API.manager.commiteeStaff, path: API.manager.commiteeStaff,
convert: (model) { convert: (model) {

@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -175,6 +176,7 @@ class _AddFixedSubmitPageState extends State<AddFixedSubmitPage> {
AppProvider appProvider = Provider.of<AppProvider>(context); AppProvider appProvider = Provider.of<AppProvider>(context);
return WillPopScope( return WillPopScope(
child: BeeScaffold( child: BeeScaffold(
systemStyle: SystemStyle.yellowBottomBar,
title: '报事报修', title: '报事报修',
body: ListView( body: ListView(
children: [ children: [

@ -1,3 +1,4 @@
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
@ -161,6 +162,7 @@ class _AdviceDetailPageState extends State<AdviceDetailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
title: '查看详情', title: '查看详情',
systemStyle: SystemStyle.yellowBottomBar,
actions: [ actions: [
TextButton( TextButton(
onPressed: () => onPressed: () =>

@ -1,3 +1,4 @@
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -90,6 +91,7 @@ class _AdvicePageState extends State<AdvicePage> with TickerProviderStateMixin {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
title: title, title: title,
systemStyle: SystemStyle.yellowBottomBar,
actions: [ actions: [
TextButton( TextButton(
onPressed: () => setState(() => _selectedMode = !_selectedMode), onPressed: () => setState(() => _selectedMode = !_selectedMode),

@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -131,6 +132,7 @@ class _NewAdvicePageState extends State<NewAdvicePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final appProvider = Provider.of<AppProvider>(context); final appProvider = Provider.of<AppProvider>(context);
return BeeScaffold.white( return BeeScaffold.white(
systemStyle: SystemStyle.yellowBottomBar,
title: title, title: title,
body: ListView( body: ListView(
padding: EdgeInsets.all(32.w), padding: EdgeInsets.all(32.w),

@ -1,3 +1,4 @@
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -195,6 +196,7 @@ class _QuestionnaireDetailPageState extends State<QuestionnaireDetailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
title: '问卷调查', title: '问卷调查',
systemStyle: SystemStyle.yellowBottomBar,
body: EasyRefresh( body: EasyRefresh(
firstRefresh: true, firstRefresh: true,
header: MaterialHeader(), header: MaterialHeader(),

@ -1,6 +1,7 @@
import 'dart:typed_data'; import 'dart:typed_data';
import 'dart:ui' as ui; import 'dart:ui' as ui;
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -30,123 +31,126 @@ class _VisitorPassportPageState extends State<VisitorPassportPage> {
GlobalKey _repaintKey = GlobalKey(); GlobalKey _repaintKey = GlobalKey();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return AnnotatedRegion<SystemUiOverlayStyle>(
backgroundColor: Color(0xFF333333), child: Scaffold(
appBar: AppBar(
brightness: Brightness.dark,
leading: BeeBackButton(color: Colors.white),
backgroundColor: Color(0xFF333333), backgroundColor: Color(0xFF333333),
elevation: 0, appBar: AppBar(
centerTitle: true, brightness: Brightness.dark,
title: '访客通行证'.text.white.make(), leading: BeeBackButton(color: Colors.white),
), backgroundColor: Color(0xFF333333),
body: RepaintBoundary( elevation: 0,
key: _repaintKey, centerTitle: true,
child: ListView( title: '访客通行证'.text.white.make(),
children: [ ),
64.hb, body: RepaintBoundary(
'宁波华茂悦峰'.text.size(40.sp).white.bold.make().centered(), key: _repaintKey,
'1幢-1单元-702室'.text.size(30.sp).white.make().centered(), child: ListView(
32.hb, children: [
Container( 64.hb,
width: 600.w, '宁波华茂悦峰'.text.size(40.sp).white.bold.make().centered(),
decoration: BoxDecoration( '1幢-1单元-702室'.text.size(30.sp).white.make().centered(),
color: Colors.white, 32.hb,
borderRadius: BorderRadius.circular(16.w), Container(
), width: 600.w,
child: Column( decoration: BoxDecoration(
crossAxisAlignment: CrossAxisAlignment.start, color: Colors.white,
children: [ borderRadius: BorderRadius.circular(16.w),
32.hb, ),
[ child: Column(
32.wb, crossAxisAlignment: CrossAxisAlignment.start,
[ children: [
Image.asset( 32.hb,
R.ASSETS_ICONS_USER_ICON_WDFK_PNG,
color: ktextSubColor,
height: 40.w,
width: 40.w,
),
16.wb,
widget.model.name.text
.size(36.sp)
.bold
.overflow(TextOverflow.ellipsis)
.make()
.expand(),
].row().expand(),
[ [
Image.asset( 32.wb,
R.ASSETS_ICONS_USER_ICON_WDC_PNG, [
color: ktextSubColor, Image.asset(
height: 40.w, R.ASSETS_ICONS_USER_ICON_WDFK_PNG,
width: 40.w, color: ktextSubColor,
height: 40.w,
width: 40.w,
),
16.wb,
widget.model.name.text
.size(36.sp)
.bold
.overflow(TextOverflow.ellipsis)
.make()
.expand(),
].row().expand(),
[
Image.asset(
R.ASSETS_ICONS_USER_ICON_WDC_PNG,
color: ktextSubColor,
height: 40.w,
width: 40.w,
),
16.wb,
(widget.model.drive ? '无车辆信息' : widget.model.carNum)
.text
.size(36.sp)
.bold
.overflow(TextOverflow.ellipsis)
.make()
.expand(),
].row().expand(),
32.wb,
].row(),
16.hb,
'有效时间:${DateUtil.formatDate(
widget.model.date,
format: 'yyyy-MM-dd',
)}'
.text
.color(Color(0xFF999999))
.size(24.sp)
.make()
.pSymmetric(h: 32.w),
20.hb,
Divider(height: 1.w),
32.hb,
SizedBox(
height: 260.w,
width: 260.w,
child: QrImage(
data: widget.model.accessCode.toString(),
), ),
16.wb, ).centered(),
(widget.model.drive ? '无车辆信息' : widget.model.carNum) 32.hb,
.text Divider(height: 1.w),
.size(36.sp) '进入小区时,请出示此通行证给门岗'
.bold .text
.overflow(TextOverflow.ellipsis) .size(24.sp)
.make() .color(Color(0xFF999999))
.expand(), .make()
].row().expand(), .centered()
32.wb, .box
].row(), .height(64.w)
16.hb, .make(),
'有效时间:${DateUtil.formatDate( ],
widget.model.date, ),
format: 'yyyy-MM-dd', ).centered(),
)}' ],
.text ).box.color(Color(0xFF333333)).make(),
.color(Color(0xFF999999)) ),
.size(24.sp) bottomNavigationBar: BottomButton(
.make() onPressed: () async {
.pSymmetric(h: 32.w), VoidCallback cancel = BotToast.showLoading();
20.hb, RenderRepaintBoundary boundary =
Divider(height: 1.w), _repaintKey.currentContext.findRenderObject();
32.hb, ui.Image image = await boundary.toImage(pixelRatio: 3);
SizedBox( ByteData byteData =
height: 260.w, await image.toByteData(format: ui.ImageByteFormat.png);
width: 260.w, Uint8List png = byteData.buffer.asUint8List();
child: QrImage( cancel();
data: widget.model.accessCode.toString(), shareToWeChat(WeChatShareImageModel(
), WeChatImage.binary(png, suffix: '.png'),
).centered(), scene: WeChatScene.SESSION,
32.hb, ));
Divider(height: 1.w), },
'进入小区时,请出示此通行证给门岗' child: '发送给访客'.text.bold.make(),
.text ),
.size(24.sp)
.color(Color(0xFF999999))
.make()
.centered()
.box
.height(64.w)
.make(),
],
),
).centered(),
],
).box.color(Color(0xFF333333)).make(),
),
bottomNavigationBar: BottomButton(
onPressed: () async {
VoidCallback cancel = BotToast.showLoading();
RenderRepaintBoundary boundary =
_repaintKey.currentContext.findRenderObject();
ui.Image image = await boundary.toImage(pixelRatio: 3);
ByteData byteData =
await image.toByteData(format: ui.ImageByteFormat.png);
Uint8List png = byteData.buffer.asUint8List();
cancel();
shareToWeChat(WeChatShareImageModel(
WeChatImage.binary(png, suffix: '.png'),
scene: WeChatScene.SESSION,
));
},
child: '发送给访客'.text.bold.make(),
), ),
value: SystemStyle.yellowBottomBar,
); );
} }
} }

@ -1,3 +1,4 @@
import 'package:akuCommunity/constants/app_theme.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -70,6 +71,7 @@ class _PickMyHousePageState extends State<PickMyHousePage> {
final appProvider = Provider.of<AppProvider>(context); final appProvider = Provider.of<AppProvider>(context);
return BeeScaffold( return BeeScaffold(
title: '我的房屋', title: '我的房屋',
systemStyle: SystemStyle.yellowBottomBar,
body: EasyRefresh( body: EasyRefresh(
header: MaterialHeader(), header: MaterialHeader(),
controller: _refreshController, controller: _refreshController,

Loading…
Cancel
Save