diff --git a/lib/main.dart b/lib/main.dart index 910f65aa..c4dd5d5b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -22,7 +22,10 @@ import 'package:akuCommunity/utils/headers.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle(statusBarColor: Colors.transparent), + SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + systemNavigationBarColor: Colors.white, + ), ); JPush jpush = new JPush(); jpush.addEventHandler( diff --git a/lib/pages/setting_page/agreement_page/agreement_page.dart b/lib/pages/setting_page/agreement_page/agreement_page.dart index fe68afa1..5f3deb6c 100644 --- a/lib/pages/setting_page/agreement_page/agreement_page.dart +++ b/lib/pages/setting_page/agreement_page/agreement_page.dart @@ -15,14 +15,8 @@ class _AgreementPageState extends State { title: '用户协议', body: SingleChildScrollView( padding: EdgeInsets.all(16.w), - child: Column( - children: [ - Text( - '《用户协议》', - style: TextStyle(fontWeight: FontWeight.w600, fontSize: 35.w), - ), - Text( - ''' + child: Text( + ''' 欢迎您使用“小蜜蜂智慧社区”APP软件及服务! 为使用“小蜜蜂智慧社区”APP软件(以下简称“许可软件”)及服务,您应当阅读并遵守《用户协议》(以下简称“本协议”)。请您务必审慎阅读、充分理解各条款内容,特别是免除或者限制责任的条款,以及开通或使用某项服务的单独协议,并选择接受或不接受。限制、免责条款可能以加粗形式提示您注意。 @@ -221,11 +215,9 @@ class _AgreementPageState extends State { 2020年10月21日 ''', - style: TextStyle( - fontSize: 30.w, - ), - ), - ], + style: TextStyle( + fontSize: 30.w, + ), ), ), ); diff --git a/lib/pages/setting_page/agreement_page/privacy_page.dart b/lib/pages/setting_page/agreement_page/privacy_page.dart index 4307f5ab..26176bf6 100644 --- a/lib/pages/setting_page/agreement_page/privacy_page.dart +++ b/lib/pages/setting_page/agreement_page/privacy_page.dart @@ -16,14 +16,8 @@ class _PrivacyPageState extends State { title: '隐私政策', body: SingleChildScrollView( padding: EdgeInsets.all(16.sp), - child: Column( - children: [ - Text( - '小蜜蜂智慧社区隐私政策', - style: TextStyle(fontWeight: FontWeight.w600, fontSize: 35.w), - ), - Text( - ''' + child: Text( + ''' 小蜜蜂智慧社区APP是由深圳市凯达来科技有限公司提供的一款智慧社区APP,为用户提供更好、更优、更个性化的服务是我们坚持不懈的追求,也希望通过我们提供的服务可以更方便您的生活。依据法律的规定,我们将在特定情形下收集、使用、保存和披露您的个人信息。以下条款描述了我们如何收集、使用、保存和披露您的个人信息。 本政策将帮助您了解以下内容,请根据以下目录阅读相应章节: 1.个人信息的收集 @@ -124,11 +118,9 @@ class _PrivacyPageState extends State { 深圳市凯达来科技有限公司 2020年10月20日 ''', - style: TextStyle( - fontSize: 30.w, - ), - ), - ], + style: TextStyle( + fontSize: 30.w, + ), ), ), ); diff --git a/lib/pages/tab_navigator.dart b/lib/pages/tab_navigator.dart index e249a5c1..d6870af2 100644 --- a/lib/pages/tab_navigator.dart +++ b/lib/pages/tab_navigator.dart @@ -99,6 +99,7 @@ class _TabNavigatorState extends State bottomNavigationBar: StatefulBuilder(builder: (context, setFunc) { return BottomNavigationBar( items: _bottomNav, + backgroundColor: Colors.white, currentIndex: _currentIndex, selectedFontSize: 20.sp, unselectedFontSize: 20.sp, diff --git a/lib/ui/community/community_views/topic/topic_detail_page.dart b/lib/ui/community/community_views/topic/topic_detail_page.dart index 96030d89..a364d232 100644 --- a/lib/ui/community/community_views/topic/topic_detail_page.dart +++ b/lib/ui/community/community_views/topic/topic_detail_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:get/get.dart'; @@ -31,57 +32,60 @@ class _TopicDetailPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - floatingActionButton: FloatingActionButton( - heroTag: 'event_add', - onPressed: () async { - if (LoginUtil.isNotLogin) return; - bool result = await Get.to(() => AddNewEventPage.topic( - topicName: widget.model.summary, - initTopic: widget.model.id, - )); - }, - child: Icon(Icons.add), - ), - body: BeeListView( - convert: (model) { - return model.tableList - .map((e) => EventItemModel.fromJson(e)) - .toList(); - }, - path: API.community.eventByTopicId, - extraParams: {'gambitId': widget.model.id}, - controller: _refreshController, - builder: (items) { - return CustomScrollView( - slivers: [ - SliverPersistentHeader( - delegate: TopicSliverHeader( - id: widget.model.id, - title: widget.model.summary, - imgPath: widget.model.firstImg, - subTitle: widget.model.content, + return AnnotatedRegion( + value: SystemUiOverlayStyle.light, + child: Scaffold( + floatingActionButton: FloatingActionButton( + heroTag: 'event_add', + onPressed: () async { + if (LoginUtil.isNotLogin) return; + bool result = await Get.to(() => AddNewEventPage.topic( + topicName: widget.model.summary, + initTopic: widget.model.id, + )); + }, + child: Icon(Icons.add), + ), + body: BeeListView( + convert: (model) { + return model.tableList + .map((e) => EventItemModel.fromJson(e)) + .toList(); + }, + path: API.community.eventByTopicId, + extraParams: {'gambitId': widget.model.id}, + controller: _refreshController, + builder: (items) { + return CustomScrollView( + slivers: [ + SliverPersistentHeader( + delegate: TopicSliverHeader( + id: widget.model.id, + title: widget.model.summary, + imgPath: widget.model.firstImg, + subTitle: widget.model.content, + ), + pinned: true, + floating: true, ), - pinned: true, - floating: true, - ), - SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) { - final item = items[index] as EventItemModel; - return ChatCard( - model: item, - onDelete: () { - _refreshController.callRefresh(); - }, - ); - }, - childCount: items.length, + SliverList( + delegate: SliverChildBuilderDelegate( + (context, index) { + final item = items[index] as EventItemModel; + return ChatCard( + model: item, + onDelete: () { + _refreshController.callRefresh(); + }, + ); + }, + childCount: items.length, + ), ), - ), - ], - ); - }, + ], + ); + }, + ), ), ); } diff --git a/lib/ui/community/community_views/topic/topic_sliver_header.dart b/lib/ui/community/community_views/topic/topic_sliver_header.dart index 94c0ca76..70091296 100644 --- a/lib/ui/community/community_views/topic/topic_sliver_header.dart +++ b/lib/ui/community/community_views/topic/topic_sliver_header.dart @@ -26,7 +26,7 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate { top: 0, bottom: 0, child: Material( - color: Colors.white.withOpacity(0 + 0.5 * _offset(shrinkOffset)), + color: Colors.black.withOpacity(0 + 0.5 * _offset(shrinkOffset)), ), ); } @@ -35,7 +35,7 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate { return Positioned( left: 0, top: ScreenUtil().statusBarHeight, - child: BeeBackButton().material( + child: BeeBackButton(color: Colors.white).material( color: Colors.transparent, clipBehavior: Clip.antiAlias, borderRadius: BorderRadius.circular(24), @@ -47,7 +47,7 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate { return Positioned( bottom: 202.w - 195.w * _filterOffset(shrinkOffset), left: 32.w + (95.w - 32.w) * _offset(shrinkOffset), - child: '#$title'.text.bold.size(52.sp).make(), + child: '#$title'.text.bold.white.size(52.sp).make(), ); } @@ -57,7 +57,15 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate { left: 32.w, child: Opacity( opacity: 1 - _offset(shrinkOffset), - child: subTitle.text.size(24.sp).make(), + child: SizedBox( + width: 500.w, + child: subTitle.text + .size(24.sp) + .maxLines(2) + .white + .overflow(TextOverflow.ellipsis) + .make(), + ), ), ); } @@ -78,6 +86,13 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate { fit: BoxFit.cover, ), ), + Positioned( + left: 0, + right: 0, + top: 0, + bottom: 0, + child: Material(color: Colors.black.withOpacity(0.4)), + ), _buildOverlay(shrinkOffset), _buildBackButton(), _buildTitle(shrinkOffset),