💄 Optimize app bar

This commit is contained in:
LittleSheep 2024-12-22 13:54:46 +08:00
parent 77e9994204
commit 95af7140cd
6 changed files with 131 additions and 117 deletions

View File

@ -57,7 +57,7 @@
"reply": "Reply",
"unset": "Unset",
"untitled": "Untitled",
"postDetail": "Post detail",
"postDetail": "Post Detail",
"postNoun": "Post",
"postReadMore": "Read more",
"postReadEstimate": "Est read time {}",

View File

@ -416,7 +416,7 @@
"accountStatus": "状态",
"accountStatusOnline": "在线",
"accountStatusOffline": "离线",
"accountStatusLastSeen": "最后一次在 {} 上线",
"accountStatusLastSeen": "最后一次上线于 {}",
"postArticle": "Solar Network 上的文章",
"postStory": "Solar Network 上的故事",
"articleWrittenAt": "发表于 {}",

View File

@ -416,7 +416,7 @@
"accountStatus": "狀態",
"accountStatusOnline": "在線",
"accountStatusOffline": "離線",
"accountStatusLastSeen": "最後一次在 {} 上線",
"accountStatusLastSeen": "最後一次上線於 {}",
"postArticle": "Solar Network 上的文章",
"postStory": "Solar Network 上的故事",
"articleWrittenAt": "發表於 {}",

View File

@ -416,7 +416,7 @@
"accountStatus": "狀態",
"accountStatusOnline": "線上",
"accountStatusOffline": "離線",
"accountStatusLastSeen": "最後一次在 {} 上線",
"accountStatusLastSeen": "最後一次上線於 {}",
"postArticle": "Solar Network 上的文章",
"postStory": "Solar Network 上的故事",
"articleWrittenAt": "發表於 {}",

View File

@ -228,7 +228,13 @@ class _UserScreenState extends State<UserScreen> with SingleTickerProviderStateM
body: CustomScrollView(
controller: _scrollController,
slivers: [
SliverAppBar(
Theme(
data: Theme.of(context).copyWith(
appBarTheme: Theme.of(context).appBarTheme.copyWith(
foregroundColor: Colors.white,
),
),
child: SliverAppBar(
expandedHeight: _appBarHeight,
title: _account == null
? Text('loading').tr()
@ -238,7 +244,7 @@ class _UserScreenState extends State<UserScreen> with SingleTickerProviderStateM
TextSpan(
text: _account!.nick,
style: Theme.of(context).textTheme.titleLarge!.copyWith(
color: Theme.of(context).appBarTheme.foregroundColor!,
color: Colors.white,
shadows: labelShadows,
),
),
@ -246,7 +252,7 @@ class _UserScreenState extends State<UserScreen> with SingleTickerProviderStateM
TextSpan(
text: '@${_account!.name}',
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: Theme.of(context).appBarTheme.foregroundColor!,
color: Colors.white,
shadows: labelShadows,
),
),
@ -288,6 +294,7 @@ class _UserScreenState extends State<UserScreen> with SingleTickerProviderStateM
)
: null,
),
),
if (_account != null)
SliverToBoxAdapter(
child: Column(

View File

@ -277,7 +277,13 @@ class _PostPublisherScreenState extends State<PostPublisherScreen> with SingleTi
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: MultiSliver(
children: [
SliverAppBar(
Theme(
data: Theme.of(context).copyWith(
appBarTheme: Theme.of(context).appBarTheme.copyWith(
foregroundColor: Colors.white,
),
),
child: SliverAppBar(
expandedHeight: _appBarHeight,
title: _publisher == null
? Text('loading').tr()
@ -287,7 +293,7 @@ class _PostPublisherScreenState extends State<PostPublisherScreen> with SingleTi
TextSpan(
text: _publisher!.nick,
style: Theme.of(context).textTheme.titleLarge!.copyWith(
color: Theme.of(context).appBarTheme.foregroundColor!,
color: Colors.white,
shadows: labelShadows,
),
),
@ -342,6 +348,7 @@ class _PostPublisherScreenState extends State<PostPublisherScreen> with SingleTi
)
: null,
),
),
if (_publisher != null)
SliverToBoxAdapter(
child: Container(