From aaa9e45299146aab950c757c65d58a3c2d4b2fd2 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Wed, 30 Oct 2024 21:57:47 +0800 Subject: [PATCH] fix: fav --- .../introduction/widgets/create_fav_page.dart | 7 ++++- .../introduction/widgets/fav_panel.dart | 30 ++++++++++--------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/lib/pages/video/detail/introduction/widgets/create_fav_page.dart b/lib/pages/video/detail/introduction/widgets/create_fav_page.dart index e2a9f753..54f25879 100644 --- a/lib/pages/video/detail/introduction/widgets/create_fav_page.dart +++ b/lib/pages/video/detail/introduction/widgets/create_fav_page.dart @@ -315,7 +315,12 @@ class _CreateFavPageState extends State { children: [ TextSpan( text: '简介', - style: leadingStyle, + style: TextStyle( + fontSize: 14, + color: Theme.of(context) + .colorScheme + .onSurfaceVariant, + ), ), TextSpan( text: '*', diff --git a/lib/pages/video/detail/introduction/widgets/fav_panel.dart b/lib/pages/video/detail/introduction/widgets/fav_panel.dart index f923eb2f..ec1133af 100644 --- a/lib/pages/video/detail/introduction/widgets/fav_panel.dart +++ b/lib/pages/video/detail/introduction/widgets/fav_panel.dart @@ -64,20 +64,22 @@ class _FavPanelState extends State { TextButton.icon( onPressed: () { Get.toNamed('/createFav')?.then((data) { - (widget.ctr?.favFolderData.value as FavFolderData?) - ?.list - ?.insert( - 1, - FavFolderItemData( - id: data['id'], - fid: data['fid'], - attr: data['attr'], - title: data['title'], - favState: data['fav_state'], - mediaCount: data['media_count'], - ), - ); - widget.ctr?.favFolderData.refresh(); + if (data != null) { + (widget.ctr?.favFolderData.value as FavFolderData?) + ?.list + ?.insert( + 1, + FavFolderItemData( + id: data['id'], + fid: data['fid'], + attr: data['attr'], + title: data['title'], + favState: data['fav_state'], + mediaCount: data['media_count'], + ), + ); + widget.ctr?.favFolderData.refresh(); + } }); }, icon: Icon(