优化话题列表AppBar显示

hmxc
小赖 4 years ago
parent d0cf1b61e2
commit 6425e6956a

@ -22,7 +22,10 @@ import 'package:akuCommunity/utils/headers.dart';
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setSystemUIOverlayStyle( SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent), SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
systemNavigationBarColor: Colors.white,
),
); );
JPush jpush = new JPush(); JPush jpush = new JPush();
jpush.addEventHandler( jpush.addEventHandler(

@ -15,13 +15,7 @@ class _AgreementPageState extends State<AgreementPage> {
title: '用户协议', title: '用户协议',
body: SingleChildScrollView( body: SingleChildScrollView(
padding: EdgeInsets.all(16.w), padding: EdgeInsets.all(16.w),
child: Column( child: Text(
children: [
Text(
'《用户协议》',
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 35.w),
),
Text(
''' '''
使APP 使APP
使APP使 使APP使
@ -225,8 +219,6 @@ class _AgreementPageState extends State<AgreementPage> {
fontSize: 30.w, fontSize: 30.w,
), ),
), ),
],
),
), ),
); );
} }

@ -16,13 +16,7 @@ class _PrivacyPageState extends State<PrivacyPage> {
title: '隐私政策', title: '隐私政策',
body: SingleChildScrollView( body: SingleChildScrollView(
padding: EdgeInsets.all(16.sp), padding: EdgeInsets.all(16.sp),
child: Column( child: Text(
children: [
Text(
'小蜜蜂智慧社区隐私政策',
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 35.w),
),
Text(
''' '''
APPAPP便使使 APPAPP便使使
@ -128,8 +122,6 @@ class _PrivacyPageState extends State<PrivacyPage> {
fontSize: 30.w, fontSize: 30.w,
), ),
), ),
],
),
), ),
); );
} }

@ -99,6 +99,7 @@ class _TabNavigatorState extends State<TabNavigator>
bottomNavigationBar: StatefulBuilder(builder: (context, setFunc) { bottomNavigationBar: StatefulBuilder(builder: (context, setFunc) {
return BottomNavigationBar( return BottomNavigationBar(
items: _bottomNav, items: _bottomNav,
backgroundColor: Colors.white,
currentIndex: _currentIndex, currentIndex: _currentIndex,
selectedFontSize: 20.sp, selectedFontSize: 20.sp,
unselectedFontSize: 20.sp, unselectedFontSize: 20.sp,

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -31,7 +32,9 @@ class _TopicDetailPageState extends State<TopicDetailPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light,
child: Scaffold(
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
heroTag: 'event_add', heroTag: 'event_add',
onPressed: () async { onPressed: () async {
@ -83,6 +86,7 @@ class _TopicDetailPageState extends State<TopicDetailPage> {
); );
}, },
), ),
),
); );
} }
} }

@ -26,7 +26,7 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate {
top: 0, top: 0,
bottom: 0, bottom: 0,
child: Material( 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( return Positioned(
left: 0, left: 0,
top: ScreenUtil().statusBarHeight, top: ScreenUtil().statusBarHeight,
child: BeeBackButton().material( child: BeeBackButton(color: Colors.white).material(
color: Colors.transparent, color: Colors.transparent,
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
borderRadius: BorderRadius.circular(24), borderRadius: BorderRadius.circular(24),
@ -47,7 +47,7 @@ class TopicSliverHeader extends SliverPersistentHeaderDelegate {
return Positioned( return Positioned(
bottom: 202.w - 195.w * _filterOffset(shrinkOffset), bottom: 202.w - 195.w * _filterOffset(shrinkOffset),
left: 32.w + (95.w - 32.w) * _offset(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, left: 32.w,
child: Opacity( child: Opacity(
opacity: 1 - _offset(shrinkOffset), 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, fit: BoxFit.cover,
), ),
), ),
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 0,
child: Material(color: Colors.black.withOpacity(0.4)),
),
_buildOverlay(shrinkOffset), _buildOverlay(shrinkOffset),
_buildBackButton(), _buildBackButton(),
_buildTitle(shrinkOffset), _buildTitle(shrinkOffset),

Loading…
Cancel
Save