diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index c948bc8f..46b34c20 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -12,7 +12,6 @@
-
@@ -20,7 +19,6 @@
"android.support.customtabs.action.CustomTabsService" />
-
@@ -34,7 +32,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
\ No newline at end of file
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 86cb7071..27baf9e5 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1,8 +1,6 @@
PODS:
- app_links (0.0.2):
- Flutter
- - appscheme (1.0.4):
- - Flutter
- audio_service (0.0.1):
- Flutter
- audio_session (0.0.1):
@@ -71,7 +69,6 @@ PODS:
DEPENDENCIES:
- app_links (from `.symlinks/plugins/app_links/ios`)
- - appscheme (from `.symlinks/plugins/appscheme/ios`)
- audio_service (from `.symlinks/plugins/audio_service/ios`)
- audio_session (from `.symlinks/plugins/audio_session/ios`)
- auto_orientation (from `.symlinks/plugins/auto_orientation/ios`)
@@ -110,8 +107,6 @@ SPEC REPOS:
EXTERNAL SOURCES:
app_links:
:path: ".symlinks/plugins/app_links/ios"
- appscheme:
- :path: ".symlinks/plugins/appscheme/ios"
audio_service:
:path: ".symlinks/plugins/audio_service/ios"
audio_session:
@@ -171,7 +166,6 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
app_links: e7a6750a915a9e161c58d91bc610e8cd1d4d0ad0
- appscheme: b1c3f8862331cb20430cf9e0e4af85dbc1572ad8
audio_service: f509d65da41b9521a61f1c404dd58651f265a567
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
diff --git a/lib/common/pages_bottom_sheet.dart b/lib/common/pages_bottom_sheet.dart
index dd8c5490..e4f23608 100644
--- a/lib/common/pages_bottom_sheet.dart
+++ b/lib/common/pages_bottom_sheet.dart
@@ -408,17 +408,29 @@ class TitleBar extends StatelessWidget {
toolbarHeight: 45,
automaticallyImplyLeading: false,
centerTitle: false,
- title: Text(
- title,
- style: Theme.of(context).textTheme.titleMedium,
+ elevation: 1,
+ scrolledUnderElevation: 1,
+ title: Padding(
+ padding: const EdgeInsets.only(left: 12),
+ child: Text(
+ title,
+ style: Theme.of(context).textTheme.titleMedium,
+ ),
),
actions: !isFullScreen
? [
- IconButton(
- icon: const Icon(Icons.close, size: 20),
- onPressed: () => Navigator.pop(context),
+ 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,
);
@@ -479,7 +491,7 @@ class EpisodeListItem extends StatelessWidget {
dense: false,
leading: isCurrentIndex
? Image.asset(
- 'assets/images/live.gif',
+ 'assets/images/live.png',
color: primary,
height: 12,
)
diff --git a/lib/http/danmaku.dart b/lib/http/danmaku.dart
index 2ed2a415..7b4283ae 100644
--- a/lib/http/danmaku.dart
+++ b/lib/http/danmaku.dart
@@ -17,7 +17,9 @@ class DanmakaHttp {
var response = await Request().get(
Api.webDanmaku,
data: params,
- extra: {'resType': ResponseType.bytes},
+ options: Options(
+ responseType: ResponseType.bytes,
+ ),
);
return DmSegMobileReply.fromBuffer(response.data);
}
diff --git a/lib/http/init.dart b/lib/http/init.dart
index e820102a..0868570f 100644
--- a/lib/http/init.dart
+++ b/lib/http/init.dart
@@ -209,24 +209,12 @@ class Request {
*/
get(url, {data, Options? options, cancelToken, extra}) async {
Response response;
- options ??= Options(); // 如果 options 为 null,则初始化一个新的 Options 对象
- ResponseType resType = ResponseType.json;
-
if (extra != null) {
- resType = extra['resType'] ?? ResponseType.json;
if (extra['ua'] != null) {
- options.headers = {'user-agent': headerUa(type: extra['ua'])};
- }
- if (extra['opus-goback'] != null) {
- if (extra['opus-goback'] != null) {
- String cookieHeader = dio.options.headers['cookie'];
- options.headers!['cookie'] =
- '$cookieHeader; opus-goback = ${extra['opus-goback']}';
- }
+ options ??= Options();
+ options.headers!['user-agent'] = headerUa(type: extra['ua']);
}
}
- options.responseType = resType;
-
try {
response = await dio.get(
url,
diff --git a/lib/http/read.dart b/lib/http/read.dart
index 5ea33519..f2542936 100644
--- a/lib/http/read.dart
+++ b/lib/http/read.dart
@@ -65,7 +65,12 @@ class ReadHttp {
static Future parseArticleCv({required String id}) async {
var res = await Request().get(
'https://www.bilibili.com/read/cv$id',
- extra: {'ua': 'pc', 'opus-goback': '1'},
+ extra: {'ua': 'pc'},
+ options: Options(
+ headers: {
+ 'cookie': 'opus-goback=1',
+ },
+ ),
);
String scriptContent =
extractScriptContents(parse(res.data).body!.outerHtml)[0];
diff --git a/lib/main.dart b/lib/main.dart
index 80dcf9f9..930b8f4b 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -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.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,
diff --git a/lib/models/video/reply/item.dart b/lib/models/video/reply/item.dart
index 1fa05bec..44a87af9 100644
--- a/lib/models/video/reply/item.dart
+++ b/lib/models/video/reply/item.dart
@@ -125,6 +125,7 @@ class ReplyControl {
this.upLike,
this.isShow,
this.entryText,
+ this.entryTextNum,
this.titleText,
this.time,
this.location,
@@ -135,6 +136,7 @@ class ReplyControl {
bool? upLike;
bool? isShow;
String? entryText;
+ int? entryTextNum;
String? titleText;
String? time;
String? location;
@@ -155,6 +157,10 @@ class ReplyControl {
}
entryText = json['sub_reply_entry_text'];
+ // 正则匹配
+ entryTextNum = json['sub_reply_entry_text'] != null
+ ? int.parse(RegExp(r"\d+").stringMatch(json['sub_reply_entry_text']!)!)
+ : 0;
titleText = json['sub_reply_title_text'];
time = json['time_desc'];
location = json['location'] != null ? json['location'].split(':')[1] : '';
diff --git a/lib/pages/about/index.dart b/lib/pages/about/index.dart
index 3a8e5a0a..c7cc2c59 100644
--- a/lib/pages/about/index.dart
+++ b/lib/pages/about/index.dart
@@ -39,9 +39,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: const Text('关于')),
body: SingleChildScrollView(
child: Column(
children: [
diff --git a/lib/pages/blacklist/index.dart b/lib/pages/blacklist/index.dart
index 96eff255..13bf2f9a 100644
--- a/lib/pages/blacklist/index.dart
+++ b/lib/pages/blacklist/index.dart
@@ -55,14 +55,9 @@ 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 == 0 ? '' : '- ${_blackListController.total.value}'}',
- style: Theme.of(context).textTheme.titleMedium,
),
),
),
diff --git a/lib/pages/dynamics/detail/controller.dart b/lib/pages/dynamics/detail/controller.dart
index 88c11f1d..a5f04bbe 100644
--- a/lib/pages/dynamics/detail/controller.dart
+++ b/lib/pages/dynamics/detail/controller.dart
@@ -123,4 +123,15 @@ class DynamicDetailController extends GetxController {
Future onLoad() async {
queryReplyList(reqType: 'onLoad');
}
+
+ Future removeReply(int? rpid, int? frpid) async {
+ // 移除一楼评论
+ if (rpid != null) {
+ replyList.removeWhere((item) {
+ return item.rpid == rpid;
+ });
+ }
+
+ /// TODO 移除二楼评论
+ }
}
diff --git a/lib/pages/dynamics/detail/view.dart b/lib/pages/dynamics/detail/view.dart
index e80befec..b1f9bea8 100644
--- a/lib/pages/dynamics/detail/view.dart
+++ b/lib/pages/dynamics/detail/view.dart
@@ -111,14 +111,7 @@ class _DynamicDetailPageState extends State
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
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
- elevation: 0,
scrolledUnderElevation: 1,
- centerTitle: false,
- titleSpacing: 0,
title: StreamBuilder(
stream: titleStreamC.stream,
initialData: false,
@@ -335,6 +325,8 @@ class _DynamicDetailPageState extends State
.replies!
.add(replyItem);
},
+ onDelete:
+ _dynamicDetailController.removeReply,
);
}
},
diff --git a/lib/pages/dynamics/view.dart b/lib/pages/dynamics/view.dart
index 257ecd49..51368e2f 100644
--- a/lib/pages/dynamics/view.dart
+++ b/lib/pages/dynamics/view.dart
@@ -78,8 +78,6 @@ class _DynamicsPageState extends State
super.build(context);
return Scaffold(
appBar: AppBar(
- elevation: 0,
- scrolledUnderElevation: 0,
title: SizedBox(
height: 34,
child: Stack(
diff --git a/lib/pages/fan/view.dart b/lib/pages/fan/view.dart
index 67a1eddd..c8354815 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 9d7534f5..f85b2075 100644
--- a/lib/pages/fav/view.dart
+++ b/lib/pages/fav/view.dart
@@ -40,11 +40,8 @@ class _FavPageState extends State {
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
diff --git a/lib/pages/fav_edit/view.dart b/lib/pages/fav_edit/view.dart
index 3ef7cda3..2fecf070 100644
--- a/lib/pages/fav_edit/view.dart
+++ b/lib/pages/fav_edit/view.dart
@@ -19,8 +19,6 @@ class _FavEditPageState extends State {
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 {
style: Theme.of(context).textTheme.titleMedium,
),
),
- centerTitle: false,
actions: [
Obx(
() => _favEditController.privacy.value == 0
diff --git a/lib/pages/fav_search/view.dart b/lib/pages/fav_search/view.dart
index 2654ccb1..8c1d1faf 100644
--- a/lib/pages/fav_search/view.dart
+++ b/lib/pages/fav_search/view.dart
@@ -47,7 +47,6 @@ class _FavSearchPageState extends State {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
- titleSpacing: 0,
actions: [
IconButton(
onPressed: () => _favSearchCtr.submit(),
diff --git a/lib/pages/follow/view.dart b/lib/pages/follow/view.dart
index 9633e7f0..e512a3b0 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/follow_search/view.dart b/lib/pages/follow_search/view.dart
index 78cdb11d..11cf7abe 100644
--- a/lib/pages/follow_search/view.dart
+++ b/lib/pages/follow_search/view.dart
@@ -47,7 +47,6 @@ class _FollowSearchPageState extends State {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
- titleSpacing: 0,
actions: [
IconButton(
onPressed: reRequest,
diff --git a/lib/pages/history/view.dart b/lib/pages/history/view.dart
index f9695aed..0728401b 100644
--- a/lib/pages/history/view.dart
+++ b/lib/pages/history/view.dart
@@ -69,12 +69,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: const Text('观看记录'),
actions: [
IconButton(
onPressed: () => Get.toNamed('/historySearch'),
@@ -127,8 +122,6 @@ class _HistoryPageState extends State {
],
),
child2: AppBar(
- titleSpacing: 0,
- centerTitle: false,
leading: IconButton(
onPressed: () {
_historyController.enableMultiple.value = false;
@@ -143,7 +136,6 @@ class _HistoryPageState extends State {
title: Obx(
() => Text(
'已选择${_historyController.checkedCount.value}项',
- style: Theme.of(context).textTheme.titleMedium,
),
),
actions: [
diff --git a/lib/pages/history_search/view.dart b/lib/pages/history_search/view.dart
index f5bcae64..3914b43d 100644
--- a/lib/pages/history_search/view.dart
+++ b/lib/pages/history_search/view.dart
@@ -45,7 +45,6 @@ class _HistorySearchPageState extends State {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
- titleSpacing: 0,
actions: [
IconButton(
onPressed: () => _hisCtr.submit(),
diff --git a/lib/pages/home/view.dart b/lib/pages/home/view.dart
index 97378eaf..ca837aba 100644
--- a/lib/pages/home/view.dart
+++ b/lib/pages/home/view.dart
@@ -54,7 +54,6 @@ class _HomePageState extends State
backgroundColor: Colors.transparent,
appBar: AppBar(
toolbarHeight: 0,
- elevation: 0,
backgroundColor: Colors.transparent,
systemOverlayStyle: Platform.isAndroid
? SystemUiOverlayStyle(
diff --git a/lib/pages/home/widgets/app_bar.dart b/lib/pages/home/widgets/app_bar.dart
index 4bf5200a..8715a513 100644
--- a/lib/pages/home/widgets/app_bar.dart
+++ b/lib/pages/home/widgets/app_bar.dart
@@ -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,
),
],
),
diff --git a/lib/pages/html/view.dart b/lib/pages/html/view.dart
index 2c3075c8..31afcdaa 100644
--- a/lib/pages/html/view.dart
+++ b/lib/pages/html/view.dart
@@ -104,14 +104,7 @@ class _HtmlRenderPageState extends State
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
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 7a6fc424..8645c7ad 100644
--- a/lib/pages/later/view.dart
+++ b/lib/pages/later/view.dart
@@ -28,18 +28,12 @@ class _LaterPageState extends State {
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(
diff --git a/lib/pages/live_follow/view.dart b/lib/pages/live_follow/view.dart
index 2b116991..e58721e0 100644
--- a/lib/pages/live_follow/view.dart
+++ b/lib/pages/live_follow/view.dart
@@ -42,13 +42,8 @@ class _LiveFollowPageState extends State {
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(
diff --git a/lib/pages/live_room/view.dart b/lib/pages/live_room/view.dart
index 1e0814e9..11864391 100644
--- a/lib/pages/live_room/view.dart
+++ b/lib/pages/live_room/view.dart
@@ -259,8 +259,6 @@ class _LiveRoomPageState extends State
left: 0,
right: 0,
child: AppBar(
- centerTitle: false,
- titleSpacing: 0,
backgroundColor: Colors.transparent,
foregroundColor: Colors.white,
toolbarHeight: isPortrait ? 56 : 0,
diff --git a/lib/pages/live_room/widgets/bottom_control.dart b/lib/pages/live_room/widgets/bottom_control.dart
index aa3d51b8..0bd5cfac 100644
--- a/lib/pages/live_room/widgets/bottom_control.dart
+++ b/lib/pages/live_room/widgets/bottom_control.dart
@@ -47,10 +47,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/widgets/profile.dart b/lib/pages/member/widgets/profile.dart
index e06309d0..4ea267e5 100644
--- a/lib/pages/member/widgets/profile.dart
+++ b/lib/pages/member/widgets/profile.dart
@@ -122,7 +122,7 @@ class ProfilePanel extends StatelessWidget {
),
child: Row(children: [
Image.asset(
- 'assets/images/live.gif',
+ 'assets/images/live.png',
height: 10,
),
Text(
diff --git a/lib/pages/member_archive/view.dart b/lib/pages/member_archive/view.dart
index 6963dad6..d19bc74e 100644
--- a/lib/pages/member_archive/view.dart
+++ b/lib/pages/member_archive/view.dart
@@ -47,12 +47,9 @@ class _MemberArchivePageState extends State {
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: [
diff --git a/lib/pages/member_article/view.dart b/lib/pages/member_article/view.dart
index 2557beba..7cb45c43 100644
--- a/lib/pages/member_article/view.dart
+++ b/lib/pages/member_article/view.dart
@@ -48,12 +48,9 @@ class _MemberArticlePageState extends State {
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,
),
),
),
diff --git a/lib/pages/member_coin/widgets/item.dart b/lib/pages/member_coin/widgets/item.dart
index 6d732694..2a8014c4 100644
--- a/lib/pages/member_coin/widgets/item.dart
+++ b/lib/pages/member_coin/widgets/item.dart
@@ -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(
diff --git a/lib/pages/member_dynamics/view.dart b/lib/pages/member_dynamics/view.dart
index e6153b7b..d7031012 100644
--- a/lib/pages/member_dynamics/view.dart
+++ b/lib/pages/member_dynamics/view.dart
@@ -54,12 +54,9 @@ class _MemberDynamicsPageState extends State {
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,
),
),
),
diff --git a/lib/pages/member_search/view.dart b/lib/pages/member_search/view.dart
index 192c7346..438c17c8 100644
--- a/lib/pages/member_search/view.dart
+++ b/lib/pages/member_search/view.dart
@@ -49,7 +49,6 @@ class _MemberSearchPageState extends State
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
- titleSpacing: 0,
actions: [
IconButton(
onPressed: () => _memberSearchCtr.submit(),
diff --git a/lib/pages/member_seasons/view.dart b/lib/pages/member_seasons/view.dart
index 244b0a67..689ddd34 100644
--- a/lib/pages/member_seasons/view.dart
+++ b/lib/pages/member_seasons/view.dart
@@ -41,12 +41,7 @@ class _MemberSeasonsPageState extends State {
@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,
diff --git a/lib/pages/message/at/view.dart b/lib/pages/message/at/view.dart
index 542b894c..11fdb5b5 100644
--- a/lib/pages/message/at/view.dart
+++ b/lib/pages/message/at/view.dart
@@ -47,9 +47,7 @@ class _MessageAtPageState extends State {
@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');
diff --git a/lib/pages/message/like/view.dart b/lib/pages/message/like/view.dart
index c29a7cc8..f831282f 100644
--- a/lib/pages/message/like/view.dart
+++ b/lib/pages/message/like/view.dart
@@ -47,9 +47,7 @@ class _MessageLikePageState extends State {
@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');
diff --git a/lib/pages/message/reply/view.dart b/lib/pages/message/reply/view.dart
index 325b494f..408942fa 100644
--- a/lib/pages/message/reply/view.dart
+++ b/lib/pages/message/reply/view.dart
@@ -48,9 +48,7 @@ class _MessageReplyPageState extends State {
@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');
diff --git a/lib/pages/message/system/view.dart b/lib/pages/message/system/view.dart
index 8e62517d..66e60735 100644
--- a/lib/pages/message/system/view.dart
+++ b/lib/pages/message/system/view.dart
@@ -29,9 +29,7 @@ class _MessageSystemPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: AppBar(
- title: const Text('系统通知'),
- ),
+ appBar: AppBar(title: const Text('系统通知')),
body: RefreshIndicator(
onRefresh: () async {
await _messageSystemCtr.queryAndProcessMessages();
diff --git a/lib/pages/mine/view.dart b/lib/pages/mine/view.dart
index c2925f6e..390bbdc6 100644
--- a/lib/pages/mine/view.dart
+++ b/lib/pages/mine/view.dart
@@ -44,8 +44,6 @@ class _MinePageState extends State
super.build(context);
return Scaffold(
appBar: AppBar(
- scrolledUnderElevation: 0,
- elevation: 0,
actions: [
IconButton(
icon: const Icon(Icons.search_outlined),
@@ -355,7 +353,8 @@ class _MinePageState extends State
itemBuilder: (context, index) {
if (flag && index == favFolderList.length) {
return Padding(
- padding: const EdgeInsets.only(right: 14),
+ padding:
+ const EdgeInsets.only(right: 14, bottom: 70),
child: Center(
child: IconButton(
style: ButtonStyle(
@@ -488,7 +487,7 @@ class FavFolderItem extends StatelessWidget {
child: NetworkImgLayer(
src: item!.cover,
width: 180,
- height: 110,
+ height: MediaQuery.textScalerOf(context).scale(110),
),
),
),
diff --git a/lib/pages/mine_edit/view.dart b/lib/pages/mine_edit/view.dart
index 700c707e..22c548a7 100644
--- a/lib/pages/mine_edit/view.dart
+++ b/lib/pages/mine_edit/view.dart
@@ -23,9 +23,7 @@ class _MineEditPageState extends State {
@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(
diff --git a/lib/pages/rank/view.dart b/lib/pages/rank/view.dart
index cf7789a2..d5236d55 100644
--- a/lib/pages/rank/view.dart
+++ b/lib/pages/rank/view.dart
@@ -38,7 +38,6 @@ class _RankPageState extends State
backgroundColor: Colors.transparent,
appBar: AppBar(
toolbarHeight: 0,
- elevation: 0,
backgroundColor: Colors.transparent,
systemOverlayStyle: Platform.isAndroid
? SystemUiOverlayStyle(
diff --git a/lib/pages/search/view.dart b/lib/pages/search/view.dart
index 373edf15..b59520c7 100644
--- a/lib/pages/search/view.dart
+++ b/lib/pages/search/view.dart
@@ -49,7 +49,6 @@ class _SearchPageState extends State with RouteAware {
width: 1,
),
),
- titleSpacing: 0,
actions: [
IconButton(
onPressed: () => _searchController.submit(),
diff --git a/lib/pages/search_result/view.dart b/lib/pages/search_result/view.dart
index 9056905f..5bfb16fb 100644
--- a/lib/pages/search_result/view.dart
+++ b/lib/pages/search_result/view.dart
@@ -51,8 +51,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 44add757..07cd585a 100644
--- a/lib/pages/setting/extra_setting.dart
+++ b/lib/pages/setting/extra_setting.dart
@@ -131,14 +131,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: const Text('其他设置')),
body: ListView(
children: [
const SetSwitchItem(
diff --git a/lib/pages/setting/pages/color_select.dart b/lib/pages/setting/pages/color_select.dart
index e144eb88..83b329d0 100644
--- a/lib/pages/setting/pages/color_select.dart
+++ b/lib/pages/setting/pages/color_select.dart
@@ -38,10 +38,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: [
Obx(
diff --git a/lib/pages/setting/pages/logs.dart b/lib/pages/setting/pages/logs.dart
index f497aee5..29690a63 100644
--- a/lib/pages/setting/pages/logs.dart
+++ b/lib/pages/setting/pages/logs.dart
@@ -100,9 +100,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: const Text('日志'),
actions: [
PopupMenuButton(
onSelected: (String type) {
diff --git a/lib/pages/setting/pages/play_gesture_set.dart b/lib/pages/setting/pages/play_gesture_set.dart
index b901ade9..bad115a5 100644
--- a/lib/pages/setting/pages/play_gesture_set.dart
+++ b/lib/pages/setting/pages/play_gesture_set.dart
@@ -34,14 +34,7 @@ class _PlayGesturePageState 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: const Text('手势设置')),
body: ListView(
children: [
ListTile(
diff --git a/lib/pages/setting/pages/play_speed_set.dart b/lib/pages/setting/pages/play_speed_set.dart
index 4636d579..49a41a15 100644
--- a/lib/pages/setting/pages/play_speed_set.dart
+++ b/lib/pages/setting/pages/play_speed_set.dart
@@ -204,16 +204,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: const 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 bcf071dd..e191d8fd 100644
--- a/lib/pages/setting/play_setting.dart
+++ b/lib/pages/setting/play_setting.dart
@@ -67,14 +67,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: const Text('播放设置')),
body: ListView(
children: [
ListTile(
diff --git a/lib/pages/setting/privacy_setting.dart b/lib/pages/setting/privacy_setting.dart
index 493795c2..9b7f5f6e 100644
--- a/lib/pages/setting/privacy_setting.dart
+++ b/lib/pages/setting/privacy_setting.dart
@@ -32,14 +32,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: const Text('隐私设置')),
body: Column(
children: [
ListTile(
diff --git a/lib/pages/setting/recommend_setting.dart b/lib/pages/setting/recommend_setting.dart
index 91631db8..16d60d25 100644
--- a/lib/pages/setting/recommend_setting.dart
+++ b/lib/pages/setting/recommend_setting.dart
@@ -53,14 +53,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: const Text('推荐设置')),
body: ListView(
children: [
ListTile(
diff --git a/lib/pages/setting/style_setting.dart b/lib/pages/setting/style_setting.dart
index a94cef29..5b59397e 100644
--- a/lib/pages/setting/style_setting.dart
+++ b/lib/pages/setting/style_setting.dart
@@ -49,14 +49,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: const Text('外观设置')),
body: ListView(
children: [
Obx(
diff --git a/lib/pages/setting/view.dart b/lib/pages/setting/view.dart
index 19cdedaf..68e15ce1 100644
--- a/lib/pages/setting/view.dart
+++ b/lib/pages/setting/view.dart
@@ -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(
diff --git a/lib/pages/subscription/view.dart b/lib/pages/subscription/view.dart
index 1bd91cdc..2e265d37 100644
--- a/lib/pages/subscription/view.dart
+++ b/lib/pages/subscription/view.dart
@@ -40,12 +40,8 @@ class _SubPageState extends State {
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,
diff --git a/lib/pages/video/detail/introduction/widgets/fav_panel.dart b/lib/pages/video/detail/introduction/widgets/fav_panel.dart
index 4a8f57ed..b5ede124 100644
--- a/lib/pages/video/detail/introduction/widgets/fav_panel.dart
+++ b/lib/pages/video/detail/introduction/widgets/fav_panel.dart
@@ -30,8 +30,6 @@ class _FavPanelState extends State {
return Column(
children: [
AppBar(
- centerTitle: false,
- elevation: 0,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(20),
diff --git a/lib/pages/video/detail/introduction/widgets/group_panel.dart b/lib/pages/video/detail/introduction/widgets/group_panel.dart
index 1292bcdc..89b0c9a8 100644
--- a/lib/pages/video/detail/introduction/widgets/group_panel.dart
+++ b/lib/pages/video/detail/introduction/widgets/group_panel.dart
@@ -57,8 +57,6 @@ class _GroupPanelState extends State {
return Column(
children: [
AppBar(
- centerTitle: false,
- elevation: 0,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(20),
diff --git a/lib/pages/video/detail/introduction/widgets/page_panel.dart b/lib/pages/video/detail/introduction/widgets/page_panel.dart
index 96786804..400d8a62 100644
--- a/lib/pages/video/detail/introduction/widgets/page_panel.dart
+++ b/lib/pages/video/detail/introduction/widgets/page_panel.dart
@@ -156,7 +156,7 @@ class _PagesPanelState extends State {
children: [
if (isCurrentIndex) ...[
Image.asset(
- 'assets/images/live.gif',
+ 'assets/images/live.png',
color: Theme.of(context).colorScheme.primary,
height: 12,
),
diff --git a/lib/pages/video/detail/introduction/widgets/season_panel.dart b/lib/pages/video/detail/introduction/widgets/season_panel.dart
index e5a9ea84..d86394d2 100644
--- a/lib/pages/video/detail/introduction/widgets/season_panel.dart
+++ b/lib/pages/video/detail/introduction/widgets/season_panel.dart
@@ -101,7 +101,7 @@ class _SeasonPanelState extends State {
dense: false,
leading: isCurrentIndex
? Image.asset(
- 'assets/images/live.gif',
+ 'assets/images/live.png',
color: primary,
height: 12,
)
@@ -159,7 +159,7 @@ class _SeasonPanelState extends State {
),
const SizedBox(width: 15),
Image.asset(
- 'assets/images/live.gif',
+ 'assets/images/live.png',
color: Theme.of(context).colorScheme.primary,
height: 12,
),
diff --git a/lib/pages/video/detail/reply/controller.dart b/lib/pages/video/detail/reply/controller.dart
index ab4fc9e3..4af59b9d 100644
--- a/lib/pages/video/detail/reply/controller.dart
+++ b/lib/pages/video/detail/reply/controller.dart
@@ -132,4 +132,32 @@ class VideoReplyController extends GetxController {
queryReplyList(type: 'init');
});
}
+
+ // 移除评论
+ Future removeReply(int? rpid, int? frpid) async {
+ // 移除一楼评论
+ if (rpid != null) {
+ replyList.removeWhere((item) {
+ return item.rpid == rpid;
+ });
+ }
+ // 移除二楼评论
+ if (frpid != 0 && frpid != null) {
+ replyList.value = replyList.map((item) {
+ if (item.rpid! == frpid) {
+ item.replies!.removeWhere((reply) => reply.rpid == rpid);
+ // 【共xx条回复】
+ if (item.replyControl != null &&
+ item.replyControl!.entryTextNum! >= 1) {
+ item.replyControl!.entryTextNum =
+ item.replyControl!.entryTextNum! - 1;
+ item.rcount = item.replyControl!.entryTextNum;
+ }
+ return item;
+ } else {
+ return item;
+ }
+ }).toList();
+ }
+ }
}
diff --git a/lib/pages/video/detail/reply/view.dart b/lib/pages/video/detail/reply/view.dart
index 54372c5e..28d36979 100644
--- a/lib/pages/video/detail/reply/view.dart
+++ b/lib/pages/video/detail/reply/view.dart
@@ -242,10 +242,9 @@ class _VideoReplyPanelState extends State
.replyList[index],
showReplyRow: true,
replyLevel: replyLevel,
- replyReply: (replyItem, currentReply,
- loadMore) =>
- replyReply(replyItem, currentReply,
- loadMore),
+ replyReply: replyReply,
+ onDelete:
+ _videoReplyController.removeReply,
replyType: ReplyType.video,
);
}
diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart
index 84c0a62f..5d31858f 100644
--- a/lib/pages/video/detail/reply/widgets/reply_item.dart
+++ b/lib/pages/video/detail/reply/widgets/reply_item.dart
@@ -37,6 +37,7 @@ class ReplyItem extends StatelessWidget {
this.replyReply,
this.replyType,
this.replySave = false,
+ this.onDelete,
super.key,
});
final ReplyItemModel? replyItem;
@@ -46,6 +47,7 @@ class ReplyItem extends StatelessWidget {
final Function? replyReply;
final ReplyType? replyType;
final bool replySave;
+ final Function(int? rpid, int? frpid)? onDelete;
@override
Widget build(BuildContext context) {
@@ -75,6 +77,7 @@ class ReplyItem extends StatelessWidget {
item: replyItem,
mainFloor: true,
isOwner: isOwner,
+ onDelete: onDelete,
);
},
);
@@ -275,6 +278,7 @@ class ReplyItem extends StatelessWidget {
// f_rpid: replyItem!.rpid,
replyItem: replyItem,
replyReply: replyReply,
+ onDelete: onDelete,
),
),
],
@@ -371,15 +375,15 @@ class ReplyItemRow extends StatelessWidget {
super.key,
this.replies,
this.replyControl,
- // this.f_rpid,
this.replyItem,
this.replyReply,
+ this.onDelete,
});
final List? replies;
ReplyControl? replyControl;
- // int? f_rpid;
ReplyItemModel? replyItem;
Function? replyReply;
+ final Function(int? rpid, int? frpid)? onDelete;
@override
Widget build(BuildContext context) {
@@ -410,12 +414,18 @@ class ReplyItemRow extends StatelessWidget {
},
onLongPress: () {
feedBack();
+ final bool isOwner = int.parse(replyItem!.member!.mid!) ==
+ (GlobalDataCache().userInfo?.mid ?? -1);
showModalBottomSheet(
context: context,
useRootNavigator: true,
isScrollControlled: true,
builder: (context) {
- return MorePanel(item: replies![i]);
+ return MorePanel(
+ item: replies![i],
+ isOwner: isOwner,
+ onDelete: onDelete,
+ );
},
);
},
@@ -493,7 +503,7 @@ class ReplyItemRow extends StatelessWidget {
if (replyControl!.upReply!)
const TextSpan(text: 'up主等人 '),
TextSpan(
- text: replyControl!.entryText!,
+ text: '查看${replyControl!.entryTextNum}条回复',
style: TextStyle(
color: colorScheme.primary,
),
@@ -1019,11 +1029,13 @@ class MorePanel extends StatelessWidget {
final dynamic item;
final bool mainFloor;
final bool isOwner;
+ final Function(int? rpid, int? frpid)? onDelete;
const MorePanel({
super.key,
required this.item,
this.mainFloor = false,
this.isOwner = false,
+ this.onDelete,
});
Future menuActionHandler(String type) async {
@@ -1083,7 +1095,7 @@ class MorePanel extends StatelessWidget {
rpid: item.rpid!,
);
if (result['status']) {
- SmartDialog.showToast('评论删除成功,需手动刷新');
+ onDelete?.call(item.rpid!, item.root);
Get.back();
} else {
SmartDialog.showToast(result['msg']);
diff --git a/lib/pages/video/detail/reply_reply/controller.dart b/lib/pages/video/detail/reply_reply/controller.dart
index d0f67b80..2795b7a9 100644
--- a/lib/pages/video/detail/reply_reply/controller.dart
+++ b/lib/pages/video/detail/reply_reply/controller.dart
@@ -84,6 +84,16 @@ class VideoReplyReplyController extends GetxController {
return res;
}
+ // 移除评论
+ Future removeReply(int? rpid, int? frpid) async {
+ // 移除一楼评论
+ if (rpid != null) {
+ replyList.removeWhere((item) {
+ return item.rpid == rpid;
+ });
+ }
+ }
+
@override
void onClose() {
currentPage = 0;
diff --git a/lib/pages/video/detail/reply_reply/view.dart b/lib/pages/video/detail/reply_reply/view.dart
index 592ea684..c697349d 100644
--- a/lib/pages/video/detail/reply_reply/view.dart
+++ b/lib/pages/video/detail/reply_reply/view.dart
@@ -89,7 +89,6 @@ class _VideoReplyReplyPanelState extends State {
return AppBar(
toolbarHeight: 45,
automaticallyImplyLeading: false,
- centerTitle: false,
title: Text(
'评论详情',
style: Theme.of(context).textTheme.titleSmall,
@@ -118,6 +117,7 @@ class _VideoReplyReplyPanelState extends State {
},
replyType: widget.replyType,
replyReply: (replyItem) => replyReply(replyItem),
+ onDelete: _videoReplyReplyController.removeReply,
);
}
diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart
index a176841e..75f50b61 100644
--- a/lib/pages/video/detail/view.dart
+++ b/lib/pages/video/detail/view.dart
@@ -614,8 +614,6 @@ class _VideoDetailPageState extends State
builder: ((context, snapshot) {
return AppBar(
backgroundColor: Colors.black,
- elevation: 0,
- scrolledUnderElevation: 0,
);
}),
),
@@ -861,12 +859,8 @@ class _VideoDetailPageState extends State
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),
diff --git a/lib/pages/video/detail/widgets/app_bar.dart b/lib/pages/video/detail/widgets/app_bar.dart
index b16623ad..bf74ac13 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 f2857398..f22bf846 100644
--- a/lib/pages/video/detail/widgets/header_control.dart
+++ b/lib/pages/video/detail/widgets/header_control.dart
@@ -1155,10 +1155,7 @@ class _HeaderControlState 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/video/detail/widgets/watch_later_list.dart b/lib/pages/video/detail/widgets/watch_later_list.dart
index eda6cf3e..93326ec3 100644
--- a/lib/pages/video/detail/widgets/watch_later_list.dart
+++ b/lib/pages/video/detail/widgets/watch_later_list.dart
@@ -85,7 +85,6 @@ class _MediaListPanelState extends State {
AppBar(
toolbarHeight: 45,
automaticallyImplyLeading: false,
- centerTitle: false,
title: Text(
widget.panelTitle ?? '稍后再看',
style: Theme.of(context).textTheme.titleSmall,
diff --git a/lib/pages/webview/view.dart b/lib/pages/webview/view.dart
index cba40ad1..ec7e777d 100644
--- a/lib/pages/webview/view.dart
+++ b/lib/pages/webview/view.dart
@@ -19,12 +19,7 @@ class _WebviewPageState extends State {
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(
diff --git a/lib/pages/whisper/view.dart b/lib/pages/whisper/view.dart
index 721ffbe2..75e6e1c2 100644
--- a/lib/pages/whisper/view.dart
+++ b/lib/pages/whisper/view.dart
@@ -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 {
@override
Widget build(BuildContext context) {
return Scaffold(
- appBar: AppBar(
- title: const Text('消息'),
- ),
+ appBar: AppBar(title: const Text('消息')),
body: RefreshIndicator(
onRefresh: () async {
_whisperController.unread();
diff --git a/lib/utils/app_scheme.dart b/lib/utils/app_scheme.dart
index 70e7c79d..e1fc94e3 100644
--- a/lib/utils/app_scheme.dart
+++ b/lib/utils/app_scheme.dart
@@ -1,5 +1,4 @@
import 'package:app_links/app_links.dart';
-import 'package:appscheme/appscheme.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@@ -12,37 +11,20 @@ import 'utils.dart';
class PiliSchame {
static late AppLinks appLinks;
- static AppScheme appScheme = AppSchemeImpl.getInstance()!;
static Future init() async {
appLinks = AppLinks();
appLinks.uriLinkStream.listen((Uri uri) {
final String scheme = uri.scheme;
if (RegExp(r'^pili', caseSensitive: false).hasMatch(scheme)) {
piliScheme(uri);
- }
- });
-
- appScheme.getInitScheme().then((SchemeEntity? value) {
- if (value != null) {
- routePush(value);
- }
- });
-
- appScheme.getLatestScheme().then((SchemeEntity? value) {
- if (value != null) {
- routePush(value);
- }
- });
-
- appScheme.registerSchemeListener().listen((SchemeEntity? event) {
- if (event != null) {
- routePush(event);
+ } else {
+ routePush(uri);
}
});
}
/// 路由跳转
- static void routePush(value) async {
+ static void routePush(Uri value) async {
final String scheme = value.scheme;
if (scheme == 'bilibili') {
biliScheme(value);
@@ -212,9 +194,9 @@ class PiliSchame {
}
}
- static Future biliScheme(SchemeEntity value) async {
- final String host = value.host!;
- final String path = value.path!;
+ static Future biliScheme(Uri value) async {
+ final String host = value.host;
+ final String path = value.path;
switch (host) {
case 'root':
Navigator.popUntil(
diff --git a/pubspec.lock b/pubspec.lock
index b0839e19..a3dd3af9 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -49,14 +49,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.4"
- appscheme:
- dependency: "direct main"
- description:
- name: appscheme
- sha256: b885b65219f3839ebafc937024a1bc5ce5a75b0e458fd249ef15e80e81235b6f
- url: "https://pub.flutter-io.cn"
- source: hosted
- version: "1.0.8"
archive:
dependency: transitive
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index db58395b..b2275398 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -111,7 +111,6 @@ dependencies:
# 高帧率
flutter_displaymode: ^0.6.0
# scheme跳转
- appscheme: ^1.0.8
app_links: ^6.3.2
# 弹幕
ns_danmaku: