From 9aaba0905eb5421f49b3f44a628ce483f9384f87 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Mon, 26 Apr 2021 14:14:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=AC=E5=85=B1=E8=B5=84?= =?UTF-8?q?=E8=AE=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main_initialize.dart | 5 ++-- .../deto_create_page/deto_create_page.dart | 2 ++ .../goods_deto_page/goods_deto_page.dart | 4 +-- lib/pages/home/home_page.dart | 6 ++++ .../activity/activity_detail_page.dart | 2 ++ lib/ui/community/public_infomation_page.dart | 29 +++++++++++++++++++ 6 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 lib/ui/community/public_infomation_page.dart diff --git a/lib/main_initialize.dart b/lib/main_initialize.dart index 1dd23406..97310ee8 100644 --- a/lib/main_initialize.dart +++ b/lib/main_initialize.dart @@ -1,3 +1,4 @@ +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -15,10 +16,10 @@ class MainInitialize { static Future initFirebase() async { await Firebase.initializeApp(); //TODO setCrashlyticsCollectionEnabled state - FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); + FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(kReleaseMode); FlutterError.onError = (detail) { LoggerData.addData(detail); - FirebaseCrashlytics.instance.recordFlutterError(detail); + if (kReleaseMode) FirebaseCrashlytics.instance.recordFlutterError(detail); FlutterError.presentError(detail); }; } diff --git a/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart b/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart index d318879c..fe750980 100644 --- a/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart +++ b/lib/pages/goods_deto_page/deto_create_page/deto_create_page.dart @@ -2,6 +2,7 @@ import 'dart:io'; +import 'package:akuCommunity/constants/app_theme.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -404,6 +405,7 @@ class _DetoCreatePageState extends State { UserProvider userProvider = Provider.of(context); AppProvider appProvider = Provider.of(context); return BeeScaffold( + systemStyle: SystemStyle.yellowBottomBar, title: '物品出户', body: ListView( padding: EdgeInsets.all(32.w), diff --git a/lib/pages/goods_deto_page/goods_deto_page.dart b/lib/pages/goods_deto_page/goods_deto_page.dart index 099eb402..14e51e1a 100644 --- a/lib/pages/goods_deto_page/goods_deto_page.dart +++ b/lib/pages/goods_deto_page/goods_deto_page.dart @@ -65,9 +65,7 @@ class _GoodsDetoPageState extends State { Widget build(BuildContext context) { UserProvider userProvider = Provider.of(context); return BeeScaffold( - systemStyle: _isEdit - ? SystemStyle.genStyle(bottom: Color(0xFFFFD000).withOpacity(0.2)) - : SystemStyle.yellowBottomBar, + systemStyle: SystemStyle.yellowBottomBar, title: '物品出户', actions: [ IconButton( diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index ec2d021d..4d09de52 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -1,5 +1,6 @@ // Dart imports: +import 'package:akuCommunity/ui/community/public_infomation_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -109,6 +110,11 @@ class _HomePageState extends State child: Column( children: [ HomeNotification(items: _boardItemModels), + HomeTitle( + title: '公共资讯', + suffixTitle: '更多资讯', + onTap: () => Get.to(() => PublicInfomationPage()), + ), HomeTitle( title: '社区活动', suffixTitle: '更多活动', diff --git a/lib/ui/community/activity/activity_detail_page.dart b/lib/ui/community/activity/activity_detail_page.dart index fe31616a..cdd4eea1 100644 --- a/lib/ui/community/activity/activity_detail_page.dart +++ b/lib/ui/community/activity/activity_detail_page.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/constants/app_theme.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -78,6 +79,7 @@ class _ActivityDetailPageState extends State { Widget build(BuildContext context) { return BeeScaffold( title: '活动详情', + systemStyle: SystemStyle.yellowBottomBar, body: EasyRefresh( header: MaterialHeader(), onRefresh: () async { diff --git a/lib/ui/community/public_infomation_page.dart b/lib/ui/community/public_infomation_page.dart new file mode 100644 index 00000000..61fd2e80 --- /dev/null +++ b/lib/ui/community/public_infomation_page.dart @@ -0,0 +1,29 @@ +import 'package:akuCommunity/widget/bee_scaffold.dart'; +import 'package:akuCommunity/widget/tab_bar/bee_tab_bar.dart'; +import 'package:flutter/material.dart'; + +class PublicInfomationPage extends StatefulWidget { + PublicInfomationPage({Key key}) : super(key: key); + + @override + _PublicInfomationPageState createState() => _PublicInfomationPageState(); +} + +class _PublicInfomationPageState extends State + with TickerProviderStateMixin { + static const pubTabs = ['全部', '政务', '生活', '医疗', '教育']; + TabController _tabController; + @override + void initState() { + super.initState(); + _tabController = TabController(length: pubTabs.length, vsync: this); + } + + @override + Widget build(BuildContext context) { + return BeeScaffold( + title: '公共资讯', + appBarBottom: BeeTabBar(controller: _tabController, tabs: pubTabs), + ); + } +}