From a30cd27785380610368ce481263c611d9efd1ea3 Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Mon, 18 Jan 2021 10:29:44 +0800 Subject: [PATCH] update scaffold --- .../comment_message_page.dart | 25 ++--- .../message_center_page.dart | 24 +++-- .../shop_message_page/shop_message_page.dart | 23 +++-- .../system_details_page.dart | 11 +-- .../system_message_page.dart | 23 +++-- .../car_add_page/car_add_page.dart | 10 +- .../select_community_page.dart | 11 +-- .../select_parking_page.dart | 11 +-- .../house_authenticate_page.dart | 11 +-- lib/pages/notice_page/notice_page.dart | 10 +- lib/pages/one_alarm/widget/alarm_page.dart | 98 +++++++++++++------ .../opening_code_page/opening_code_page.dart | 11 +-- lib/pages/personal/evaluate_good_page.dart | 48 +++------ lib/pages/personal/order_details_page.dart | 33 ++----- lib/pages/personal/refund_apply_page.dart | 33 ++----- lib/pages/personal/refund_select_page.dart | 33 ++----- .../questionnaire_details_page.dart | 30 ++---- .../questionnaire_page.dart | 10 +- .../setting_page/about_page/about_page.dart | 10 +- .../agreement_page/agreement_page.dart | 10 +- .../agreement_page/privacy_page.dart | 13 ++- .../feedback_page/feedback_page.dart | 10 +- .../setting_page/invite_page/invite_page.dart | 10 +- .../things_create_page.dart | 10 +- .../things_detail_page.dart | 25 +++-- .../things_evaluate_page.dart | 10 +- .../visitor_access_page.dart | 41 ++++---- .../visitor_pass_page.dart | 18 ++-- lib/utils/logger/logger_view.dart | 13 ++- lib/widget/search_bar_delegate.dart | 25 ++--- 30 files changed, 288 insertions(+), 362 deletions(-) diff --git a/lib/pages/message_center_page/comment_message_page/comment_message_page.dart b/lib/pages/message_center_page/comment_message_page/comment_message_page.dart index 7a0bd1af..597325e6 100644 --- a/lib/pages/message_center_page/comment_message_page/comment_message_page.dart +++ b/lib/pages/message_center_page/comment_message_page/comment_message_page.dart @@ -1,8 +1,9 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; +import 'package:velocity_x/velocity_x.dart'; class CommentMessagePage extends StatefulWidget { CommentMessagePage({Key key}) : super(key: key); @@ -49,8 +50,6 @@ class _CommentMessagePageState extends State { super.initState(); } - - void _onRefresh() async { await Future.delayed(Duration(milliseconds: 1500)); @@ -146,14 +145,18 @@ class _CommentMessagePageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '评论通知', - subtitle: '清空', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '评论通知', + actions: [ + InkWell( + onTap: () {}, + child: Container( + padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w), + child: '清空'.text.black.size(28.sp).make(), + alignment: Alignment.center, + ), + ) + ], body: Container( color: Colors.white, child: RefreshConfiguration( diff --git a/lib/pages/message_center_page/message_center_page.dart b/lib/pages/message_center_page/message_center_page.dart index cf719acb..94149722 100644 --- a/lib/pages/message_center_page/message_center_page.dart +++ b/lib/pages/message_center_page/message_center_page.dart @@ -1,12 +1,12 @@ import 'package:akuCommunity/pages/message_center_page/comment_message_page/comment_message_page.dart'; import 'package:akuCommunity/pages/message_center_page/shop_message_page/shop_message_page.dart'; import 'package:akuCommunity/pages/message_center_page/system_message_page/system_message_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/base/assets_image.dart'; -import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; +import 'package:velocity_x/velocity_x.dart'; class MessageCenterPage extends StatefulWidget { MessageCenterPage({Key key}) : super(key: key); @@ -51,14 +51,18 @@ class _MessageCenterPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '消息中心', - subtitle: '全部已读', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '消息中心', + actions: [ + InkWell( + onTap: () {}, + child: Container( + padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w), + child: '全部已读'.text.black.size(28.sp).make(), + alignment: Alignment.center, + ), + ) + ], body: Container( color: Colors.white, child: ListView( diff --git a/lib/pages/message_center_page/shop_message_page/shop_message_page.dart b/lib/pages/message_center_page/shop_message_page/shop_message_page.dart index 89f87d6a..c5f75e3b 100644 --- a/lib/pages/message_center_page/shop_message_page/shop_message_page.dart +++ b/lib/pages/message_center_page/shop_message_page/shop_message_page.dart @@ -1,10 +1,11 @@ // import 'package:akuCommunity/pages/common/common_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; +import 'package:velocity_x/velocity_x.dart'; class ShopMessagePage extends StatefulWidget { ShopMessagePage({Key key}) : super(key: key); @@ -176,14 +177,18 @@ class _ShopMessagePageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '商城通知', - subtitle: '清空', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '商城通知', + actions: [ + InkWell( + onTap: () {}, + child: Container( + padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w), + child: '清空'.text.black.size(28.sp).make(), + alignment: Alignment.center, + ), + ) + ], body: RefreshConfiguration( hideFooterWhenNotFull: true, child: SmartRefresher( diff --git a/lib/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart b/lib/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart index dd293048..200075b6 100644 --- a/lib/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart +++ b/lib/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart @@ -1,7 +1,7 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; import 'package:akuCommunity/routers/page_routers.dart'; class SystemDetailsPage extends StatelessWidget { @@ -10,13 +10,8 @@ class SystemDetailsPage extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '查看详情', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '查看详情', body: Container( color: Colors.white, child: ListView( diff --git a/lib/pages/message_center_page/system_message_page/system_message_page.dart b/lib/pages/message_center_page/system_message_page/system_message_page.dart index 28c7a910..1d0c7b72 100644 --- a/lib/pages/message_center_page/system_message_page/system_message_page.dart +++ b/lib/pages/message_center_page/system_message_page/system_message_page.dart @@ -1,11 +1,12 @@ import 'package:akuCommunity/pages/message_center_page/system_message_page/system_details_page/system_details_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; +import 'package:velocity_x/velocity_x.dart'; class SystemMessagePage extends StatefulWidget { SystemMessagePage({Key key}) : super(key: key); @@ -145,14 +146,18 @@ class _SystemMessagePageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '系统通知', - subtitle: '清空', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '系统通知', + actions: [ + InkWell( + onTap: () {}, + child: Container( + padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w), + child: '清空'.text.black.size(28.sp).make(), + alignment: Alignment.center, + ), + ) + ], body: RefreshConfiguration( hideFooterWhenNotFull: true, child: SmartRefresher( diff --git a/lib/pages/mine_car_page/car_add_page/car_add_page.dart b/lib/pages/mine_car_page/car_add_page/car_add_page.dart index f31b5b70..46ad33c9 100644 --- a/lib/pages/mine_car_page/car_add_page/car_add_page.dart +++ b/lib/pages/mine_car_page/car_add_page/car_add_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; @@ -47,13 +48,8 @@ class _CarAddPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '添加车辆', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '添加车辆', body: SingleChildScrollView( child: Container( color: Colors.white, diff --git a/lib/pages/mine_car_page/select_community_page/select_community_page.dart b/lib/pages/mine_car_page/select_community_page/select_community_page.dart index d9891574..27e8f191 100644 --- a/lib/pages/mine_car_page/select_community_page/select_community_page.dart +++ b/lib/pages/mine_car_page/select_community_page/select_community_page.dart @@ -1,10 +1,10 @@ import 'package:akuCommunity/pages/mine_car_page/select_parking_page/select_parking_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; class SelectCommunityPage extends StatefulWidget { SelectCommunityPage({Key key}) : super(key: key); @@ -18,13 +18,8 @@ class _SelectCommunityPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '选择小区', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '选择小区', body: ListView( children: [ Container( diff --git a/lib/pages/mine_car_page/select_parking_page/select_parking_page.dart b/lib/pages/mine_car_page/select_parking_page/select_parking_page.dart index 3a60fd07..9637bd36 100644 --- a/lib/pages/mine_car_page/select_parking_page/select_parking_page.dart +++ b/lib/pages/mine_car_page/select_parking_page/select_parking_page.dart @@ -1,8 +1,8 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; class SelectParkingPage extends StatefulWidget { final Bundle bundle; @@ -15,13 +15,8 @@ class SelectParkingPage extends StatefulWidget { class _SelectParkingPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '车位列表', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '车位列表', body: ListView( children: [ Container( diff --git a/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart b/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart index 5cb5d220..ecb829cc 100644 --- a/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart +++ b/lib/pages/mine_house_page/house_authenticate_page/house_authenticate_page.dart @@ -1,7 +1,7 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; import 'package:akuCommunity/widget/common_input.dart'; class HouseAuthenticatePage extends StatefulWidget { @@ -61,13 +61,8 @@ class _HouseAuthenticatePageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '房屋认证', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '房屋认证', body: Container( color: Colors.white, child: SingleChildScrollView( diff --git a/lib/pages/notice_page/notice_page.dart b/lib/pages/notice_page/notice_page.dart index f35d5abce..72295394 100644 --- a/lib/pages/notice_page/notice_page.dart +++ b/lib/pages/notice_page/notice_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_html/flutter_html.dart'; @@ -109,13 +110,8 @@ class NoticePage extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '社区公告', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '社区公告', body: Stack( children: [ Container( diff --git a/lib/pages/one_alarm/widget/alarm_page.dart b/lib/pages/one_alarm/widget/alarm_page.dart index dc6235b4..342ad60a 100644 --- a/lib/pages/one_alarm/widget/alarm_page.dart +++ b/lib/pages/one_alarm/widget/alarm_page.dart @@ -1,12 +1,15 @@ +import 'package:akuCommunity/pages/one_alarm/widget/explain_template.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:amap_map_fluttify/amap_map_fluttify.dart'; import 'package:amap_location_fluttify/amap_location_fluttify.dart'; +import 'package:flutter_beautiful_popup/main.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:url_launcher/url_launcher.dart'; +import 'package:velocity_x/velocity_x.dart'; class PermissionUtil { static Future getLocationPermission() async { @@ -26,12 +29,48 @@ class _AlarmPageState extends State { show: true, myLocationType: MyLocationType.Locate, ); - Future _makephonenum(String url)async{ - (await canLaunch(url))?await launch(url):throw 'Could not launch $url'; + Future _makephonenum(String url) async { + (await canLaunch(url)) ? await launch(url) : throw 'Could not launch $url'; } AmapController _amapController; Location _location; + + void showExplain(BuildContext context) { + final popup = BeautifulPopup.customize( + context: context, + build: (options) => ExplainTemplate(options), + ); + popup.show( + title: Text( + '功能说明', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 32.sp, + color: Color(0xff15c0ec), + ), + ), + content: Text( + '点击“呼叫110”后,您可以直接拨打本地110。页面中提供了您当前所在位置,以便您与警方沟通。(GPS信号弱时,位置可能存在偏移)', + style: TextStyle( + fontSize: 28.sp, + color: Color(0xff666666), + ), + ), + actions: [ + MaterialButton( + color: Color(0xff15c0ec), + textColor: Colors.white, + shape: RoundedRectangleBorder( + side: BorderSide.none, + borderRadius: BorderRadius.all(Radius.circular(50))), + child: Text('关闭'), + onPressed: Navigator.of(context).pop, + ) + ], + close: SizedBox()); + } + @override void initState() { super.initState(); @@ -49,14 +88,20 @@ class _AlarmPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '一键报警', - subtitle: '功能说明', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '一键报警', + actions: [ + InkWell( + onTap: () { + showExplain(context); + }, + child: Container( + padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w), + child: '全部已读'.text.black.size(28.sp).make(), + alignment: Alignment.center, + ), + ) + ], body: Stack( alignment: Alignment.topCenter, children: [ @@ -90,9 +135,7 @@ class _AlarmPageState extends State { children: [ SizedBox(height: 24.w), Container( - margin: EdgeInsets.only( - top: 24.w, - left: 32.w), + margin: EdgeInsets.only(top: 24.w, left: 32.w), child: Text( '当前位置(仅供参考)', style: TextStyle( @@ -102,9 +145,7 @@ class _AlarmPageState extends State { ), ), Container( - margin: EdgeInsets.only( - top: 20.w, - left: 32.w), + margin: EdgeInsets.only(top: 20.w, left: 32.w), child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ @@ -114,8 +155,7 @@ class _AlarmPageState extends State { size: 29.sp, ), Container( - margin: - EdgeInsets.only(left: 5.w), + margin: EdgeInsets.only(left: 5.w), child: Text( (_location == null) ? '加载中……' @@ -140,8 +180,7 @@ class _AlarmPageState extends State { width: 66.w, height: 66.w, decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(66.w), + borderRadius: BorderRadius.circular(66.w), boxShadow: [ BoxShadow( color: Color(0x1F000000), @@ -153,12 +192,10 @@ class _AlarmPageState extends State { child: FlatButton( padding: EdgeInsets.zero, shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(66.w)), + borderRadius: BorderRadius.circular(66.w)), color: Color(0xFFFFFFFF), onPressed: () { - _amapController?.setCenterCoordinate( - _location.latLng); + _amapController?.setCenterCoordinate(_location.latLng); Future.delayed(Duration(milliseconds: 500), () { if (mounted) _amapController.setZoomLevel(16); }); @@ -193,8 +230,8 @@ class _AlarmPageState extends State { width: 196.w, decoration: BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(196.w)), + borderRadius: + BorderRadius.all(Radius.circular(196.w)), ), child: Container( height: 172.w, @@ -205,8 +242,8 @@ class _AlarmPageState extends State { end: Alignment.topLeft, colors: [Color(0xffef0909), Color(0xffff8880)], ), - borderRadius: BorderRadius.all( - Radius.circular(172.w)), + borderRadius: + BorderRadius.all(Radius.circular(172.w)), boxShadow: [ BoxShadow( color: Color(0xfffd7770).withOpacity(0.33), @@ -218,8 +255,7 @@ class _AlarmPageState extends State { ), child: FlatButton( shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular( - 172.w)), + borderRadius: BorderRadius.circular(172.w)), onPressed: () { setState(() { _makephonenum('tel:110'); diff --git a/lib/pages/opening_code_page/opening_code_page.dart b/lib/pages/opening_code_page/opening_code_page.dart index 93d6b37d..fa6b2199 100644 --- a/lib/pages/opening_code_page/opening_code_page.dart +++ b/lib/pages/opening_code_page/opening_code_page.dart @@ -1,9 +1,9 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:qr_flutter/qr_flutter.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; class OpeningCodePage extends StatefulWidget { OpeningCodePage({Key key}) : super(key: key); @@ -15,13 +15,8 @@ class OpeningCodePage extends StatefulWidget { class _OpeningCodePageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '开门码', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '开门码', body: Container( color: Color(0xfff9f9f9), child: ListView( diff --git a/lib/pages/personal/evaluate_good_page.dart b/lib/pages/personal/evaluate_good_page.dart index c0856bc9..8ade4786 100644 --- a/lib/pages/personal/evaluate_good_page.dart +++ b/lib/pages/personal/evaluate_good_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; @@ -25,28 +26,6 @@ class _EvaluateGoodPageState extends State { {'radioName': '差评', 'isCheck': false} ]; - AppBar _appBar() { - return AppBar( - elevation: 0, - backgroundColor: Colors.white, - leading: IconButton( - icon: Icon(AntDesign.left, size: 40.sp), - onPressed: () { - Get.back(); - }, - ), - centerTitle: true, - title: Text( - '发表评价', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: BaseStyle.fontSize32, - color: ktextPrimary, - ), - ), - ); - } - Container _containerContentList(List> listContent) { return Container( child: Column( @@ -73,8 +52,8 @@ class _EvaluateGoodPageState extends State { children: [ Text( '描述相符', - style: TextStyle( - fontSize: BaseStyle.fontSize28, color: ktextPrimary), + style: + TextStyle(fontSize: BaseStyle.fontSize28, color: ktextPrimary), ), SizedBox(width: 34.w), Row( @@ -168,18 +147,15 @@ class _EvaluateGoodPageState extends State { Container _containerAddImage() { return Container( - padding: EdgeInsets.only( - left: 36.w, - right: 36.w, - top: 32.w, - bottom: 24.w), + padding: + EdgeInsets.only(left: 36.w, right: 36.w, top: 32.w, bottom: 24.w), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( '添加图片信息(0/9)', - style: TextStyle( - fontSize: BaseStyle.fontSize28, color: ktextPrimary), + style: + TextStyle(fontSize: BaseStyle.fontSize28, color: ktextPrimary), ), SizedBox(height: 24.w), InkWell( @@ -228,8 +204,14 @@ class _EvaluateGoodPageState extends State { @override Widget build(BuildContext context) { double _statusHeight = MediaQuery.of(context).padding.top; - return Scaffold( - appBar: _appBar(), + return BeeScaffold( + leading: IconButton( + icon: Icon(AntDesign.left, size: 40.sp), + onPressed: () { + Get.back(); + }, + ), + title: '发表评价', body: SingleChildScrollView( child: Container( height: MediaQuery.of(context).size.height - diff --git a/lib/pages/personal/order_details_page.dart b/lib/pages/personal/order_details_page.dart index b166fe61..a848a359 100644 --- a/lib/pages/personal/order_details_page.dart +++ b/lib/pages/personal/order_details_page.dart @@ -1,4 +1,5 @@ import 'package:akuCommunity/pages/personal/refund_select_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:extended_text/extended_text.dart'; @@ -18,28 +19,6 @@ class OrderDetailsPage extends StatefulWidget { } class _OrderDetailsPageState extends State { - AppBar _appBar() { - return AppBar( - elevation: 0, - backgroundColor: BaseStyle.colorffd000, - leading: IconButton( - icon: Icon(AntDesign.left, size: 40.sp), - onPressed: () { - Get.back(); - }, - ), - centerTitle: true, - title: Text( - '订单详情', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: BaseStyle.fontSize32, - color: ktextPrimary, - ), - ), - ); - } - Container _containerHeader(String status) { return Container( width: double.infinity, @@ -459,8 +438,14 @@ class _OrderDetailsPageState extends State { @override Widget build(BuildContext context) { double statusHeight = MediaQuery.of(context).padding.top; - return Scaffold( - appBar: _appBar(), + return BeeScaffold( + leading: IconButton( + icon: Icon(AntDesign.left, size: 40.sp), + onPressed: () { + Get.back(); + }, + ), + title: '订单详情', body: SingleChildScrollView( child: Container( height: MediaQuery.of(context).size.height - diff --git a/lib/pages/personal/refund_apply_page.dart b/lib/pages/personal/refund_apply_page.dart index 56a5f250..7503fc10 100644 --- a/lib/pages/personal/refund_apply_page.dart +++ b/lib/pages/personal/refund_apply_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; @@ -21,28 +22,6 @@ class _RefundApplyPageState extends State { String hintText = '选填'; - AppBar _appBar() { - return AppBar( - elevation: 0, - backgroundColor: BaseStyle.colorffd000, - leading: IconButton( - icon: Icon(AntDesign.left, size: 40.sp), - onPressed: () { - Get.back(); - }, - ), - centerTitle: true, - title: Text( - '申请退款', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: BaseStyle.fontSize32, - color: ktextPrimary, - ), - ), - ); - } - Container _containerContentList(List> listContent) { return Container( child: Column( @@ -178,8 +157,14 @@ class _RefundApplyPageState extends State { {'title': '退款原因', 'subtitle': '请选择', 'fun': null, 'isRight': true}, {'title': '退款方式', 'subtitle': '物业上门取件', 'fun': null, 'isRight': false} ]; - return Scaffold( - appBar: _appBar(), + return BeeScaffold( + title: '申请退款', + leading: IconButton( + icon: Icon(AntDesign.left, size: 40.sp), + onPressed: () { + Get.back(); + }, + ), body: SingleChildScrollView( child: Container( height: MediaQuery.of(context).size.height - diff --git a/lib/pages/personal/refund_select_page.dart b/lib/pages/personal/refund_select_page.dart index fee776c3..ef223eea 100644 --- a/lib/pages/personal/refund_select_page.dart +++ b/lib/pages/personal/refund_select_page.dart @@ -1,4 +1,5 @@ import 'package:akuCommunity/pages/personal/refund_apply_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; @@ -18,27 +19,7 @@ class RefundSelectPage extends StatefulWidget { } class _RefundSelectPageState extends State { - AppBar _appBar() { - return AppBar( - elevation: 0, - backgroundColor: BaseStyle.colorffd000, - leading: IconButton( - icon: Icon(AntDesign.left, size: 40.sp), - onPressed: () { - Get.back(); - }, - ), - centerTitle: true, - title: Text( - '选择服务类型', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: BaseStyle.fontSize32, - color: ktextPrimary, - ), - ), - ); - } + Container _containerContentList(List> listContent) { return Container( @@ -88,8 +69,14 @@ class _RefundSelectPageState extends State { 'isRight': true } ]; - return Scaffold( - appBar: _appBar(), + return BeeScaffold( + leading: IconButton( + icon: Icon(AntDesign.left, size: 40.sp), + onPressed: () { + Get.back(); + }, + ), + title: '选择服务类型', body: ListView( children: [ SizedBox(height: 24.w), diff --git a/lib/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart b/lib/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart index 74c5054d..de166cfd 100644 --- a/lib/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart +++ b/lib/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart @@ -1,10 +1,10 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/widget/cached_image_wrapper.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; import 'package:akuCommunity/routers/page_routers.dart'; class QuestionnaireDetailsPage extends StatefulWidget { @@ -71,7 +71,7 @@ class _QuestionnaireDetailsPageState extends State { Widget _questionCard(String title, List> optionList) { return Container( - margin: EdgeInsets.only(top:64.w), + margin: EdgeInsets.only(top: 64.w), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -95,7 +95,7 @@ class _QuestionnaireDetailsPageState extends State { }); }, child: Container( - margin: EdgeInsets.only(left:15.w), + margin: EdgeInsets.only(left: 15.w), width: MediaQuery.of(context).size.width / 2.35, child: Row( children: [ @@ -109,8 +109,7 @@ class _QuestionnaireDetailsPageState extends State { size: 32.w, ), Container( - margin: EdgeInsets.only( - left: 16.w), + margin: EdgeInsets.only(left: 16.w), width: MediaQuery.of(context).size.width / 3.2, child: Text( item['title'], @@ -138,10 +137,7 @@ class _QuestionnaireDetailsPageState extends State { Widget _containerTextField() { return Container( - padding: EdgeInsets.only( - top: 24.w, - left: 24.w, - right: 32.w), + padding: EdgeInsets.only(top: 24.w, left: 24.w, right: 32.w), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(6)), border: Border.all(color: Color(0xffd4cfbe), width: 1.0), @@ -206,13 +202,8 @@ class _QuestionnaireDetailsPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '问卷调查', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '问卷调查', body: Container( color: Colors.white, child: Stack( @@ -266,14 +257,11 @@ class _QuestionnaireDetailsPageState extends State { ), ), Container( - margin: EdgeInsets.only( - top: 80.w, - bottom: 24.w), + margin: EdgeInsets.only(top: 80.w, bottom: 24.w), child: Text( '您的觉得我们需要改进的地方', style: TextStyle( - fontSize: BaseStyle.fontSize28, - color: ktextPrimary), + fontSize: BaseStyle.fontSize28, color: ktextPrimary), ), ), _containerTextField(), diff --git a/lib/pages/questionnaire_page/questionnaire_page.dart b/lib/pages/questionnaire_page/questionnaire_page.dart index 72fccac4..c336d507 100644 --- a/lib/pages/questionnaire_page/questionnaire_page.dart +++ b/lib/pages/questionnaire_page/questionnaire_page.dart @@ -1,4 +1,5 @@ import 'package:akuCommunity/pages/questionnaire_page/questionnaire_details_page/questionnaire_details_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; @@ -83,13 +84,8 @@ class _QuestionnairePageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '问卷调查', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '问卷调查', body: RefreshConfiguration( hideFooterWhenNotFull: true, child: SmartRefresher( diff --git a/lib/pages/setting_page/about_page/about_page.dart b/lib/pages/setting_page/about_page/about_page.dart index 6f5e65b8..a2233d5e 100644 --- a/lib/pages/setting_page/about_page/about_page.dart +++ b/lib/pages/setting_page/about_page/about_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; @@ -16,13 +17,8 @@ class AboutPage extends StatelessWidget { color: Color(0xff575757), ); - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '关于小蜜蜂智慧社区', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '关于小蜜蜂智慧社区', body: Container( color: Colors.white, padding: EdgeInsets.only( diff --git a/lib/pages/setting_page/agreement_page/agreement_page.dart b/lib/pages/setting_page/agreement_page/agreement_page.dart index 80488c28..7c109500 100644 --- a/lib/pages/setting_page/agreement_page/agreement_page.dart +++ b/lib/pages/setting_page/agreement_page/agreement_page.dart @@ -1,4 +1,5 @@ import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; class AgreementPage extends StatefulWidget { @@ -9,18 +10,15 @@ class AgreementPage extends StatefulWidget { class _AgreementPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text('用户协议'), - ), + return BeeScaffold( + title: '用户协议', body: SingleChildScrollView( padding: EdgeInsets.all(16.w), child: Column( children: [ Text( '《用户协议》', - style: TextStyle( - fontWeight: FontWeight.w600, fontSize: 35.w), + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 35.w), ), Text( ''' diff --git a/lib/pages/setting_page/agreement_page/privacy_page.dart b/lib/pages/setting_page/agreement_page/privacy_page.dart index 4a13f0c2..352e585b 100644 --- a/lib/pages/setting_page/agreement_page/privacy_page.dart +++ b/lib/pages/setting_page/agreement_page/privacy_page.dart @@ -1,4 +1,5 @@ import 'package:akuCommunity/utils/headers.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; class PrivacyPage extends StatefulWidget { @@ -10,17 +11,15 @@ class PrivacyPage extends StatefulWidget { class _PrivacyPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text('隐私政策'), - ), + return BeeScaffold( + title: '隐私政策', body: SingleChildScrollView( padding: EdgeInsets.all(16.sp), child: Column( - children: [Text( + children: [ + Text( '小蜜蜂智慧社区隐私政策', - style: TextStyle( - fontWeight: FontWeight.w600, fontSize: 35.w), + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 35.w), ), Text( ''' diff --git a/lib/pages/setting_page/feedback_page/feedback_page.dart b/lib/pages/setting_page/feedback_page/feedback_page.dart index a4b1d10c..22fdc7e2 100644 --- a/lib/pages/setting_page/feedback_page/feedback_page.dart +++ b/lib/pages/setting_page/feedback_page/feedback_page.dart @@ -1,5 +1,6 @@ import 'dart:math'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; @@ -101,13 +102,8 @@ class _FeedBackPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '意见反馈', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '意见反馈', body: SingleChildScrollView( child: Container( color: Colors.white, diff --git a/lib/pages/setting_page/invite_page/invite_page.dart b/lib/pages/setting_page/invite_page/invite_page.dart index 5e24cc15..ad76ec30 100644 --- a/lib/pages/setting_page/invite_page/invite_page.dart +++ b/lib/pages/setting_page/invite_page/invite_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:qr_flutter/qr_flutter.dart'; @@ -20,13 +21,8 @@ class InvitePage extends StatelessWidget { ); } - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '邀请注册', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '邀请注册', body: Container( color: Colors.white, padding: EdgeInsets.only(top: 146.w), diff --git a/lib/pages/things_page/things_create_page/things_create_page.dart b/lib/pages/things_page/things_create_page/things_create_page.dart index 1036294a..4c213b44 100644 --- a/lib/pages/things_page/things_create_page/things_create_page.dart +++ b/lib/pages/things_page/things_create_page/things_create_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; @@ -268,13 +269,8 @@ class _ThingsCreatePageState extends State { // .toList(); // } - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '${widget.bundle.getMap('create')['title']}', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '${widget.bundle.getMap('create')['title']}', body: Container( color: Colors.white, child: Stack( diff --git a/lib/pages/things_page/things_detail_page/things_detail_page.dart b/lib/pages/things_page/things_detail_page/things_detail_page.dart index 996184d6..3202451a 100644 --- a/lib/pages/things_page/things_detail_page/things_detail_page.dart +++ b/lib/pages/things_page/things_detail_page/things_detail_page.dart @@ -1,12 +1,13 @@ import 'package:akuCommunity/pages/things_page/things_evaluate_page/things_evaluate_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/widget/expandable_text.dart'; import 'package:akuCommunity/routers/page_routers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; import '../widget/image_grid.dart'; import 'widget/goods_info_card.dart'; +import 'package:velocity_x/velocity_x.dart'; class ThingsDetailPage extends StatefulWidget { final Bundle bundle; @@ -101,14 +102,20 @@ class _ThingsDetailPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '查看详情', - subtitle: widget.bundle.getMap('things')['isRepair'] ? '' : '评价', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '查看详情', + actions: [ + widget.bundle.getMap('things')['isRepair'] + ? SizedBox() + : InkWell( + onTap: () {}, + child: Container( + padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w), + child: '评价'.text.black.size(28.sp).make(), + alignment: Alignment.center, + ), + ) + ], body: Container( color: Colors.white, child: Stack( diff --git a/lib/pages/things_page/things_evaluate_page/things_evaluate_page.dart b/lib/pages/things_page/things_evaluate_page/things_evaluate_page.dart index bfed7c97..ff7bde47 100644 --- a/lib/pages/things_page/things_evaluate_page/things_evaluate_page.dart +++ b/lib/pages/things_page/things_evaluate_page/things_evaluate_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; @@ -137,13 +138,8 @@ class _ThingsEvaluatePageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '${widget.bundle.getMap('details')['title']}', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '${widget.bundle.getMap('details')['title']}', body: SingleChildScrollView( child: Container( color: Colors.white, diff --git a/lib/pages/visitor_access_page/visitor_access_page.dart b/lib/pages/visitor_access_page/visitor_access_page.dart index cde8b00a..fc81d5ba 100644 --- a/lib/pages/visitor_access_page/visitor_access_page.dart +++ b/lib/pages/visitor_access_page/visitor_access_page.dart @@ -1,11 +1,13 @@ +import 'package:akuCommunity/pages/visitor_access_page/visitor_record_page.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:akuCommunity/base/assets_image.dart'; import 'package:flutter_icons/flutter_icons.dart'; import 'package:akuCommunity/utils/headers.dart'; -import 'package:akuCommunity/widget/common_app_bar.dart'; import 'package:akuCommunity/widget/common_input.dart'; +import 'package:velocity_x/velocity_x.dart'; class VisitorAccessPage extends StatefulWidget { VisitorAccessPage({Key key}) : super(key: key); @@ -35,8 +37,7 @@ class _VisitorAccessPageState extends State { children: [ Text( '来访房屋', - style: TextStyle( - fontSize: 28.sp, color: Color(0xff333333)), + style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), ), SizedBox(height: 32.w), Container( @@ -120,8 +121,7 @@ class _VisitorAccessPageState extends State { children: [ Text( title, - style: TextStyle( - fontSize: 28.sp, color: Color(0xff333333)), + style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), ), SizedBox(height: 25.w), CommonInput(inputController: controller, hintText: hintText) @@ -184,8 +184,7 @@ class _VisitorAccessPageState extends State { children: [ Text( '访客性别', - style: TextStyle( - fontSize: 28.sp, color: Color(0xff333333)), + style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), ), SizedBox(height: 32.w), Container( @@ -229,8 +228,7 @@ class _VisitorAccessPageState extends State { children: [ Text( '到访时间', - style: TextStyle( - fontSize: 28.sp, color: Color(0xff333333)), + style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), ), SizedBox(height: 32.w), Container( @@ -291,22 +289,27 @@ class _VisitorAccessPageState extends State { ), child: Text( '通行证只在到访当天单次有效,逾期或超次需要重新生成', - style: TextStyle( - fontSize: 20.sp, color: Color(0xff999999)), + style: TextStyle(fontSize: 20.sp, color: Color(0xff999999)), ), ), ); } Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '访客通行', - subtitle: '访客记录', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '访客通行', + actions: [ + InkWell( + onTap: () { + VisitorRecordPage().to; + }, + child: Container( + padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w), + child: '访客记录'.text.black.size(28.sp).make(), + alignment: Alignment.center, + ), + ) + ], body: Container( color: Colors.white, child: ListView( diff --git a/lib/pages/visitor_access_page/visitor_pass_page.dart b/lib/pages/visitor_access_page/visitor_pass_page.dart index 0ecc11b6..449ae5f8 100644 --- a/lib/pages/visitor_access_page/visitor_pass_page.dart +++ b/lib/pages/visitor_access_page/visitor_pass_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_icons/flutter_icons.dart'; @@ -21,14 +22,12 @@ class _VisitorPassPageState extends State { children: [ Text( '宁波华茂悦峰', - style: TextStyle( - fontSize: 40.sp, color: Color(0xffffffff)), + style: TextStyle(fontSize: 40.sp, color: Color(0xffffffff)), ), SizedBox(height: 10.w), Text( '1幢-1单元-702室', - style: TextStyle( - fontSize: 26.sp, color: Color(0xffffffff)), + style: TextStyle(fontSize: 26.sp, color: Color(0xffffffff)), ), ], ), @@ -77,7 +76,7 @@ class _VisitorPassPageState extends State { maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w600, fontSize: 36.sp, color: Color(0xff333333)), ), @@ -183,13 +182,8 @@ class _VisitorPassPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: PreferredSize( - child: CommonAppBar( - title: '访客通行证', - ), - preferredSize: Size.fromHeight(kToolbarHeight), - ), + return BeeScaffold( + title: '访客通行证', body: Container( color: Color(0xff333333), child: Stack( diff --git a/lib/utils/logger/logger_view.dart b/lib/utils/logger/logger_view.dart index a07bfb0e..3b66fde2 100644 --- a/lib/utils/logger/logger_view.dart +++ b/lib/utils/logger/logger_view.dart @@ -1,6 +1,7 @@ import 'package:akuCommunity/utils/logger/logger_card.dart'; import 'package:akuCommunity/utils/logger/logger_data.dart'; import 'package:akuCommunity/extensions/page_router.dart'; +import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:flutter/material.dart'; import 'package:velocity_x/velocity_x.dart'; @@ -88,13 +89,11 @@ class _LoggerViewState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: 'Logger'.text.make(), - actions: [ - IconButton(icon: Icon(Icons.list), onPressed: () {}), - ], - ), + return BeeScaffold( + title: 'Logger', + actions: [ + IconButton(icon: Icon(Icons.list), onPressed: () {}), + ], body: ListView.builder( itemBuilder: (context, index) => LoggerCard(data: LoggerData.data[index]), diff --git a/lib/widget/search_bar_delegate.dart b/lib/widget/search_bar_delegate.dart index b7ce060a..e36208ca 100644 --- a/lib/widget/search_bar_delegate.dart +++ b/lib/widget/search_bar_delegate.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'asset.dart'; +import 'bee_scaffold.dart'; class SearchBarDemo extends StatefulWidget { _SearchBarDemoState createState() => _SearchBarDemoState(); @@ -8,16 +9,18 @@ class SearchBarDemo extends StatefulWidget { class _SearchBarDemoState extends State { @override Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar(title: Text('SearchBarDemo'), actions: [ - IconButton( - icon: Icon(Icons.search), - onPressed: () { - showSearch(context: context, delegate: SearchBarDelegate()); - } - // showSearch(context:context,delegate: searchBarDelegate()), - ), - ])); + return BeeScaffold( + title: 'SearchBarDemo', + actions: [ + IconButton( + icon: Icon(Icons.search), + onPressed: () { + showSearch(context: context, delegate: SearchBarDelegate()); + } + // showSearch(context:context,delegate: searchBarDelegate()), + ), + ], + ); } } @@ -74,4 +77,4 @@ class SearchBarDelegate extends SearchDelegate { ])), )); } -} \ No newline at end of file +}