opt: AppBarTheme

This commit is contained in:
guozhigq
2024-11-16 11:31:53 +08:00
parent b332cef4a3
commit 908dd8c20d
56 changed files with 76 additions and 244 deletions

View File

@ -408,17 +408,29 @@ class TitleBar extends StatelessWidget {
toolbarHeight: 45,
automaticallyImplyLeading: false,
centerTitle: false,
title: Text(
elevation: 1,
scrolledUnderElevation: 1,
title: Padding(
padding: const EdgeInsets.only(left: 12),
child: Text(
title,
style: Theme.of(context).textTheme.titleMedium,
),
),
actions: !isFullScreen
? [
IconButton(
SizedBox(
width: 35,
height: 35,
child: IconButton(
icon: const Icon(Icons.close, size: 20),
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () => Navigator.pop(context),
),
const SizedBox(width: 14),
),
const SizedBox(width: 8),
]
: null,
);

View File

@ -222,13 +222,27 @@ class BuildMainApp extends StatelessWidget {
elevation: 20,
);
return GetMaterialApp(
title: 'PiliPala',
theme: ThemeData(
colorScheme: currentThemeValue == ThemeType.dark
? darkColorScheme
: lightColorScheme,
AppBarTheme appBarTheme(ColorScheme colorScheme) {
return AppBarTheme(
backgroundColor: currentThemeValue == ThemeType.dark
? darkColorScheme.surface
: lightColorScheme.surface,
foregroundColor: currentThemeValue == ThemeType.dark
? darkColorScheme.onSurface
: lightColorScheme.onSurface,
elevation: 0,
titleSpacing: 0,
scrolledUnderElevation: 0,
// titleTextStyle: TextStyle(
// fontSize: Theme.of(context).textTheme.titleLarge!.fontSize),
);
}
ThemeData buildThemeData(ColorScheme colorScheme) {
return ThemeData(
colorScheme: colorScheme,
snackBarTheme: snackBarTheme,
appBarTheme: appBarTheme(colorScheme),
pageTransitionsTheme: const PageTransitionsTheme(
builders: <TargetPlatform, PageTransitionsBuilder>{
TargetPlatform.android: ZoomPageTransitionsBuilder(
@ -236,12 +250,20 @@ class BuildMainApp extends StatelessWidget {
),
},
),
);
}
return GetMaterialApp(
title: 'PiliPala',
theme: buildThemeData(
currentThemeValue == ThemeType.dark
? darkColorScheme
: lightColorScheme,
),
darkTheme: ThemeData(
colorScheme: currentThemeValue == ThemeType.light
darkTheme: buildThemeData(
currentThemeValue == ThemeType.light
? lightColorScheme
: darkColorScheme,
snackBarTheme: snackBarTheme,
),
localizationsDelegates: const [
GlobalCupertinoLocalizations.delegate,

View File

@ -39,9 +39,7 @@ class _AboutPageState extends State<AboutPage> {
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: const Text('关于')),
body: SingleChildScrollView(
child: Column(
children: [

View File

@ -55,14 +55,9 @@ class _BlackListPageState extends State<BlackListPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0,
scrolledUnderElevation: 0,
titleSpacing: 0,
centerTitle: false,
title: Obx(
() => Text(
'黑名单管理 ${_blackListController.total.value == 0 ? '' : '- ${_blackListController.total.value}'}',
style: Theme.of(context).textTheme.titleMedium,
),
),
),

View File

@ -111,14 +111,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
int rpid = replyItem.rpid!;
Get.to(
() => Scaffold(
appBar: AppBar(
titleSpacing: 0,
centerTitle: false,
title: Text(
'评论详情',
style: Theme.of(context).textTheme.titleMedium,
),
),
appBar: AppBar(title: const Text('评论详情')),
body: VideoReplyReplyPanel(
oid: oid,
rpid: rpid,
@ -192,10 +185,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0,
scrolledUnderElevation: 1,
centerTitle: false,
titleSpacing: 0,
title: StreamBuilder(
stream: titleStreamC.stream,
initialData: false,

View File

@ -78,8 +78,6 @@ class _DynamicsPageState extends State<DynamicsPage>
super.build(context);
return Scaffold(
appBar: AppBar(
elevation: 0,
scrolledUnderElevation: 0,
title: SizedBox(
height: 34,
child: Stack(

View File

@ -49,13 +49,8 @@ class _FansPageState extends State<FansPage> {
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(

View File

@ -40,11 +40,8 @@ class _FavPageState extends State<FavPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: false,
titleSpacing: 0,
title: Obx(() => Text(
'${_favController.isOwner.value ? '' : 'Ta'}的收藏',
style: Theme.of(context).textTheme.titleMedium,
)),
actions: [
Obx(() => !_favController.isOwner.value

View File

@ -19,8 +19,6 @@ class _FavEditPageState extends State<FavEditPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0,
scrolledUnderElevation: 0,
title: Obx(
() => _favEditController.type.value == 'add'
? Text(
@ -32,7 +30,6 @@ class _FavEditPageState extends State<FavEditPage> {
style: Theme.of(context).textTheme.titleMedium,
),
),
centerTitle: false,
actions: [
Obx(
() => _favEditController.privacy.value == 0

View File

@ -47,7 +47,6 @@ class _FavSearchPageState extends State<FavSearchPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
titleSpacing: 0,
actions: [
IconButton(
onPressed: () => _favSearchCtr.submit(),

View File

@ -27,15 +27,10 @@ class _FollowPageState extends State<FollowPage> {
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(

View File

@ -47,7 +47,6 @@ class _FollowSearchPageState extends State<FollowSearchPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
titleSpacing: 0,
actions: [
IconButton(
onPressed: reRequest,

View File

@ -69,12 +69,7 @@ class _HistoryPageState extends State<HistoryPage> {
appBar: AppBarWidget(
visible: _historyController.enableMultiple.value,
child1: AppBar(
titleSpacing: 0,
centerTitle: false,
title: Text(
'观看记录',
style: Theme.of(context).textTheme.titleMedium,
),
title: const Text('观看记录'),
actions: [
IconButton(
onPressed: () => Get.toNamed('/historySearch'),
@ -127,8 +122,6 @@ class _HistoryPageState extends State<HistoryPage> {
],
),
child2: AppBar(
titleSpacing: 0,
centerTitle: false,
leading: IconButton(
onPressed: () {
_historyController.enableMultiple.value = false;
@ -143,7 +136,6 @@ class _HistoryPageState extends State<HistoryPage> {
title: Obx(
() => Text(
'已选择${_historyController.checkedCount.value}',
style: Theme.of(context).textTheme.titleMedium,
),
),
actions: [

View File

@ -45,7 +45,6 @@ class _HistorySearchPageState extends State<HistorySearchPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
titleSpacing: 0,
actions: [
IconButton(
onPressed: () => _hisCtr.submit(),

View File

@ -54,7 +54,6 @@ class _HomePageState extends State<HomePage>
backgroundColor: Colors.transparent,
appBar: AppBar(
toolbarHeight: 0,
elevation: 0,
backgroundColor: Colors.transparent,
systemOverlayStyle: Platform.isAndroid
? SystemUiOverlayStyle(

View File

@ -28,7 +28,6 @@ class HomeAppBar extends StatelessWidget {
background: Column(
children: [
AppBar(
centerTitle: false,
title: const Text(
'PiLiPaLa',
style: TextStyle(
@ -73,8 +72,6 @@ class HomeAppBar extends StatelessWidget {
const SizedBox(width: 10)
],
elevation: 0,
scrolledUnderElevation: 0,
),
],
),

View File

@ -104,14 +104,7 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
int rpid = replyItem.rpid!;
Get.to(
() => Scaffold(
appBar: AppBar(
titleSpacing: 0,
centerTitle: false,
title: Text(
'评论详情',
style: Theme.of(context).textTheme.titleMedium,
),
),
appBar: AppBar(title: const Text('评论详情')),
body: VideoReplyReplyPanel(
oid: oid,
rpid: rpid,
@ -127,12 +120,7 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
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(

View File

@ -28,18 +28,12 @@ class _LaterPageState extends State<LaterPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
titleSpacing: 0,
centerTitle: false,
title: Obx(
() => _laterController.laterList.isNotEmpty
? Text(
'稍后再看 (${_laterController.laterList.length})',
style: Theme.of(context).textTheme.titleMedium,
)
: Text(
'稍后再看',
style: Theme.of(context).textTheme.titleMedium,
),
: const Text('稍后再看'),
),
actions: [
Obx(

View File

@ -42,13 +42,8 @@ class _LiveFollowPageState extends State<LiveFollowPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0,
scrolledUnderElevation: 0,
titleSpacing: 0,
centerTitle: false,
title: Obx(() => Text(
'${_liveFollowController.liveFollowingCount}人正在直播中',
style: Theme.of(context).textTheme.titleMedium,
)),
),
body: Container(

View File

@ -259,8 +259,6 @@ class _LiveRoomPageState extends State<LiveRoomPage>
left: 0,
right: 0,
child: AppBar(
centerTitle: false,
titleSpacing: 0,
backgroundColor: Colors.transparent,
foregroundColor: Colors.white,
toolbarHeight: isPortrait ? 56 : 0,

View File

@ -47,10 +47,7 @@ class _BottomControlState extends State<BottomControl> {
return AppBar(
backgroundColor: Colors.transparent,
foregroundColor: Colors.white,
elevation: 0,
scrolledUnderElevation: 0,
primary: false,
centerTitle: false,
automaticallyImplyLeading: false,
titleSpacing: 14,
title: Row(

View File

@ -47,12 +47,9 @@ class _MemberArchivePageState extends State<MemberArchivePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
titleSpacing: 0,
centerTitle: false,
title: Obx(
() => Text(
'${_memberArchivesController.isOwner.value ? '' : 'Ta'}的投稿 - ${_memberArchivesController.currentOrder['label']}',
style: Theme.of(context).textTheme.titleMedium,
),
),
actions: [

View File

@ -48,12 +48,9 @@ class _MemberArticlePageState extends State<MemberArticlePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
titleSpacing: 0,
centerTitle: false,
title: Obx(
() => Text(
'${_memberArticleController.isOwner.value ? '' : 'Ta'}的图文',
style: Theme.of(context).textTheme.titleMedium,
),
),
),

View File

@ -20,7 +20,6 @@ class MemberCoinsItem extends StatelessWidget {
Widget build(BuildContext context) {
String heroTag = Utils.makeHeroTag(coinItem.aid);
return Card(
elevation: 0,
clipBehavior: Clip.hardEdge,
margin: EdgeInsets.zero,
child: InkWell(

View File

@ -54,12 +54,9 @@ class _MemberDynamicsPageState extends State<MemberDynamicsPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
titleSpacing: 0,
centerTitle: false,
title: Obx(
() => Text(
'${_memberDynamicController.isOwner.value ? '' : 'Ta'}的动态',
style: Theme.of(context).textTheme.titleMedium,
),
),
),

View File

@ -49,7 +49,6 @@ class _MemberSearchPageState extends State<MemberSearchPage>
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
titleSpacing: 0,
actions: [
IconButton(
onPressed: () => _memberSearchCtr.submit(),

View File

@ -41,12 +41,7 @@ class _MemberSeasonsPageState extends State<MemberSeasonsPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
titleSpacing: 0,
centerTitle: false,
title: Text(Get.parameters['seasonName']!,
style: Theme.of(context).textTheme.titleMedium),
),
appBar: AppBar(title: Text(Get.parameters['seasonName']!)),
body: Padding(
padding: const EdgeInsets.only(
left: StyleString.safeSpace,

View File

@ -47,9 +47,7 @@ class _MessageAtPageState extends State<MessageAtPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('@我的'),
),
appBar: AppBar(title: const Text('@我的')),
body: RefreshIndicator(
onRefresh: () async {
await _messageAtCtr.queryMessageAt(type: 'init');

View File

@ -47,9 +47,7 @@ class _MessageLikePageState extends State<MessageLikePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('收到的赞'),
),
appBar: AppBar(title: const Text('收到的赞')),
body: RefreshIndicator(
onRefresh: () async {
await _messageLikeCtr.queryMessageLike(type: 'init');

View File

@ -48,9 +48,7 @@ class _MessageReplyPageState extends State<MessageReplyPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('回复我的'),
),
appBar: AppBar(title: const Text('回复我的')),
body: RefreshIndicator(
onRefresh: () async {
await _messageReplyCtr.queryMessageReply(type: 'init');

View File

@ -29,9 +29,7 @@ class _MessageSystemPageState extends State<MessageSystemPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('系统通知'),
),
appBar: AppBar(title: const Text('系统通知')),
body: RefreshIndicator(
onRefresh: () async {
await _messageSystemCtr.queryAndProcessMessages();

View File

@ -44,8 +44,6 @@ class _MinePageState extends State<MinePage>
super.build(context);
return Scaffold(
appBar: AppBar(
scrolledUnderElevation: 0,
elevation: 0,
actions: [
IconButton(
icon: const Icon(Icons.search_outlined),

View File

@ -23,9 +23,7 @@ class _MineEditPageState extends State<MineEditPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('编辑资料'),
),
appBar: AppBar(title: const Text('编辑资料')),
body: SingleChildScrollView(
padding: const EdgeInsets.all(16.0),
child: FutureBuilder(

View File

@ -38,7 +38,6 @@ class _RankPageState extends State<RankPage>
backgroundColor: Colors.transparent,
appBar: AppBar(
toolbarHeight: 0,
elevation: 0,
backgroundColor: Colors.transparent,
systemOverlayStyle: Platform.isAndroid
? SystemUiOverlayStyle(

View File

@ -49,7 +49,6 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
width: 1,
),
),
titleSpacing: 0,
actions: [
IconButton(
onPressed: () => _searchController.submit(),

View File

@ -51,8 +51,6 @@ class _SearchResultPageState extends State<SearchResultPage>
width: 1,
),
),
titleSpacing: 0,
centerTitle: false,
title: GestureDetector(
onTap: () => Get.back(),
child: SizedBox(

View File

@ -131,14 +131,7 @@ class _ExtraSettingState extends State<ExtraSetting> {
.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: const Text('其他设置')),
body: ListView(
children: [
const SetSwitchItem(

View File

@ -38,10 +38,7 @@ class _ColorSelectPageState extends State<ColorSelectPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: false,
title: const Text('选择应用主题'),
),
appBar: AppBar(title: const Text('选择应用主题')),
body: ListView(
children: [
Obx(

View File

@ -100,9 +100,7 @@ class _LogsPageState extends State<LogsPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: false,
titleSpacing: 0,
title: Text('日志', style: Theme.of(context).textTheme.titleMedium),
title: const Text('日志'),
actions: [
PopupMenuButton<String>(
onSelected: (String type) {

View File

@ -34,14 +34,7 @@ class _PlayGesturePageState extends State<PlayGesturePage> {
.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: const Text('手势设置')),
body: ListView(
children: [
ListTile(

View File

@ -204,16 +204,7 @@ class _PlaySpeedPageState extends State<PlaySpeedPage> {
@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: const Text('倍速设置')),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

View File

@ -67,14 +67,7 @@ class _PlaySettingState extends State<PlaySetting> {
.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: const Text('播放设置')),
body: ListView(
children: [
ListTile(

View File

@ -32,14 +32,7 @@ class _PrivacySettingState extends State<PrivacySetting> {
.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: const Text('隐私设置')),
body: Column(
children: [
ListTile(

View File

@ -53,14 +53,7 @@ class _RecommendSettingState extends State<RecommendSetting> {
.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: const Text('推荐设置')),
body: ListView(
children: [
ListTile(

View File

@ -49,14 +49,7 @@ class _StyleSettingState extends State<StyleSetting> {
.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: const Text('外观设置')),
body: ListView(
children: [
Obx(

View File

@ -9,14 +9,7 @@ class SettingPage extends StatelessWidget {
Widget build(BuildContext context) {
final SettingController settingController = Get.put(SettingController());
return Scaffold(
appBar: AppBar(
centerTitle: false,
titleSpacing: 0,
title: Text(
'设置',
style: Theme.of(context).textTheme.titleMedium,
),
),
appBar: AppBar(title: const Text('设置')),
body: Column(
children: [
ListTile(

View File

@ -40,12 +40,8 @@ class _SubPageState extends State<SubPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: false,
titleSpacing: 0,
title: Obx(() => Text(
'${_subController.isOwner.value ? '' : 'Ta'}的订阅',
style: Theme.of(context).textTheme.titleMedium,
)),
title:
Obx(() => Text('${_subController.isOwner.value ? '' : 'Ta'}的订阅')),
),
body: FutureBuilder(
future: _futureBuilderFuture,

View File

@ -30,8 +30,6 @@ class _FavPanelState extends State<FavPanel> {
return Column(
children: [
AppBar(
centerTitle: false,
elevation: 0,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(20),

View File

@ -57,8 +57,6 @@ class _GroupPanelState extends State<GroupPanel> {
return Column(
children: <Widget>[
AppBar(
centerTitle: false,
elevation: 0,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(20),

View File

@ -89,7 +89,6 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
return AppBar(
toolbarHeight: 45,
automaticallyImplyLeading: false,
centerTitle: false,
title: Text(
'评论详情',
style: Theme.of(context).textTheme.titleSmall,

View File

@ -614,8 +614,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
builder: ((context, snapshot) {
return AppBar(
backgroundColor: Colors.black,
elevation: 0,
scrolledUnderElevation: 0,
);
}),
),
@ -861,12 +859,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
return AppBar(
backgroundColor: Colors.transparent, // 使背景透明
foregroundColor: Colors.white,
elevation: 0,
scrolledUnderElevation: 0,
primary: false,
centerTitle: false,
automaticallyImplyLeading: false,
titleSpacing: 0,
title: Container(
height: kToolbarHeight,
padding: const EdgeInsets.symmetric(horizontal: 14),

View File

@ -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(),

View File

@ -1155,10 +1155,7 @@ class _HeaderControlState extends State<HeaderControl> {
return AppBar(
backgroundColor: Colors.transparent,
foregroundColor: Colors.white,
elevation: 0,
scrolledUnderElevation: 0,
primary: false,
centerTitle: false,
automaticallyImplyLeading: false,
titleSpacing: 14,
title: Row(

View File

@ -85,7 +85,6 @@ class _MediaListPanelState extends State<MediaListPanel> {
AppBar(
toolbarHeight: 45,
automaticallyImplyLeading: false,
centerTitle: false,
title: Text(
widget.panelTitle ?? '稍后再看',
style: Theme.of(context).textTheme.titleSmall,

View File

@ -19,12 +19,7 @@ class _WebviewPageState extends State<WebviewPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: false,
titleSpacing: 0,
title: Text(
_webviewController.pageTitle,
style: Theme.of(context).textTheme.titleMedium,
),
title: Text(_webviewController.pageTitle),
actions: [
const SizedBox(width: 4),
IconButton(

View File

@ -1,6 +1,5 @@
import 'package:easy_debounce/easy_throttle.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:pilipala/common/constants.dart';
import 'package:pilipala/common/skeleton/skeleton.dart';
@ -45,9 +44,7 @@ class _WhisperPageState extends State<WhisperPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('消息'),
),
appBar: AppBar(title: const Text('消息')),
body: RefreshIndicator(
onRefresh: () async {
_whisperController.unread();