diff --git a/lib/main.dart b/lib/main.dart index b93deac8..770a9d8e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -160,10 +160,12 @@ class MyApp extends StatelessWidget { // showSemanticsDebugger: true, title: 'PiliPalaX', theme: _getThemeData( + context: context, colorScheme: lightColorScheme, isDynamic: lightDynamic != null && isDynamicColor, ), darkTheme: _getThemeData( + context: context, colorScheme: darkColorScheme, isDynamic: darkDynamic != null && isDynamicColor, ), @@ -199,6 +201,7 @@ class MyApp extends StatelessWidget { } ThemeData _getThemeData({ + required BuildContext context, required ColorScheme colorScheme, required bool isDynamic, }) { @@ -207,6 +210,14 @@ class MyApp extends StatelessWidget { return ThemeData( colorScheme: colorScheme, useMaterial3: true, + appBarTheme: AppBarTheme( + elevation: 0, + titleSpacing: 0, + centerTitle: false, + scrolledUnderElevation: 0, + backgroundColor: Platform.isIOS ? colorScheme.surface : null, + titleTextStyle: Theme.of(context).textTheme.titleMedium, + ), navigationBarTheme: NavigationBarThemeData( surfaceTintColor: surfaceTintColor, ), diff --git a/lib/pages/about/index.dart b/lib/pages/about/index.dart index 8095885b..460f1a8f 100644 --- a/lib/pages/about/index.dart +++ b/lib/pages/about/index.dart @@ -44,9 +44,7 @@ class _AboutPageState extends State { TextStyle subTitleStyle = TextStyle(fontSize: 13, color: Theme.of(context).colorScheme.outline); return Scaffold( - appBar: AppBar( - title: Text('关于', style: Theme.of(context).textTheme.titleMedium), - ), + appBar: AppBar(title: Text('关于')), body: ListView( children: [ ConstrainedBox( diff --git a/lib/pages/blacklist/index.dart b/lib/pages/blacklist/index.dart index 8508a5f8..3a2dcba6 100644 --- a/lib/pages/blacklist/index.dart +++ b/lib/pages/blacklist/index.dart @@ -51,15 +51,8 @@ class _BlackListPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - elevation: 0, - scrolledUnderElevation: 0, - titleSpacing: 0, - centerTitle: false, title: Obx( - () => Text( - '黑名单管理: ${_blackListController.total.value}', - style: Theme.of(context).textTheme.titleMedium, - ), + () => Text('黑名单管理: ${_blackListController.total.value}'), ), ), body: refreshIndicator( diff --git a/lib/pages/dynamics/detail/view.dart b/lib/pages/dynamics/detail/view.dart index 57ca3d94..2aeb67f4 100644 --- a/lib/pages/dynamics/detail/view.dart +++ b/lib/pages/dynamics/detail/view.dart @@ -112,14 +112,7 @@ class _DynamicDetailPageState extends State Get.to( () => Scaffold( resizeToAvoidBottomInset: false, - appBar: AppBar( - titleSpacing: 0, - centerTitle: false, - title: Text( - '评论详情', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('评论详情')), body: VideoReplyReplyPanel( id: id, oid: oid, @@ -192,11 +185,6 @@ class _DynamicDetailPageState extends State Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - elevation: 0, - scrolledUnderElevation: 0, - backgroundColor: Theme.of(context).colorScheme.surface, - centerTitle: false, - titleSpacing: 0, title: StreamBuilder( stream: titleStreamC.stream, initialData: false, @@ -322,15 +310,7 @@ class _DynamicDetailPageState extends State return SliverPersistentHeader( delegate: _MySliverPersistentHeaderDelegate( child: Container( - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, - border: Border( - top: BorderSide( - width: 0.6, - color: Theme.of(context).dividerColor.withOpacity(0.05), - ), - ), - ), + color: Theme.of(context).colorScheme.surface, height: 45, padding: const EdgeInsets.only(left: 12, right: 6), child: Row( diff --git a/lib/pages/fan/view.dart b/lib/pages/fan/view.dart index 3a093201..da4ae7ec 100644 --- a/lib/pages/fan/view.dart +++ b/lib/pages/fan/view.dart @@ -49,13 +49,8 @@ class _FansPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - elevation: 0, - scrolledUnderElevation: 0, - centerTitle: false, - titleSpacing: 0, title: Text( _fansController.isOwner.value ? '我的粉丝' : '${_fansController.name}的粉丝', - style: Theme.of(context).textTheme.titleMedium, ), ), body: refreshIndicator( diff --git a/lib/pages/fav/view.dart b/lib/pages/fav/view.dart index eae09df9..1ee01ffb 100644 --- a/lib/pages/fav/view.dart +++ b/lib/pages/fav/view.dart @@ -48,12 +48,7 @@ class _FavPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - '我的收藏', - style: Theme.of(context).textTheme.titleMedium, - ), + title: Text('我的收藏'), actions: [ IconButton( onPressed: () { diff --git a/lib/pages/fav_detail/view.dart b/lib/pages/fav_detail/view.dart index 6dcc00ef..77f59b7f 100644 --- a/lib/pages/fav_detail/view.dart +++ b/lib/pages/fav_detail/view.dart @@ -71,7 +71,6 @@ class _FavDetailPageState extends State { SliverAppBar( expandedHeight: 220 - MediaQuery.of(context).padding.top, pinned: true, - titleSpacing: 0, title: StreamBuilder( stream: titleStreamC.stream, initialData: false, diff --git a/lib/pages/fav_search/view.dart b/lib/pages/fav_search/view.dart index ccd29987..f8b19b00 100644 --- a/lib/pages/fav_search/view.dart +++ b/lib/pages/fav_search/view.dart @@ -48,8 +48,8 @@ class _FavSearchPageState extends State { @override Widget build(BuildContext context) { return Scaffold( + resizeToAvoidBottomInset: false, appBar: AppBar( - titleSpacing: 0, actions: [ IconButton( tooltip: '搜索', diff --git a/lib/pages/follow/view.dart b/lib/pages/follow/view.dart index 6efb5ce5..b50b8283 100644 --- a/lib/pages/follow/view.dart +++ b/lib/pages/follow/view.dart @@ -27,15 +27,10 @@ class _FollowPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - elevation: 0, - scrolledUnderElevation: 0, - titleSpacing: 0, - centerTitle: false, title: Text( _followController.isOwner.value ? '我的关注' : '${_followController.name}的关注', - style: Theme.of(context).textTheme.titleMedium, ), actions: [ IconButton( diff --git a/lib/pages/history/view.dart b/lib/pages/history/view.dart index c5c30309..7a634f26 100644 --- a/lib/pages/history/view.dart +++ b/lib/pages/history/view.dart @@ -73,12 +73,7 @@ class _HistoryPageState extends State { appBar: AppBarWidget( visible: _historyController.enableMultiple.value, child1: AppBar( - titleSpacing: 0, - centerTitle: false, - title: Text( - '观看记录', - style: Theme.of(context).textTheme.titleMedium, - ), + title: Text('观看记录'), actions: [ IconButton( tooltip: '搜索', @@ -134,8 +129,6 @@ class _HistoryPageState extends State { ], ), child2: AppBar( - titleSpacing: 0, - centerTitle: false, leading: IconButton( tooltip: '取消', onPressed: () { @@ -151,7 +144,6 @@ class _HistoryPageState extends State { title: Obx( () => Text( '已选择${_historyController.checkedCount.value}项', - style: Theme.of(context).textTheme.titleMedium, ), ), actions: [ diff --git a/lib/pages/home/view.dart b/lib/pages/home/view.dart index d21588c5..64c159bc 100644 --- a/lib/pages/home/view.dart +++ b/lib/pages/home/view.dart @@ -40,7 +40,7 @@ class _HomePageState extends State : Brightness.light, )); return Scaffold( - appBar: AppBar(toolbarHeight: 0, elevation: 0), + appBar: AppBar(toolbarHeight: 0), body: Column( children: [ if (!_homeController.useSideBar) diff --git a/lib/pages/home/widgets/app_bar.dart b/lib/pages/home/widgets/app_bar.dart index 9301e2f1..34359dd7 100644 --- a/lib/pages/home/widgets/app_bar.dart +++ b/lib/pages/home/widgets/app_bar.dart @@ -16,7 +16,6 @@ class HomeAppBar extends StatelessWidget { dynamic userInfo = userInfoCache.get('userInfoCache'); return SliverAppBar( // forceElevated: true, - scrolledUnderElevation: 0, toolbarHeight: MediaQuery.of(context).padding.top, expandedHeight: kToolbarHeight + MediaQuery.of(context).padding.top, automaticallyImplyLeading: false, @@ -29,7 +28,6 @@ class HomeAppBar extends StatelessWidget { background: Column( children: [ AppBar( - centerTitle: false, title: const Text( 'PiLiPaLa', style: TextStyle( @@ -95,8 +93,6 @@ class HomeAppBar extends StatelessWidget { const SizedBox(width: 10) ], - elevation: 0, - scrolledUnderElevation: 0, ), ], ), diff --git a/lib/pages/html/view.dart b/lib/pages/html/view.dart index d7ee52ca..ae9c6aca 100644 --- a/lib/pages/html/view.dart +++ b/lib/pages/html/view.dart @@ -115,12 +115,7 @@ class _HtmlRenderPageState extends State () => Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar( - titleSpacing: 0, - centerTitle: false, - title: Text( - '评论详情', - style: Theme.of(context).textTheme.titleMedium, - ), + title: Text('评论详情'), ), body: VideoReplyReplyPanel( id: id, @@ -138,12 +133,7 @@ class _HtmlRenderPageState extends State Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - title, - style: Theme.of(context).textTheme.titleMedium, - ), + title: Text(title), actions: [ const SizedBox(width: 4), IconButton( diff --git a/lib/pages/later/view.dart b/lib/pages/later/view.dart index b451da51..a2486412 100644 --- a/lib/pages/later/view.dart +++ b/lib/pages/later/view.dart @@ -24,12 +24,9 @@ class _LaterPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - titleSpacing: 0, - centerTitle: false, title: Obx( () => Text( '稍后再看${_laterController.count.value == -1 ? '' : ' (${_laterController.count.value})'}', - style: Theme.of(context).textTheme.titleMedium, ), ), actions: [ diff --git a/lib/pages/live_room/view.dart b/lib/pages/live_room/view.dart index d98e6ec0..fb62fb04 100644 --- a/lib/pages/live_room/view.dart +++ b/lib/pages/live_room/view.dart @@ -203,8 +203,6 @@ class _LiveRoomPageState extends State Column( children: [ AppBar( - centerTitle: false, - titleSpacing: 0, backgroundColor: Colors.transparent, foregroundColor: Colors.white, toolbarHeight: diff --git a/lib/pages/live_room/widgets/bottom_control.dart b/lib/pages/live_room/widgets/bottom_control.dart index a350fa30..d69e0a1c 100644 --- a/lib/pages/live_room/widgets/bottom_control.dart +++ b/lib/pages/live_room/widgets/bottom_control.dart @@ -45,10 +45,7 @@ class _BottomControlState extends State { return AppBar( backgroundColor: Colors.transparent, foregroundColor: Colors.white, - elevation: 0, - scrolledUnderElevation: 0, primary: false, - centerTitle: false, automaticallyImplyLeading: false, titleSpacing: 14, title: Row( diff --git a/lib/pages/member/new/member_page.dart b/lib/pages/member/new/member_page.dart index e4ec159c..e11ace7f 100644 --- a/lib/pages/member/new/member_page.dart +++ b/lib/pages/member/new/member_page.dart @@ -191,8 +191,6 @@ class _MemberPageNewState extends State ) : const SizedBox.shrink()), pinned: true, - backgroundColor: Theme.of(context).colorScheme.surface, - scrolledUnderElevation: 0, flexibleSpace: _buildUserInfo(_userController.loadingState.value, isV), bottom: needTab && (_userController.tab2?.length ?? -1) > 1 diff --git a/lib/pages/member/new/widget/edit_profile_page.dart b/lib/pages/member/new/widget/edit_profile_page.dart index 5eff4f93..b2a32e51 100644 --- a/lib/pages/member/new/widget/edit_profile_page.dart +++ b/lib/pages/member/new/widget/edit_profile_page.dart @@ -47,9 +47,7 @@ class _EditProfilePageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: const Text('账号资料'), - ), + appBar: AppBar(title: const Text('账号资料')), body: _buildBody(_loadingState), ); } diff --git a/lib/pages/member_archive/view.dart b/lib/pages/member_archive/view.dart index 270f0002..dcaa3dc3 100644 --- a/lib/pages/member_archive/view.dart +++ b/lib/pages/member_archive/view.dart @@ -54,9 +54,7 @@ class _MemberArchivePageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - titleSpacing: 0, - centerTitle: false, - title: Text('Ta的投稿', style: Theme.of(context).textTheme.titleMedium), + title: Text('Ta的投稿'), actions: [ Obx( () => TextButton.icon( diff --git a/lib/pages/member_dynamics/view.dart b/lib/pages/member_dynamics/view.dart index c555c42e..f7fd6352 100644 --- a/lib/pages/member_dynamics/view.dart +++ b/lib/pages/member_dynamics/view.dart @@ -47,12 +47,7 @@ class _MemberDynamicsPageState extends State super.build(context); return widget.mid == null ? Scaffold( - appBar: AppBar( - titleSpacing: 0, - centerTitle: false, - title: - Text('Ta的动态', style: Theme.of(context).textTheme.titleMedium), - ), + appBar: AppBar(title: Text('Ta的动态')), body: _buildBody, ) : _buildBody; diff --git a/lib/pages/member_search/view.dart b/lib/pages/member_search/view.dart index f665449a..58e37599 100644 --- a/lib/pages/member_search/view.dart +++ b/lib/pages/member_search/view.dart @@ -1,5 +1,4 @@ import 'package:easy_debounce/easy_throttle.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:PiliPalaX/common/skeleton/video_card_h.dart'; @@ -53,8 +52,8 @@ class _MemberSearchPageState extends State @override Widget build(BuildContext context) { return Scaffold( + resizeToAvoidBottomInset: false, appBar: AppBar( - titleSpacing: 0, actions: [ IconButton( tooltip: '搜索', @@ -86,8 +85,12 @@ class _MemberSearchPageState extends State body: Obx( () { if (_memberSearchCtr.loadingStatus.value == 'init') { - return Center( - child: Text('搜索「${_memberSearchCtr.uname.value}」的动态、视频'), + return FractionallySizedBox( + heightFactor: 0.5, + widthFactor: 1.0, + child: Center( + child: Text('搜索「${_memberSearchCtr.uname.value}」的动态、视频'), + ), ); } return CustomScrollView( diff --git a/lib/pages/member_seasons/view.dart b/lib/pages/member_seasons/view.dart index e1e32661..d9373fb8 100644 --- a/lib/pages/member_seasons/view.dart +++ b/lib/pages/member_seasons/view.dart @@ -47,11 +47,7 @@ class _MemberSeasonsPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - titleSpacing: 0, - centerTitle: false, - title: Text('Ta的专栏', style: Theme.of(context).textTheme.titleMedium), - ), + appBar: AppBar(title: Text('Ta的专栏')), body: Padding( padding: const EdgeInsets.only( left: StyleString.safeSpace, diff --git a/lib/pages/msg_feed_top/reply_me/view.dart b/lib/pages/msg_feed_top/reply_me/view.dart index 9eeba3ac..8bb5134f 100644 --- a/lib/pages/msg_feed_top/reply_me/view.dart +++ b/lib/pages/msg_feed_top/reply_me/view.dart @@ -46,9 +46,7 @@ class _ReplyMePageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: const Text('回复我的'), - ), + appBar: AppBar(title: const Text('回复我的')), body: refreshIndicator( onRefresh: () async { await _replyMeController.onRefresh(); diff --git a/lib/pages/search/view.dart b/lib/pages/search/view.dart index e60e12e3..022377b6 100644 --- a/lib/pages/search/view.dart +++ b/lib/pages/search/view.dart @@ -56,7 +56,6 @@ class _SearchPageState extends State with RouteAware { width: 1, ), ), - titleSpacing: 0, actions: [ IconButton( tooltip: '搜索', diff --git a/lib/pages/search_result/view.dart b/lib/pages/search_result/view.dart index 05140a7e..63ed7d56 100644 --- a/lib/pages/search_result/view.dart +++ b/lib/pages/search_result/view.dart @@ -48,8 +48,6 @@ class _SearchResultPageState extends State width: 1, ), ), - titleSpacing: 0, - centerTitle: false, title: GestureDetector( onTap: () => Get.back(), child: SizedBox( diff --git a/lib/pages/setting/extra_setting.dart b/lib/pages/setting/extra_setting.dart index 2fec2f02..bab3168b 100644 --- a/lib/pages/setting/extra_setting.dart +++ b/lib/pages/setting/extra_setting.dart @@ -135,14 +135,7 @@ class _ExtraSettingState extends State { .labelMedium! .copyWith(color: Theme.of(context).colorScheme.outline); return Scaffold( - appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - '其它设置', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('其它设置')), body: ListView( children: [ SetSwitchItem( diff --git a/lib/pages/setting/pages/color_select.dart b/lib/pages/setting/pages/color_select.dart index 33817d0a..04262bbf 100644 --- a/lib/pages/setting/pages/color_select.dart +++ b/lib/pages/setting/pages/color_select.dart @@ -66,10 +66,7 @@ class _ColorSelectPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - centerTitle: false, - title: const Text('选择应用主题'), - ), + appBar: AppBar(title: const Text('选择应用主题')), body: ListView( children: [ Builder( diff --git a/lib/pages/setting/pages/logs.dart b/lib/pages/setting/pages/logs.dart index 04a51369..53c5bfaa 100644 --- a/lib/pages/setting/pages/logs.dart +++ b/lib/pages/setting/pages/logs.dart @@ -104,9 +104,7 @@ class _LogsPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text('日志', style: Theme.of(context).textTheme.titleMedium), + title: Text('日志'), actions: [ PopupMenuButton( onSelected: (String type) { diff --git a/lib/pages/setting/pages/play_speed_set.dart b/lib/pages/setting/pages/play_speed_set.dart index 18749c1d..e703e462 100644 --- a/lib/pages/setting/pages/play_speed_set.dart +++ b/lib/pages/setting/pages/play_speed_set.dart @@ -201,16 +201,7 @@ class _PlaySpeedPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - elevation: 0, - scrolledUnderElevation: 0, - titleSpacing: 0, - centerTitle: false, - title: Text( - '倍速设置', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('倍速设置')), body: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/pages/setting/play_setting.dart b/lib/pages/setting/play_setting.dart index 56ae847f..69c87f9f 100644 --- a/lib/pages/setting/play_setting.dart +++ b/lib/pages/setting/play_setting.dart @@ -52,14 +52,7 @@ class _PlaySettingState extends State { .labelMedium! .copyWith(color: Theme.of(context).colorScheme.outline); return Scaffold( - appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - '播放器设置', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('播放器设置')), body: ListView( children: [ const SetSwitchItem( diff --git a/lib/pages/setting/privacy_setting.dart b/lib/pages/setting/privacy_setting.dart index cde9525d..2432aa2d 100644 --- a/lib/pages/setting/privacy_setting.dart +++ b/lib/pages/setting/privacy_setting.dart @@ -38,14 +38,7 @@ class _PrivacySettingState extends State { .labelMedium! .copyWith(color: Theme.of(context).colorScheme.outline); return Scaffold( - appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - '隐私设置', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('隐私设置')), body: Column( children: [ ListTile( diff --git a/lib/pages/setting/recommend_setting.dart b/lib/pages/setting/recommend_setting.dart index 415c21ad..5ac36621 100644 --- a/lib/pages/setting/recommend_setting.dart +++ b/lib/pages/setting/recommend_setting.dart @@ -55,14 +55,7 @@ class _RecommendSettingState extends State { .labelMedium! .copyWith(color: Theme.of(context).colorScheme.outline); return Scaffold( - appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - '推荐流设置', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('推荐流设置')), body: ListView( children: [ ListTile( diff --git a/lib/pages/setting/sponsor_block_page.dart b/lib/pages/setting/sponsor_block_page.dart index 2ab2d51c..d1ab37b2 100644 --- a/lib/pages/setting/sponsor_block_page.dart +++ b/lib/pages/setting/sponsor_block_page.dart @@ -354,14 +354,7 @@ class _SponsorBlockPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - 'Sponsor Block', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('Sponsor Block')), body: CustomScrollView( slivers: [ _dividerL, diff --git a/lib/pages/setting/style_setting.dart b/lib/pages/setting/style_setting.dart index 051681e2..9bb00799 100644 --- a/lib/pages/setting/style_setting.dart +++ b/lib/pages/setting/style_setting.dart @@ -55,14 +55,7 @@ class _StyleSettingState extends State { .labelMedium! .copyWith(color: Theme.of(context).colorScheme.outline); return Scaffold( - appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - '外观设置', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('外观设置')), body: ListView( children: [ SetSwitchItem( diff --git a/lib/pages/setting/video_setting.dart b/lib/pages/setting/video_setting.dart index 6425a974..448ddaad 100644 --- a/lib/pages/setting/video_setting.dart +++ b/lib/pages/setting/video_setting.dart @@ -54,14 +54,7 @@ class _VideoSettingState extends State { .labelMedium! .copyWith(color: Theme.of(context).colorScheme.outline); return Scaffold( - appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - '音视频设置', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('音视频设置')), body: ListView( children: [ const SetSwitchItem( diff --git a/lib/pages/setting/view.dart b/lib/pages/setting/view.dart index da7682a2..4e74b98a 100644 --- a/lib/pages/setting/view.dart +++ b/lib/pages/setting/view.dart @@ -14,14 +14,7 @@ class SettingPage extends StatelessWidget { .labelMedium! .copyWith(color: Theme.of(context).colorScheme.outline); return Scaffold( - appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - '设置', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('设置')), body: ListView( children: [ ListTile( diff --git a/lib/pages/subscription/view.dart b/lib/pages/subscription/view.dart index 34bfed58..df0b4e4e 100644 --- a/lib/pages/subscription/view.dart +++ b/lib/pages/subscription/view.dart @@ -44,14 +44,7 @@ class _SubPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - centerTitle: false, - titleSpacing: 0, - title: Text( - '我的订阅', - style: Theme.of(context).textTheme.titleMedium, - ), - ), + appBar: AppBar(title: Text('我的订阅')), body: FutureBuilder( future: _futureBuilderFuture, builder: (context, snapshot) { diff --git a/lib/pages/subscription_detail/view.dart b/lib/pages/subscription_detail/view.dart index cb8affdc..f819932d 100644 --- a/lib/pages/subscription_detail/view.dart +++ b/lib/pages/subscription_detail/view.dart @@ -70,7 +70,6 @@ class _SubDetailPageState extends State { SliverAppBar( expandedHeight: 260 - MediaQuery.of(context).padding.top, pinned: true, - titleSpacing: 0, title: StreamBuilder( stream: titleStreamC.stream, initialData: false, diff --git a/lib/pages/video/detail/introduction/widgets/fav_panel.dart b/lib/pages/video/detail/introduction/widgets/fav_panel.dart index ec1133af..62e352f5 100644 --- a/lib/pages/video/detail/introduction/widgets/fav_panel.dart +++ b/lib/pages/video/detail/introduction/widgets/fav_panel.dart @@ -51,15 +51,12 @@ class _FavPanelState extends State { top: Radius.circular(18), ), ), - centerTitle: false, - elevation: 0, leading: IconButton( tooltip: '关闭', onPressed: Get.back, icon: const Icon(Icons.close_outlined), ), - title: Text('添加到收藏夹', - style: Theme.of(context).textTheme.titleMedium), + title: Text('添加到收藏夹'), actions: [ TextButton.icon( onPressed: () { diff --git a/lib/pages/video/detail/introduction/widgets/group_panel.dart b/lib/pages/video/detail/introduction/widgets/group_panel.dart index 826758ae..c44c9f0a 100644 --- a/lib/pages/video/detail/introduction/widgets/group_panel.dart +++ b/lib/pages/video/detail/introduction/widgets/group_panel.dart @@ -90,14 +90,11 @@ class _GroupPanelState extends State { top: Radius.circular(18), ), ), - centerTitle: false, - elevation: 0, leading: IconButton( tooltip: '关闭', onPressed: Get.back, icon: const Icon(Icons.close_outlined)), - title: Text('设置关注分组', - style: Theme.of(context).textTheme.titleMedium), + title: Text('设置关注分组'), ), Expanded( child: Material( diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index c8fd3a63..81acca32 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -447,7 +447,6 @@ class _VideoDetailPageState extends State : AppBar( backgroundColor: showStatusBarBackgroundColor ? null : Colors.black, - elevation: 0, toolbarHeight: 0, systemOverlayStyle: SystemUiOverlayStyle( statusBarIconBrightness: @@ -835,7 +834,6 @@ class _VideoDetailPageState extends State : AppBar( backgroundColor: showStatusBarBackgroundColor ? null : Colors.black, - elevation: 0, toolbarHeight: 0, systemOverlayStyle: SystemUiOverlayStyle( statusBarIconBrightness: @@ -868,7 +866,6 @@ class _VideoDetailPageState extends State : AppBar( backgroundColor: showStatusBarBackgroundColor ? null : Colors.black, - elevation: 0, toolbarHeight: 0, systemOverlayStyle: SystemUiOverlayStyle( statusBarIconBrightness: @@ -933,8 +930,6 @@ class _VideoDetailPageState extends State child: AppBar( primary: false, foregroundColor: Colors.white, - elevation: 0, - scrolledUnderElevation: 0, backgroundColor: Colors.transparent, actions: (videoDetailController.userInfo == null) ? null diff --git a/lib/pages/video/detail/widgets/app_bar.dart b/lib/pages/video/detail/widgets/app_bar.dart index b267983e..f265c188 100644 --- a/lib/pages/video/detail/widgets/app_bar.dart +++ b/lib/pages/video/detail/widgets/app_bar.dart @@ -33,8 +33,6 @@ class ScrollAppBar extends StatelessWidget { padding: EdgeInsets.only(top: statusBarHeight), child: AppBar( primary: false, - elevation: 0, - scrolledUnderElevation: 0, centerTitle: true, title: TextButton( onPressed: () => callback(), diff --git a/lib/pages/video/detail/widgets/header_control.dart b/lib/pages/video/detail/widgets/header_control.dart index 3f7f6d01..0ad037e1 100644 --- a/lib/pages/video/detail/widgets/header_control.dart +++ b/lib/pages/video/detail/widgets/header_control.dart @@ -1339,12 +1339,8 @@ class _HeaderControlState extends State { return AppBar( backgroundColor: Colors.transparent, foregroundColor: Colors.white, - elevation: 0, - scrolledUnderElevation: 0, primary: false, - centerTitle: false, automaticallyImplyLeading: false, - titleSpacing: 10, title: Row( children: [ SizedBox( diff --git a/lib/pages/webview/view.dart b/lib/pages/webview/view.dart index c9324e83..21e83b48 100644 --- a/lib/pages/webview/view.dart +++ b/lib/pages/webview/view.dart @@ -26,13 +26,8 @@ class _WebviewPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - centerTitle: false, - titleSpacing: 0, title: Obx( - () => Text( - _webviewController.pageTitle.value, - style: Theme.of(context).textTheme.titleMedium, - ), + () => Text(_webviewController.pageTitle.value), ), actions: [ const SizedBox(width: 4), diff --git a/lib/pages/webview/webview_page.dart b/lib/pages/webview/webview_page.dart index 7b641872..009fe7c1 100644 --- a/lib/pages/webview/webview_page.dart +++ b/lib/pages/webview/webview_page.dart @@ -38,7 +38,6 @@ class _WebviewPageNewState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - titleSpacing: 0, title: StreamBuilder( initialData: null, stream: _titleStream.stream, diff --git a/lib/utils/app_scheme.dart b/lib/utils/app_scheme.dart index adeb2b33..c9348562 100644 --- a/lib/utils/app_scheme.dart +++ b/lib/utils/app_scheme.dart @@ -49,12 +49,7 @@ class PiliScheme { () => Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar( - titleSpacing: 0, - centerTitle: false, - title: Text( - '评论详情', - // style: Theme.of(context).textTheme.titleMedium, - ), + title: Text('评论详情'), actions: [ IconButton( tooltip: '前往原视频', @@ -139,12 +134,7 @@ class PiliScheme { () => Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar( - titleSpacing: 0, - centerTitle: false, - title: Text( - '评论详情', - // style: Theme.of(context).textTheme.titleMedium, - ), + title: Text('评论详情'), actions: [ IconButton( tooltip: '前往', @@ -184,12 +174,7 @@ class PiliScheme { () => Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar( - titleSpacing: 0, - centerTitle: false, - title: Text( - '评论详情', - // style: Theme.of(context).textTheme.titleMedium, - ), + title: Text('评论详情'), actions: [ IconButton( tooltip: '前往',