From a01d54cd80e606c43aa0f29de3026273957da51f Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Sun, 22 Dec 2024 10:42:00 +0800 Subject: [PATCH] Revert "mod: color alpha" This reverts commit a7ffc3b05fd712822fdbc2f125336516482d506c. --- android/app/build.gradle | 4 +- lib/common/skeleton/dynamic_card.dart | 4 +- lib/common/widgets/animated_dialog.dart | 2 +- .../widgets/audio_video_progress_bar.dart | 10 ++-- lib/common/widgets/badge.dart | 4 +- lib/common/widgets/custom_toast.dart | 2 +- .../interactiveviewer_gallery.dart | 2 +- lib/common/widgets/list_sheet.dart | 7 +-- lib/common/widgets/live_card.dart | 2 +- lib/common/widgets/network_img_layer.dart | 5 +- lib/common/widgets/overlay_pop.dart | 2 +- lib/common/widgets/segment_progress_bar.dart | 2 +- lib/common/widgets/stat/danmu.dart | 4 +- lib/common/widgets/stat/view.dart | 4 +- lib/common/widgets/video_card_v.dart | 4 +- .../widgets/video_card_v_member_home.dart | 4 +- .../introduction/widgets/intro_detail.dart | 2 +- .../dynamics/widgets/additional_panel.dart | 2 +- lib/pages/dynamics/widgets/dynamic_panel.dart | 4 +- .../dynamics/widgets/dynamic_panel_grpc.dart | 4 +- lib/pages/dynamics/widgets/forward_panel.dart | 4 +- lib/pages/dynamics/widgets/up_panel.dart | 2 +- lib/pages/emote/view.dart | 2 +- lib/pages/fav_detail/view.dart | 4 +- lib/pages/history/widgets/item.dart | 4 +- lib/pages/home/view.dart | 16 ++--- lib/pages/html/view.dart | 7 +-- lib/pages/later/view.dart | 4 +- lib/pages/live_room/view.dart | 2 +- lib/pages/login/view.dart | 22 +++---- lib/pages/main/view.dart | 6 +- lib/pages/media/view.dart | 8 +-- .../member/new/widget/edit_profile_page.dart | 4 +- .../member/new/widget/user_info_card.dart | 4 +- lib/pages/msg_feed_top/at_me/view.dart | 2 +- lib/pages/msg_feed_top/like_me/view.dart | 2 +- lib/pages/msg_feed_top/reply_me/view.dart | 2 +- lib/pages/msg_feed_top/sys_msg/view.dart | 4 +- lib/pages/search/view.dart | 2 +- .../search_panel/widgets/video_panel.dart | 12 +--- lib/pages/search_result/view.dart | 2 +- lib/pages/setting/pages/color_select.dart | 4 +- lib/pages/setting/pages/font_size_select.dart | 2 +- lib/pages/setting/recommend_setting.dart | 10 ++-- lib/pages/setting/sponsor_block_page.dart | 7 +-- lib/pages/subscription_detail/view.dart | 3 +- lib/pages/video/detail/controller.dart | 2 +- .../introduction/widgets/action_row_item.dart | 7 +-- .../introduction/widgets/fav_panel.dart | 2 +- .../introduction/widgets/group_panel.dart | 2 +- .../detail/introduction/widgets/menu_row.dart | 4 +- .../detail/reply/widgets/reply_item.dart | 11 ++-- .../detail/reply/widgets/reply_item_grpc.dart | 11 ++-- .../video/detail/reply_new/reply_page.dart | 2 +- lib/pages/video/detail/reply_new/view.dart | 2 +- lib/pages/video/detail/reply_reply/view.dart | 4 +- lib/pages/video/detail/view.dart | 10 ++-- lib/pages/video/detail/widgets/ai_detail.dart | 4 +- .../video/detail/widgets/header_control.dart | 2 +- lib/pages/whisper/view.dart | 2 +- .../whisper_detail/widget/chat_item.dart | 26 ++++---- lib/plugin/pl_player/view.dart | 8 +-- .../pl_player/widgets/bottom_control.dart | 4 +- pubspec.lock | 60 +++++++++---------- 64 files changed, 168 insertions(+), 210 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 581802e71..374570c46 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -35,7 +35,7 @@ def _keyAlias = System.getenv("KEY_ALIAS") ?: keystoreProperties["keyAlias"] def _keyPassword = System.getenv("KEY_PASSWORD") ?: keystoreProperties["keyPassword"] android { - compileSdkVersion 34 + compileSdkVersion flutter.compileSdkVersion namespace 'com.example.pilipalax' ndkVersion flutter.ndkVersion @@ -61,7 +61,7 @@ android { targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName - minSdkVersion 21 + minSdkVersion flutter.minSdkVersion multiDexEnabled true } diff --git a/lib/common/skeleton/dynamic_card.dart b/lib/common/skeleton/dynamic_card.dart index e5e4062dd..d816923f9 100644 --- a/lib/common/skeleton/dynamic_card.dart +++ b/lib/common/skeleton/dynamic_card.dart @@ -13,7 +13,7 @@ class DynamicCardSkeleton extends StatelessWidget { border: Border( bottom: BorderSide( width: 8, - color: Theme.of(context).dividerColor.withValues(alpha: 0.05), + color: Theme.of(context).dividerColor.withOpacity(0.05), ), ), ), @@ -102,7 +102,7 @@ class DynamicCardSkeleton extends StatelessWidget { foregroundColor: Theme.of(context) .colorScheme .outline - .withValues(alpha: 0.2), + .withOpacity(0.2), ), label: Text( i == 0 diff --git a/lib/common/widgets/animated_dialog.dart b/lib/common/widgets/animated_dialog.dart index d08301d9a..a2668e306 100644 --- a/lib/common/widgets/animated_dialog.dart +++ b/lib/common/widgets/animated_dialog.dart @@ -50,7 +50,7 @@ class AnimatedDialogState extends State @override Widget build(BuildContext context) { return Material( - color: Colors.black.withValues(alpha: opacityAnimation.value), + color: Colors.black.withOpacity(opacityAnimation.value), child: InkWell( highlightColor: Colors.transparent, splashColor: Colors.transparent, diff --git a/lib/common/widgets/audio_video_progress_bar.dart b/lib/common/widgets/audio_video_progress_bar.dart index c785e14d1..6e1307e55 100644 --- a/lib/common/widgets/audio_video_progress_bar.dart +++ b/lib/common/widgets/audio_video_progress_bar.dart @@ -267,10 +267,9 @@ class ProgressBar extends LeafRenderObjectWidget { onDragUpdate: onDragUpdate, onDragEnd: onDragEnd, barHeight: barHeight, - baseBarColor: baseBarColor ?? primaryColor.withValues(alpha: 0.24), + baseBarColor: baseBarColor ?? primaryColor.withOpacity(0.24), progressBarColor: progressBarColor ?? primaryColor, - bufferedBarColor: - bufferedBarColor ?? primaryColor.withValues(alpha: 0.24), + bufferedBarColor: bufferedBarColor ?? primaryColor.withOpacity(0.24), barCapShape: barCapShape, thumbRadius: thumbRadius, thumbColor: thumbColor ?? primaryColor, @@ -301,10 +300,9 @@ class ProgressBar extends LeafRenderObjectWidget { ..onDragUpdate = onDragUpdate ..onDragEnd = onDragEnd ..barHeight = barHeight - ..baseBarColor = baseBarColor ?? primaryColor.withValues(alpha: 0.24) + ..baseBarColor = baseBarColor ?? primaryColor.withOpacity(0.24) ..progressBarColor = progressBarColor ?? primaryColor - ..bufferedBarColor = - bufferedBarColor ?? primaryColor.withValues(alpha: 0.24) + ..bufferedBarColor = bufferedBarColor ?? primaryColor.withOpacity(0.24) ..barCapShape = barCapShape ..thumbRadius = thumbRadius ..thumbColor = thumbColor ?? primaryColor diff --git a/lib/common/widgets/badge.dart b/lib/common/widgets/badge.dart index 60ea427ef..1814b080a 100644 --- a/lib/common/widgets/badge.dart +++ b/lib/common/widgets/badge.dart @@ -38,11 +38,11 @@ class PBadge extends StatelessWidget { // 边框色 Color borderColor = Colors.transparent; if (type == 'gray') { - bgColor = Colors.black54.withValues(alpha: 0.4); + bgColor = Colors.black54.withOpacity(0.4); color = Colors.white; } if (type == 'color') { - bgColor = t.secondaryContainer.withValues(alpha: 0.5); + bgColor = t.secondaryContainer.withOpacity(0.5); color = t.onSecondaryContainer; } if (type == 'line') { diff --git a/lib/common/widgets/custom_toast.dart b/lib/common/widgets/custom_toast.dart index 0c72fae35..40998c456 100644 --- a/lib/common/widgets/custom_toast.dart +++ b/lib/common/widgets/custom_toast.dart @@ -21,7 +21,7 @@ class CustomToast extends StatelessWidget { color: Theme.of(context) .colorScheme .primaryContainer - .withValues(alpha: toastOpacity), + .withOpacity(toastOpacity), borderRadius: BorderRadius.circular(20), ), child: Text( diff --git a/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart b/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart index 19b856f16..991de6335 100644 --- a/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart +++ b/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart @@ -282,7 +282,7 @@ class _InteractiveviewerGalleryState extends State end: Alignment.bottomCenter, colors: [ Colors.transparent, - Colors.black.withValues(alpha: 0.3) + Colors.black.withOpacity(0.3) ], ), ) diff --git a/lib/common/widgets/list_sheet.dart b/lib/common/widgets/list_sheet.dart index a16ed27a3..1ee1839f1 100644 --- a/lib/common/widgets/list_sheet.dart +++ b/lib/common/widgets/list_sheet.dart @@ -334,7 +334,7 @@ class _ListSheetContentState extends State ), Divider( height: 1, - color: Theme.of(context).dividerColor.withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ), if (_isList) Material( @@ -346,8 +346,7 @@ class _ListSheetContentState extends State .map((item) => Tab(text: item.title)) .toList(), dividerHeight: 1, - dividerColor: - Theme.of(context).dividerColor.withValues(alpha: 0.1), + dividerColor: Theme.of(context).dividerColor.withOpacity(0.1), ), ), Expanded( @@ -408,7 +407,7 @@ class _ListSheetContentState extends State itemScrollController: itemScrollController[i ?? 0], separatorBuilder: (context, index) => Divider( height: 1, - color: Theme.of(context).dividerColor.withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ), ), ); diff --git a/lib/common/widgets/live_card.dart b/lib/common/widgets/live_card.dart index dd029269a..9d4d4e68c 100644 --- a/lib/common/widgets/live_card.dart +++ b/lib/common/widgets/live_card.dart @@ -21,7 +21,7 @@ class LiveCard extends StatelessWidget { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(0), side: BorderSide( - color: Theme.of(context).dividerColor.withValues(alpha: 0.08), + color: Theme.of(context).dividerColor.withOpacity(0.08), ), ), margin: EdgeInsets.zero, diff --git a/lib/common/widgets/network_img_layer.dart b/lib/common/widgets/network_img_layer.dart index 66031f5cf..1fb63a8de 100644 --- a/lib/common/widgets/network_img_layer.dart +++ b/lib/common/widgets/network_img_layer.dart @@ -114,10 +114,7 @@ class NetworkImgLayer extends StatelessWidget { height: height, clipBehavior: Clip.antiAlias, decoration: BoxDecoration( - color: Theme.of(context) - .colorScheme - .onInverseSurface - .withValues(alpha: 0.4), + color: Theme.of(context).colorScheme.onInverseSurface.withOpacity(0.4), borderRadius: BorderRadius.circular(type == 'avatar' ? 50 : type == 'emote' diff --git a/lib/common/widgets/overlay_pop.dart b/lib/common/widgets/overlay_pop.dart index ae5617825..e972cdc95 100644 --- a/lib/common/widgets/overlay_pop.dart +++ b/lib/common/widgets/overlay_pop.dart @@ -45,7 +45,7 @@ class OverlayPop extends StatelessWidget { width: 30, height: 30, decoration: BoxDecoration( - color: Colors.black.withValues(alpha: 0.3), + color: Colors.black.withOpacity(0.3), borderRadius: const BorderRadius.all(Radius.circular(20))), child: IconButton( diff --git a/lib/common/widgets/segment_progress_bar.dart b/lib/common/widgets/segment_progress_bar.dart index 710b49eef..8ec7e40f7 100644 --- a/lib/common/widgets/segment_progress_bar.dart +++ b/lib/common/widgets/segment_progress_bar.dart @@ -77,7 +77,7 @@ class SegmentProgressBar extends CustomPainter { size.width, 0, ), - Paint()..color = Colors.grey[600]!.withValues(alpha: 0.45), + Paint()..color = Colors.grey[600]!.withOpacity(0.45), ); } diff --git a/lib/common/widgets/stat/danmu.dart b/lib/common/widgets/stat/danmu.dart index 5677400d1..956913d9e 100644 --- a/lib/common/widgets/stat/danmu.dart +++ b/lib/common/widgets/stat/danmu.dart @@ -9,8 +9,8 @@ Widget statDanMu({ }) { Map colorObject = { 'white': Colors.white, - 'gray': Theme.of(context).colorScheme.outline.withValues(alpha: 0.8), - 'black': Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7), + 'gray': Theme.of(context).colorScheme.outline.withOpacity(0.8), + 'black': Theme.of(context).colorScheme.onSurface.withOpacity(0.7), }; Color color = colorObject[theme]!; return Row( diff --git a/lib/common/widgets/stat/view.dart b/lib/common/widgets/stat/view.dart index 5273dff2c..bbe0f41e4 100644 --- a/lib/common/widgets/stat/view.dart +++ b/lib/common/widgets/stat/view.dart @@ -10,8 +10,8 @@ Widget statView({ }) { Map colorObject = { 'white': Colors.white, - 'gray': Theme.of(context).colorScheme.outline.withValues(alpha: 0.8), - 'black': Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7), + 'gray': Theme.of(context).colorScheme.outline.withOpacity(0.8), + 'black': Theme.of(context).colorScheme.onSurface.withOpacity(0.7), }; Color color = colorObject[theme]!; return Row( diff --git a/lib/common/widgets/video_card_v.dart b/lib/common/widgets/video_card_v.dart index e0ebe245e..9e0182f02 100644 --- a/lib/common/widgets/video_card_v.dart +++ b/lib/common/widgets/video_card_v.dart @@ -327,7 +327,7 @@ class VideoCardV extends StatelessWidget { color: Theme.of(context) .colorScheme .outline - .withValues(alpha: 0.8), + .withOpacity(0.8), ), text: Utils.formatTimestampToRelativeTime(videoItem.pubdate)), @@ -349,7 +349,7 @@ class VideoCardV extends StatelessWidget { color: Theme.of(context) .colorScheme .outline - .withValues(alpha: 0.8), + .withOpacity(0.8), ), text: Utils.shortenChineseDateString( videoItem.desc.split(' · ').last)), diff --git a/lib/common/widgets/video_card_v_member_home.dart b/lib/common/widgets/video_card_v_member_home.dart index c64d60274..759ba1096 100644 --- a/lib/common/widgets/video_card_v_member_home.dart +++ b/lib/common/widgets/video_card_v_member_home.dart @@ -308,7 +308,7 @@ Widget videoContent(BuildContext context, Item videoItem) { // style: TextStyle( // fontSize: Theme.of(context).textTheme.labelSmall!.fontSize, // color: -// Theme.of(context).colorScheme.outline.withValues(alpha: 0.8), +// Theme.of(context).colorScheme.outline.withOpacity(0.8), // ), // text: Utils.formatTimestampToRelativeTime(videoItem.pubdate)), // )), @@ -326,7 +326,7 @@ Widget videoContent(BuildContext context, Item videoItem) { // style: TextStyle( // fontSize: Theme.of(context).textTheme.labelSmall!.fontSize, // color: -// Theme.of(context).colorScheme.outline.withValues(alpha: 0.8), +// Theme.of(context).colorScheme.outline.withOpacity(0.8), // ), // text: Utils.shortenChineseDateString( // videoItem.desc.split(' · ').last)), diff --git a/lib/pages/bangumi/introduction/widgets/intro_detail.dart b/lib/pages/bangumi/introduction/widgets/intro_detail.dart index 9e5d3c1fc..d8d15b2d6 100644 --- a/lib/pages/bangumi/introduction/widgets/intro_detail.dart +++ b/lib/pages/bangumi/introduction/widgets/intro_detail.dart @@ -39,7 +39,7 @@ class IntroDetail extends StatelessWidget { color: Theme.of(context) .colorScheme .onSecondaryContainer - .withValues(alpha: 0.5), + .withOpacity(0.5), borderRadius: const BorderRadius.all(Radius.circular(3))), ), ), diff --git a/lib/pages/dynamics/widgets/additional_panel.dart b/lib/pages/dynamics/widgets/additional_panel.dart index 568246588..e71f56b9f 100644 --- a/lib/pages/dynamics/widgets/additional_panel.dart +++ b/lib/pages/dynamics/widgets/additional_panel.dart @@ -18,7 +18,7 @@ Widget addWidget(item, context, type, {floor = 1}) { 'ADDITIONAL_TYPE_COMMON': item.modules.moduleDynamic.additional.common, }; Color bgColor = floor == 1 - ? Theme.of(context).dividerColor.withValues(alpha: 0.08) + ? Theme.of(context).dividerColor.withOpacity(0.08) : Theme.of(context).colorScheme.surface; switch (type) { case 'ADDITIONAL_TYPE_UGC': diff --git a/lib/pages/dynamics/widgets/dynamic_panel.dart b/lib/pages/dynamics/widgets/dynamic_panel.dart index d9545f796..923b69eb9 100644 --- a/lib/pages/dynamics/widgets/dynamic_panel.dart +++ b/lib/pages/dynamics/widgets/dynamic_panel.dart @@ -30,14 +30,14 @@ class DynamicPanel extends StatelessWidget { // border: Border( // bottom: BorderSide( // width: 8, - // color: Theme.of(context).dividerColor.withValues(alpha: 0.05), + // color: Theme.of(context).dividerColor.withOpacity(0.05), // ), // ), // ), child: Material( elevation: 0, clipBehavior: Clip.hardEdge, - color: Theme.of(context).cardColor.withValues(alpha: 0.5), + color: Theme.of(context).cardColor.withOpacity(0.5), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(5), ), diff --git a/lib/pages/dynamics/widgets/dynamic_panel_grpc.dart b/lib/pages/dynamics/widgets/dynamic_panel_grpc.dart index 6befc361a..9e193a3c3 100644 --- a/lib/pages/dynamics/widgets/dynamic_panel_grpc.dart +++ b/lib/pages/dynamics/widgets/dynamic_panel_grpc.dart @@ -29,14 +29,14 @@ class DynamicPanelGrpc extends StatelessWidget { // border: Border( // bottom: BorderSide( // width: 8, - // color: Theme.of(context).dividerColor.withValues(alpha: 0.05), + // color: Theme.of(context).dividerColor.withOpacity(0.05), // ), // ), // ), child: Material( elevation: 0, clipBehavior: Clip.hardEdge, - color: Theme.of(context).cardColor.withValues(alpha: 0.5), + color: Theme.of(context).cardColor.withOpacity(0.5), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(5), ), diff --git a/lib/pages/dynamics/widgets/forward_panel.dart b/lib/pages/dynamics/widgets/forward_panel.dart index 94eb3cac0..a08e7ca7b 100644 --- a/lib/pages/dynamics/widgets/forward_panel.dart +++ b/lib/pages/dynamics/widgets/forward_panel.dart @@ -131,7 +131,7 @@ Widget forWard(item, context, ctr, source, {floor = 1}) { // return Container( // padding: // const EdgeInsets.only(left: 10, top: 12, right: 10, bottom: 10), - // color: Theme.of(context).dividerColor.withValues(alpha: 0.08), + // color: Theme.of(context).dividerColor.withOpacity(0.08), // child: articlePanel(item, context, floor: floor)); // 转发 case 'DYNAMIC_TYPE_FORWARD': @@ -140,7 +140,7 @@ Widget forWard(item, context, ctr, source, {floor = 1}) { child: Container( padding: const EdgeInsets.only(left: 15, top: 10, right: 15, bottom: 8), - color: Theme.of(context).dividerColor.withValues(alpha: 0.08), + color: Theme.of(context).dividerColor.withOpacity(0.08), child: forWard(item.orig, context, ctr, source, floor: floor + 1), ), ); diff --git a/lib/pages/dynamics/widgets/up_panel.dart b/lib/pages/dynamics/widgets/up_panel.dart index ebcece2aa..528afa9bf 100644 --- a/lib/pages/dynamics/widgets/up_panel.dart +++ b/lib/pages/dynamics/widgets/up_panel.dart @@ -188,7 +188,7 @@ class _UpPanelState extends State { ? Theme.of(context) .colorScheme .secondaryContainer - .withValues(alpha: 0.7) + .withOpacity(0.7) : Theme.of(context).colorScheme.primary, child: data.face != '' ? NetworkImgLayer( diff --git a/lib/pages/emote/view.dart b/lib/pages/emote/view.dart index f8cb3d6ae..f701d53d8 100644 --- a/lib/pages/emote/view.dart +++ b/lib/pages/emote/view.dart @@ -91,7 +91,7 @@ class _EmotePanelState extends State ), Divider( height: 1, - color: Theme.of(context).dividerColor.withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ), TabBar( controller: _emotePanelController.tabController, diff --git a/lib/pages/fav_detail/view.dart b/lib/pages/fav_detail/view.dart index ed8c807b0..69ff9feba 100644 --- a/lib/pages/fav_detail/view.dart +++ b/lib/pages/fav_detail/view.dart @@ -365,7 +365,7 @@ class _FavDetailPageState extends State { StyleString.aspectRatio, decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), - color: Colors.black.withValues(alpha: 0.6), + color: Colors.black.withOpacity(0.6), ), child: SizedBox( width: 34, @@ -388,7 +388,7 @@ class _FavDetailPageState extends State { return Theme.of(context) .colorScheme .surface - .withValues(alpha: 0.8); + .withOpacity(0.8); }, ), ), diff --git a/lib/pages/history/widgets/item.dart b/lib/pages/history/widgets/item.dart index a766374e1..f38ea7559 100644 --- a/lib/pages/history/widgets/item.dart +++ b/lib/pages/history/widgets/item.dart @@ -233,7 +233,7 @@ class HistoryItem extends StatelessWidget { alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Colors.black.withValues(alpha: 0.6), + color: Colors.black.withOpacity(0.6), ), child: SizedBox( width: 34, @@ -253,7 +253,7 @@ class HistoryItem extends StatelessWidget { return Theme.of(context) .colorScheme .surface - .withValues(alpha: 0.8); + .withOpacity(0.8); }, ), ), diff --git a/lib/pages/home/view.dart b/lib/pages/home/view.dart index 9259931a9..2ec69e912 100644 --- a/lib/pages/home/view.dart +++ b/lib/pages/home/view.dart @@ -179,7 +179,7 @@ class SearchBarAndUser extends StatelessWidget { splashColor: Theme.of(context) .colorScheme .primaryContainer - .withValues(alpha: 0.3), + .withOpacity(0.3), borderRadius: const BorderRadius.all( Radius.circular(50), ), @@ -228,7 +228,7 @@ class UserAndSearchVertical extends StatelessWidget { splashColor: Theme.of(context) .colorScheme .primaryContainer - .withValues(alpha: 0.3), + .withOpacity(0.3), borderRadius: const BorderRadius.all( Radius.circular(50), ), @@ -361,14 +361,14 @@ class CustomChip extends StatelessWidget { return InputChip( side: selected ? BorderSide( - color: colorScheme.secondary.withValues(alpha: 0.2), + color: colorScheme.secondary.withOpacity(0.2), width: 2, ) : BorderSide.none, - // backgroundColor: colorTheme.primaryContainer.withValues(alpha: 0.1), - // selectedColor: colorTheme.secondaryContainer.withValues(alpha: 0.8), + // backgroundColor: colorTheme.primaryContainer.withOpacity(0.1), + // selectedColor: colorTheme.secondaryContainer.withOpacity(0.8), color: WidgetStateProperty.resolveWith((Set states) { - return colorTheme.secondaryContainer.withValues(alpha: 0.6); + return colorTheme.secondaryContainer.withOpacity(0.6); }), padding: const EdgeInsets.fromLTRB(6, 1, 6, 1), label: Text(label, style: chipTextStyle), @@ -400,9 +400,9 @@ class SearchBar extends StatelessWidget { borderRadius: BorderRadius.circular(25), ), child: Material( - color: colorScheme.onSecondaryContainer.withValues(alpha: 0.05), + color: colorScheme.onSecondaryContainer.withOpacity(0.05), child: InkWell( - splashColor: colorScheme.primaryContainer.withValues(alpha: 0.3), + splashColor: colorScheme.primaryContainer.withOpacity(0.3), onTap: () => Get.toNamed( '/search', parameters: {'hintText': ctr!.defaultSearch.value}, diff --git a/lib/pages/html/view.dart b/lib/pages/html/view.dart index 73229cc68..1db362b98 100644 --- a/lib/pages/html/view.dart +++ b/lib/pages/html/view.dart @@ -296,7 +296,7 @@ class _HtmlRenderPageState extends State thickness: 8, color: Theme.of(context) .dividerColor - .withValues(alpha: 0.05), + .withOpacity(0.05), ), ), ), @@ -318,9 +318,8 @@ class _HtmlRenderPageState extends State if (orientation == Orientation.landscape) ...[ VerticalDivider( thickness: 8, - color: Theme.of(context) - .dividerColor - .withValues(alpha: 0.05)), + color: + Theme.of(context).dividerColor.withOpacity(0.05)), Expanded( flex: _ratio[1].toInt(), child: CustomScrollView( diff --git a/lib/pages/later/view.dart b/lib/pages/later/view.dart index c903c19ef..ca23f038b 100644 --- a/lib/pages/later/view.dart +++ b/lib/pages/later/view.dart @@ -178,7 +178,7 @@ class _LaterPageState extends State { StyleString.aspectRatio, decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), - color: Colors.black.withValues(alpha: 0.6), + color: Colors.black.withOpacity(0.6), ), child: SizedBox( width: 34, @@ -198,7 +198,7 @@ class _LaterPageState extends State { return Theme.of(context) .colorScheme .surface - .withValues(alpha: 0.8); + .withOpacity(0.8); }, ), ), diff --git a/lib/pages/live_room/view.dart b/lib/pages/live_room/view.dart index 9fc2fb88b..e40f78d03 100644 --- a/lib/pages/live_room/view.dart +++ b/lib/pages/live_room/view.dart @@ -405,7 +405,7 @@ class _LiveRoomPageState extends State border: InputBorder.none, hintText: '发送弹幕', hintStyle: TextStyle( - color: Colors.white.withValues(alpha: 0.6), + color: Colors.white.withOpacity(0.6), ), ), ), diff --git a/lib/pages/login/view.dart b/lib/pages/login/view.dart index bb7c65169..0c82457aa 100644 --- a/lib/pages/login/view.dart +++ b/lib/pages/login/view.dart @@ -126,7 +126,7 @@ class _LoginPageState extends State { color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.4), + .withOpacity(0.4), ), ), ), @@ -138,7 +138,7 @@ class _LoginPageState extends State { color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.4)))), + .withOpacity(0.4)))), ], ); } @@ -278,7 +278,7 @@ class _LoginPageState extends State { color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.4)))), + .withOpacity(0.4)))), ], ); } @@ -294,10 +294,8 @@ class _LoginPageState extends State { child: Container( decoration: UnderlineTabIndicator( borderSide: BorderSide( - color: Theme.of(context) - .colorScheme - .outline - .withValues(alpha: 0.4)), + color: + Theme.of(context).colorScheme.outline.withOpacity(0.4)), ), child: Row( children: [ @@ -339,7 +337,7 @@ class _LoginPageState extends State { color: Theme.of(context) .colorScheme .outline - .withValues(alpha: 0.5), + .withOpacity(0.5), ), ), const SizedBox(width: 6), @@ -367,10 +365,8 @@ class _LoginPageState extends State { child: Container( decoration: UnderlineTabIndicator( borderSide: BorderSide( - color: Theme.of(context) - .colorScheme - .outline - .withValues(alpha: 0.4)), + color: + Theme.of(context).colorScheme.outline.withOpacity(0.4)), ), child: Row( children: [ @@ -418,7 +414,7 @@ class _LoginPageState extends State { color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.4)))), + .withOpacity(0.4)))), ], ); } diff --git a/lib/pages/main/view.dart b/lib/pages/main/view.dart index a50474f38..006ad3872 100644 --- a/lib/pages/main/view.dart +++ b/lib/pages/main/view.dart @@ -227,10 +227,8 @@ class _MainAppState extends State width: 1, indent: MediaQuery.of(context).padding.top, endIndent: MediaQuery.of(context).padding.bottom, - color: Theme.of(context) - .colorScheme - .outline - .withValues(alpha: 0.06), + color: + Theme.of(context).colorScheme.outline.withOpacity(0.06), ), Expanded( child: PageView( diff --git a/lib/pages/media/view.dart b/lib/pages/media/view.dart index daba4fcda..8389ca70f 100644 --- a/lib/pages/media/view.dart +++ b/lib/pages/media/view.dart @@ -131,7 +131,7 @@ class _MediaPageState extends State children: [ Divider( height: 20, - color: Theme.of(context).dividerColor.withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ), ListTile( onTap: () async { @@ -214,7 +214,7 @@ class _MediaPageState extends State return Theme.of(context) .colorScheme .primaryContainer - .withValues(alpha: 0.5); + .withOpacity(0.5); }), ), onPressed: () async { @@ -302,13 +302,13 @@ class FavFolderItem extends StatelessWidget { color: Theme.of(context) .colorScheme .onInverseSurface - .withValues(alpha: 0.4), + .withOpacity(0.4), boxShadow: [ BoxShadow( color: Theme.of(context) .colorScheme .onInverseSurface - .withValues(alpha: 0.4), + .withOpacity(0.4), offset: const Offset(4, -12), // 阴影与容器的距离 blurRadius: 0.0, // 高斯的标准偏差与盒子的形状卷积。 spreadRadius: 0.0, // 在应用模糊之前,框应该膨胀的量。 diff --git a/lib/pages/member/new/widget/edit_profile_page.dart b/lib/pages/member/new/widget/edit_profile_page.dart index 43ff8ac6e..eef997a81 100644 --- a/lib/pages/member/new/widget/edit_profile_page.dart +++ b/lib/pages/member/new/widget/edit_profile_page.dart @@ -90,12 +90,12 @@ class _EditProfilePageState extends State { Widget get _divider => Divider( height: 1, - color: Theme.of(context).dividerColor.withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ); Widget get _divider1 => Divider( thickness: 16, - color: Theme.of(context).dividerColor.withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ); Widget _buildBody(LoadingState loadingState) { diff --git a/lib/pages/member/new/widget/user_info_card.dart b/lib/pages/member/new/widget/user_info_card.dart index b53e274f7..5d1c30560 100644 --- a/lib/pages/member/new/widget/user_info_card.dart +++ b/lib/pages/member/new/widget/user_info_card.dart @@ -208,7 +208,7 @@ class UserInfoCard extends StatelessWidget { color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.7), + .withOpacity(0.7), ), ) ], @@ -328,7 +328,7 @@ class UserInfoCard extends StatelessWidget { color: Theme.of(context) .colorScheme .outline - .withValues(alpha: 0.5), + .withOpacity(0.5), ), padding: EdgeInsets.zero, tapTargetSize: MaterialTapTargetSize.shrinkWrap, diff --git a/lib/pages/msg_feed_top/at_me/view.dart b/lib/pages/msg_feed_top/at_me/view.dart index 458e277f3..a8304a4e9 100644 --- a/lib/pages/msg_feed_top/at_me/view.dart +++ b/lib/pages/msg_feed_top/at_me/view.dart @@ -131,7 +131,7 @@ class _AtMePageState extends State { indent: 72, endIndent: 20, height: 6, - color: Colors.grey.withValues(alpha: 0.1), + color: Colors.grey.withOpacity(0.1), ); }, ); diff --git a/lib/pages/msg_feed_top/like_me/view.dart b/lib/pages/msg_feed_top/like_me/view.dart index e378f0212..38cf253ae 100644 --- a/lib/pages/msg_feed_top/like_me/view.dart +++ b/lib/pages/msg_feed_top/like_me/view.dart @@ -198,7 +198,7 @@ class LikeMeList extends StatelessWidget { indent: 72, endIndent: 20, height: 6, - color: Colors.grey.withValues(alpha: 0.1), + color: Colors.grey.withOpacity(0.1), ); }, ); diff --git a/lib/pages/msg_feed_top/reply_me/view.dart b/lib/pages/msg_feed_top/reply_me/view.dart index 8f7ddee10..97fe30828 100644 --- a/lib/pages/msg_feed_top/reply_me/view.dart +++ b/lib/pages/msg_feed_top/reply_me/view.dart @@ -144,7 +144,7 @@ class _ReplyMePageState extends State { indent: 72, endIndent: 20, height: 6, - color: Colors.grey.withValues(alpha: 0.1), + color: Colors.grey.withOpacity(0.1), ); }, ); diff --git a/lib/pages/msg_feed_top/sys_msg/view.dart b/lib/pages/msg_feed_top/sys_msg/view.dart index b26fa69de..575416999 100644 --- a/lib/pages/msg_feed_top/sys_msg/view.dart +++ b/lib/pages/msg_feed_top/sys_msg/view.dart @@ -127,7 +127,7 @@ class _SysMsgPageState extends State { color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.85), + .withOpacity(0.85), ), ), const SizedBox(height: 5), @@ -156,7 +156,7 @@ class _SysMsgPageState extends State { indent: 72, endIndent: 20, height: 6, - color: Colors.grey.withValues(alpha: 0.1), + color: Colors.grey.withOpacity(0.1), ); }, ); diff --git a/lib/pages/search/view.dart b/lib/pages/search/view.dart index f05052adb..39d83b2e9 100644 --- a/lib/pages/search/view.dart +++ b/lib/pages/search/view.dart @@ -23,7 +23,7 @@ class _SearchPageState extends State with RouteAware { appBar: AppBar( shape: Border( bottom: BorderSide( - color: Theme.of(context).dividerColor.withValues(alpha: 0.08), + color: Theme.of(context).dividerColor.withOpacity(0.08), width: 1, ), ), diff --git a/lib/pages/search_panel/widgets/video_panel.dart b/lib/pages/search_panel/widgets/video_panel.dart index 216623dd8..803bb4630 100644 --- a/lib/pages/search_panel/widgets/video_panel.dart +++ b/lib/pages/search_panel/widgets/video_panel.dart @@ -163,7 +163,7 @@ class CustomFilterChip extends StatelessWidget { ), selectedColor: Colors.transparent, // backgroundColor: - // Theme.of(context).colorScheme.surfaceVariant.withValues(alpha: 0.5), + // Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.5), backgroundColor: Colors.transparent, side: BorderSide.none, onSelected: (bool selected) => callFn?.call(selected), @@ -312,17 +312,11 @@ class VideoPanelController extends GetxController { bgColor: currentPubTimeFilterval == -1 && (isFirst ? customPubBegin : customPubEnd) ? Theme.of(context).colorScheme.secondaryContainer - : Theme.of(context) - .colorScheme - .outline - .withValues(alpha: 0.1), + : Theme.of(context).colorScheme.outline.withOpacity(0.1), textColor: currentPubTimeFilterval == -1 && (isFirst ? customPubBegin : customPubEnd) ? Theme.of(context).colorScheme.onSecondaryContainer - : Theme.of(context) - .colorScheme - .outline - .withValues(alpha: 0.8), + : Theme.of(context).colorScheme.outline.withOpacity(0.8), ); } diff --git a/lib/pages/search_result/view.dart b/lib/pages/search_result/view.dart index 5b976bd0e..5818e68bf 100644 --- a/lib/pages/search_result/view.dart +++ b/lib/pages/search_result/view.dart @@ -51,7 +51,7 @@ class _SearchResultPageState extends State appBar: AppBar( shape: Border( bottom: BorderSide( - color: Theme.of(context).dividerColor.withValues(alpha: 0.08), + color: Theme.of(context).dividerColor.withOpacity(0.08), width: 1, ), ), diff --git a/lib/pages/setting/pages/color_select.dart b/lib/pages/setting/pages/color_select.dart index 025cd6d05..b8380787e 100644 --- a/lib/pages/setting/pages/color_select.dart +++ b/lib/pages/setting/pages/color_select.dart @@ -171,13 +171,13 @@ class _ColorSelectPageState extends State { width: 46, height: 46, decoration: BoxDecoration( - color: e['color'].withValues(alpha: 0.8), + color: e['color'].withOpacity(0.8), borderRadius: BorderRadius.circular(50), border: Border.all( width: 2, color: ctr.currentColor.value == index ? Colors.black - : e['color'].withValues(alpha: 0.8), + : e['color'].withOpacity(0.8), ), ), child: AnimatedOpacity( diff --git a/lib/pages/setting/pages/font_size_select.dart b/lib/pages/setting/pages/font_size_select.dart index 450f277b8..69bd5599c 100644 --- a/lib/pages/setting/pages/font_size_select.dart +++ b/lib/pages/setting/pages/font_size_select.dart @@ -72,7 +72,7 @@ class _FontSizeSelectPageState extends State { color: Theme.of(context) .colorScheme .primary - .withValues(alpha: 0.3))), + .withOpacity(0.3))), color: Theme.of(context).colorScheme.surface, ), child: Row( diff --git a/lib/pages/setting/recommend_setting.dart b/lib/pages/setting/recommend_setting.dart index b3c6f255d..95956f721 100644 --- a/lib/pages/setting/recommend_setting.dart +++ b/lib/pages/setting/recommend_setting.dart @@ -220,8 +220,8 @@ class _RecommendSettingState extends State { ...defDurations, if (defDurations.contains(minDurationForRcmd).not) minDurationForRcmd, + -1 ]..sort(), - -1 ].map((e) { if (e == -1) { return {'title': '自定义', 'value': e}; @@ -271,7 +271,7 @@ class _RecommendSettingState extends State { Get.back(); updateDuration(int.tryParse(duration) ?? 0); }, - child: const Text('确定'), + child: Text('确定'), ), ], ); @@ -337,10 +337,8 @@ class _RecommendSettingState extends State { '* 设定较严苛的条件可导致推荐项数锐减或多次请求,请酌情选择。\n' '* 后续可能会增加更多过滤条件,敬请期待。', style: Theme.of(context).textTheme.labelSmall!.copyWith( - color: Theme.of(context) - .colorScheme - .outline - .withValues(alpha: 0.7)), + color: + Theme.of(context).colorScheme.outline.withOpacity(0.7)), ), ) ], diff --git a/lib/pages/setting/sponsor_block_page.dart b/lib/pages/setting/sponsor_block_page.dart index 4513a1c33..13aa0b065 100644 --- a/lib/pages/setting/sponsor_block_page.dart +++ b/lib/pages/setting/sponsor_block_page.dart @@ -362,14 +362,14 @@ class _SponsorBlockPageState extends State { Widget get _divider => SliverToBoxAdapter( child: Divider( height: 1, - color: Theme.of(context).colorScheme.outline.withValues(alpha: 0.1), + color: Theme.of(context).colorScheme.outline.withOpacity(0.1), ), ); Widget get _dividerL => SliverToBoxAdapter( child: Divider( thickness: 16, - color: Theme.of(context).colorScheme.outline.withValues(alpha: 0.1), + color: Theme.of(context).colorScheme.outline.withOpacity(0.1), ), ); @@ -529,8 +529,7 @@ class _SponsorBlockPageState extends State { ), separatorBuilder: (context, index) => Divider( height: 1, - color: - Theme.of(context).colorScheme.outline.withValues(alpha: 0.1), + color: Theme.of(context).colorScheme.outline.withOpacity(0.1), ), ), _dividerL, diff --git a/lib/pages/subscription_detail/view.dart b/lib/pages/subscription_detail/view.dart index 191092f1d..52285d068 100644 --- a/lib/pages/subscription_detail/view.dart +++ b/lib/pages/subscription_detail/view.dart @@ -102,8 +102,7 @@ class _SubDetailPageState extends State { decoration: BoxDecoration( border: Border( bottom: BorderSide( - color: - Theme.of(context).dividerColor.withValues(alpha: 0.2), + color: Theme.of(context).dividerColor.withOpacity(0.2), ), ), ), diff --git a/lib/pages/video/detail/controller.dart b/lib/pages/video/detail/controller.dart index 0c955088c..92143292e 100644 --- a/lib/pages/video/detail/controller.dart +++ b/lib/pages/video/detail/controller.dart @@ -522,7 +522,7 @@ class VideoDetailController extends GetxController color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.7), + .withOpacity(0.7), ), ), ) diff --git a/lib/pages/video/detail/introduction/widgets/action_row_item.dart b/lib/pages/video/detail/introduction/widgets/action_row_item.dart index ce4009672..3cfbc3e9f 100644 --- a/lib/pages/video/detail/introduction/widgets/action_row_item.dart +++ b/lib/pages/video/detail/introduction/widgets/action_row_item.dart @@ -25,11 +25,8 @@ class ActionRowItem extends StatelessWidget { Widget build(BuildContext context) { return Material( color: selectStatus - ? Theme.of(context) - .colorScheme - .primaryContainer - .withValues(alpha: 0.6) - : Theme.of(context).highlightColor.withValues(alpha: 0.2), + ? Theme.of(context).colorScheme.primaryContainer.withOpacity(0.6) + : Theme.of(context).highlightColor.withOpacity(0.2), borderRadius: const BorderRadius.all(Radius.circular(30)), clipBehavior: Clip.hardEdge, child: InkWell( diff --git a/lib/pages/video/detail/introduction/widgets/fav_panel.dart b/lib/pages/video/detail/introduction/widgets/fav_panel.dart index 2098b1c7c..3450a9b1f 100644 --- a/lib/pages/video/detail/introduction/widgets/fav_panel.dart +++ b/lib/pages/video/detail/introduction/widgets/fav_panel.dart @@ -167,7 +167,7 @@ class _FavPanelState extends State { ), Divider( height: 1, - color: Theme.of(context).disabledColor.withValues(alpha: 0.08), + color: Theme.of(context).disabledColor.withOpacity(0.08), ), Padding( padding: EdgeInsets.only( diff --git a/lib/pages/video/detail/introduction/widgets/group_panel.dart b/lib/pages/video/detail/introduction/widgets/group_panel.dart index 3038fe5e5..45046c2fb 100644 --- a/lib/pages/video/detail/introduction/widgets/group_panel.dart +++ b/lib/pages/video/detail/introduction/widgets/group_panel.dart @@ -170,7 +170,7 @@ class _GroupPanelState extends State { ), Divider( height: 1, - color: Theme.of(context).disabledColor.withValues(alpha: 0.08), + color: Theme.of(context).disabledColor.withOpacity(0.08), ), Padding( padding: EdgeInsets.only( diff --git a/lib/pages/video/detail/introduction/widgets/menu_row.dart b/lib/pages/video/detail/introduction/widgets/menu_row.dart index f2283eab4..ad52daf92 100644 --- a/lib/pages/video/detail/introduction/widgets/menu_row.dart +++ b/lib/pages/video/detail/introduction/widgets/menu_row.dart @@ -54,7 +54,7 @@ class MenuRow extends StatelessWidget { {bool selectStatus = false}) { return Material( color: selectStatus - ? Theme.of(context).highlightColor.withValues(alpha: 0.2) + ? Theme.of(context).highlightColor.withOpacity(0.2) : Colors.transparent, borderRadius: const BorderRadius.all(Radius.circular(30)), clipBehavior: Clip.hardEdge, @@ -70,7 +70,7 @@ class MenuRow extends StatelessWidget { border: Border.all( color: selectStatus ? Colors.transparent - : Theme.of(context).highlightColor.withValues(alpha: 0.2), + : Theme.of(context).highlightColor.withOpacity(0.2), ), ), child: Row( diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index 4319af8bb..32fbcf940 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -90,7 +90,7 @@ class ReplyItem extends StatelessWidget { color: Theme.of(context) .colorScheme .onInverseSurface - .withValues(alpha: 0.5), + .withOpacity(0.5), ) ], ), @@ -352,10 +352,7 @@ class ReplyItem extends StatelessWidget { Icon( Icons.reply, size: 18, - color: Theme.of(context) - .colorScheme - .outline - .withValues(alpha: 0.8), + color: Theme.of(context).colorScheme.outline.withOpacity(0.8), ), const SizedBox(width: 3), Text( @@ -463,7 +460,7 @@ class ReplyItem extends StatelessWidget { color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.85), + .withOpacity(0.85), height: 1.6), overflow: TextOverflow.ellipsis, maxLines: 2, @@ -542,7 +539,7 @@ class ReplyItem extends StatelessWidget { color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.85), + .withOpacity(0.85), )), TextSpan( text: replyControl!.entryText!, diff --git a/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart b/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart index c3e9649ac..19d0a5385 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart @@ -101,7 +101,7 @@ class ReplyItemGrpc extends StatelessWidget { color: Theme.of(context) .colorScheme .onInverseSurface - .withValues(alpha: 0.5), + .withOpacity(0.5), ) ], ), @@ -349,10 +349,7 @@ class ReplyItemGrpc extends StatelessWidget { Icon( Icons.reply, size: 18, - color: Theme.of(context) - .colorScheme - .outline - .withValues(alpha: 0.8), + color: Theme.of(context).colorScheme.outline.withOpacity(0.8), ), const SizedBox(width: 3), Text( @@ -479,7 +476,7 @@ class ReplyItemGrpc extends StatelessWidget { color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.85), + .withOpacity(0.85), height: 1.6), overflow: TextOverflow.ellipsis, maxLines: 2, @@ -561,7 +558,7 @@ class ReplyItemGrpc extends StatelessWidget { color: Theme.of(context) .colorScheme .onSurface - .withValues(alpha: 0.85), + .withOpacity(0.85), ), ), TextSpan( diff --git a/lib/pages/video/detail/reply_new/reply_page.dart b/lib/pages/video/detail/reply_new/reply_page.dart index 0e38e87a7..2a7a18908 100644 --- a/lib/pages/video/detail/reply_new/reply_page.dart +++ b/lib/pages/video/detail/reply_new/reply_page.dart @@ -306,7 +306,7 @@ class _ReplyPageState extends State ), Divider( height: 1, - color: Theme.of(context).dividerColor.withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ), Container( height: 52, diff --git a/lib/pages/video/detail/reply_new/view.dart b/lib/pages/video/detail/reply_new/view.dart index 9dae72f98..4b62f19c2 100644 --- a/lib/pages/video/detail/reply_new/view.dart +++ b/lib/pages/video/detail/reply_new/view.dart @@ -195,7 +195,7 @@ class _VideoReplyNewDialogState extends State ), Divider( height: 1, - color: Theme.of(context).dividerColor.withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ), Container( height: 52, diff --git a/lib/pages/video/detail/reply_reply/view.dart b/lib/pages/video/detail/reply_reply/view.dart index b43a28e66..a23927f3a 100644 --- a/lib/pages/video/detail/reply_reply/view.dart +++ b/lib/pages/video/detail/reply_reply/view.dart @@ -136,7 +136,7 @@ class _VideoReplyReplyPanelState extends State { ), Divider( height: 1, - color: Theme.of(context).dividerColor.withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ), Expanded( child: refreshIndicator( @@ -192,7 +192,7 @@ class _VideoReplyReplyPanelState extends State { height: 20, color: Theme.of(context) .dividerColor - .withValues(alpha: 0.1), + .withOpacity(0.1), thickness: 6, ); } else if (index == 2) { diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 296eb06ac..d97dce82b 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -726,7 +726,7 @@ class _VideoDetailPageState extends State // child: Divider( // indent: 12, // endIndent: 12, - // color: Theme.of(context).dividerColor.withValues(alpha: 0.06), + // color: Theme.of(context).dividerColor.withOpacity(0.06), // ), // ), // const RelatedVideoPanel(), @@ -1112,7 +1112,7 @@ class _VideoDetailPageState extends State border: Border( bottom: BorderSide( width: 1, - color: Theme.of(context).dividerColor.withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ), ), ), @@ -1271,7 +1271,7 @@ class _VideoDetailPageState extends State height: 1, indent: 12, endIndent: 12, - color: Theme.of(context).dividerColor.withValues(alpha: 0.06), + color: Theme.of(context).dividerColor.withOpacity(0.06), ), ), ), @@ -1445,9 +1445,7 @@ class _VideoDetailPageState extends State if (rawIndex % 2 == 1) { return Divider( height: 1, - color: Theme.of(context) - .dividerColor - .withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), ); } int index = rawIndex ~/ 2; diff --git a/lib/pages/video/detail/widgets/ai_detail.dart b/lib/pages/video/detail/widgets/ai_detail.dart index 246471862..bab7c6d3b 100644 --- a/lib/pages/video/detail/widgets/ai_detail.dart +++ b/lib/pages/video/detail/widgets/ai_detail.dart @@ -55,9 +55,7 @@ class AiDetail extends StatelessWidget { if (modelResult!.outline!.isNotEmpty) Divider( height: 20, - color: Theme.of(context) - .dividerColor - .withValues(alpha: 0.1), + color: Theme.of(context).dividerColor.withOpacity(0.1), thickness: 6, ) ], diff --git a/lib/pages/video/detail/widgets/header_control.dart b/lib/pages/video/detail/widgets/header_control.dart index 09146feee..a42fa22a6 100644 --- a/lib/pages/video/detail/widgets/header_control.dart +++ b/lib/pages/video/detail/widgets/header_control.dart @@ -145,7 +145,7 @@ class _HeaderControlState extends State { color: Theme.of(context) .colorScheme .onSecondaryContainer - .withValues(alpha: 0.5), + .withOpacity(0.5), borderRadius: const BorderRadius.all(Radius.circular(3))), ), diff --git a/lib/pages/whisper/view.dart b/lib/pages/whisper/view.dart index 4132c2850..103c45c5b 100644 --- a/lib/pages/whisper/view.dart +++ b/lib/pages/whisper/view.dart @@ -307,7 +307,7 @@ class _WhisperPageState extends State { indent: 72, endIndent: 20, height: 6, - color: Colors.grey.withValues(alpha: 0.1), + color: Colors.grey.withOpacity(0.1), ); }, ), diff --git a/lib/pages/whisper_detail/widget/chat_item.dart b/lib/pages/whisper_detail/widget/chat_item.dart index 4f9979729..76590df69 100644 --- a/lib/pages/whisper_detail/widget/chat_item.dart +++ b/lib/pages/whisper_detail/widget/chat_item.dart @@ -144,8 +144,7 @@ class ChatItem extends StatelessWidget { style: TextStyle( letterSpacing: 0.6, height: 5, - color: - Theme.of(context).colorScheme.outline.withValues(alpha: 0.8), + color: Theme.of(context).colorScheme.outline.withOpacity(0.8), ), ); case MsgType.text: @@ -196,7 +195,7 @@ class ChatItem extends StatelessWidget { style: TextStyle( letterSpacing: 0.6, height: 1.5, - color: textColor(context).withValues(alpha: 0.6), + color: textColor(context).withOpacity(0.6), fontSize: 12, ), ), @@ -247,7 +246,7 @@ class ChatItem extends StatelessWidget { style: TextStyle( letterSpacing: 0.6, height: 1.5, - color: textColor(context).withValues(alpha: 0.6), + color: textColor(context).withOpacity(0.6), fontSize: 12, ), ), @@ -262,7 +261,7 @@ class ChatItem extends StatelessWidget { color: Theme.of(context) .colorScheme .secondaryContainer - .withValues(alpha: 0.4), + .withOpacity(0.4), borderRadius: const BorderRadius.only( topLeft: Radius.circular(16), topRight: Radius.circular(16), @@ -344,8 +343,7 @@ class ChatItem extends StatelessWidget { style: TextStyle( letterSpacing: 0.6, height: 1.5, - color: textColor(context) - .withValues(alpha: 0.6), + color: textColor(context).withOpacity(0.6), fontSize: 12, ), ), @@ -354,8 +352,7 @@ class ChatItem extends StatelessWidget { style: TextStyle( letterSpacing: 0.6, height: 1.5, - color: textColor(context) - .withValues(alpha: 0.6), + color: textColor(context).withOpacity(0.6), fontSize: 12, ), ), @@ -431,11 +428,11 @@ class ChatItem extends StatelessWidget { ? Theme.of(context) .colorScheme .onPrimary - .withValues(alpha: 0.8) + .withOpacity(0.8) : Theme.of(context) .colorScheme .onSecondaryContainer - .withValues(alpha: 0.8)), + .withOpacity(0.8)), ), item.msgStatus == 1 ? Text( @@ -474,7 +471,7 @@ class SystemNotice extends StatelessWidget { color: Theme.of(context) .colorScheme .secondaryContainer - .withValues(alpha: 0.4), + .withOpacity(0.4), borderRadius: const BorderRadius.only( topLeft: Radius.circular(16), topRight: Radius.circular(16), @@ -500,10 +497,7 @@ class SystemNotice extends StatelessWidget { .copyWith(color: Theme.of(context).colorScheme.outline), ), Divider( - color: Theme.of(context) - .colorScheme - .primary - .withValues(alpha: 0.05), + color: Theme.of(context).colorScheme.primary.withOpacity(0.05), ), SelectableText( content['text'], diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index d9005fb9b..ffb442d1f 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -444,7 +444,7 @@ class _PLVideoPlayerState extends State plPlayerController.vttSubtitlesIndex.value ? 0 : plPlayerController.vttSubtitlesIndex.value, - color: Colors.black.withValues(alpha: 0.8), + color: Colors.black.withOpacity(0.8), itemBuilder: (BuildContext context) { return plPlayerController.vttSubtitles .asMap() @@ -483,7 +483,7 @@ class _PLVideoPlayerState extends State plPlayerController.setPlaybackSpeed(value); }, initialValue: plPlayerController.playbackSpeed, - color: Colors.black.withValues(alpha: 0.8), + color: Colors.black.withOpacity(0.8), itemBuilder: (BuildContext context) { return plPlayerController.speedList.map((double speed) { return PopupMenuItem( @@ -1077,11 +1077,11 @@ class _PLVideoPlayerState extends State buffered: Duration(seconds: buffer), total: Duration(seconds: max), progressBarColor: colorTheme, - baseBarColor: Colors.white.withValues(alpha: 0.2), + baseBarColor: Colors.white.withOpacity(0.2), bufferedBarColor: Theme.of(context) .colorScheme .primary - .withValues(alpha: 0.4), + .withOpacity(0.4), timeLabelLocation: TimeLabelLocation.none, thumbColor: colorTheme, barHeight: 3.5, diff --git a/lib/plugin/pl_player/widgets/bottom_control.dart b/lib/plugin/pl_player/widgets/bottom_control.dart index b17af21d0..6588bf703 100644 --- a/lib/plugin/pl_player/widgets/bottom_control.dart +++ b/lib/plugin/pl_player/widgets/bottom_control.dart @@ -57,8 +57,8 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget { buffered: Duration(seconds: buffer), total: Duration(seconds: max), progressBarColor: colorTheme, - baseBarColor: Colors.white.withValues(alpha: 0.2), - bufferedBarColor: colorTheme.withValues(alpha: 0.4), + baseBarColor: Colors.white.withOpacity(0.2), + bufferedBarColor: colorTheme.withOpacity(0.4), timeLabelLocation: TimeLabelLocation.none, thumbColor: colorTheme, barHeight: 3.5, diff --git a/pubspec.lock b/pubspec.lock index ddbce325f..420f66b97 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -74,10 +74,10 @@ packages: dependency: transitive description: name: archive - sha256: "08064924cbf0ab88280a0c3f60db9dd24fec693927e725ecb176f16c629d1cb8" + sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" args: dependency: transitive description: @@ -219,10 +219,10 @@ packages: dependency: transitive description: name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2" url: "https://pub.dev" source: hosted - version: "8.9.2" + version: "8.9.3" cached_network_image: dependency: "direct main" description: @@ -720,10 +720,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" + sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e" url: "https://pub.dev" source: hosted - version: "2.0.23" + version: "2.0.24" flutter_smart_dialog: dependency: "direct main" description: @@ -890,18 +890,18 @@ packages: dependency: transitive description: name: http2 - sha256: "9ced024a160b77aba8fb8674e38f70875e321d319e6f303ec18e87bd5a4b0c1d" + sha256: "382d3aefc5bd6dc68c6b892d7664f29b5beb3251611ae946a98d35158a82bbfa" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.1" http_multi_server: dependency: transitive description: name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" http_parser: dependency: transitive description: @@ -914,10 +914,10 @@ packages: dependency: transitive description: name: image - sha256: "20842a5ad1555be624c314b0c0cc0566e8ece412f61e859a42efeb6d4101a26c" + sha256: "8346ad4b5173924b5ddddab782fc7d8a6300178c8b1dc427775405a01701c4a6" url: "https://pub.dev" source: hosted - version: "4.5.0" + version: "4.5.2" image_cropper: dependency: "direct main" description: @@ -1458,10 +1458,10 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + sha256: "81876843eb50dc2e1e5b151792c9a985c5ed2536914115ed04e9c8528f6647b0" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" qr: dependency: transitive description: @@ -1562,10 +1562,10 @@ packages: dependency: transitive description: name: sentry - sha256: "0c2bb3c23c074130f60b2f6ee0851bd3714021758ac86df87fdd7cde6783feff" + sha256: b1ead7ca4da0949aed9482c4962f172021a4417f0a126fa974878c2301c16df7 url: "https://pub.dev" source: hosted - version: "8.11.0" + version: "8.11.2" share_plus: dependency: "direct main" description: @@ -1587,10 +1587,10 @@ packages: dependency: transitive description: name: shared_preferences - sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82" + sha256: "3c7e73920c694a436afaf65ab60ce3453d91f84208d761fbd83fc21182134d93" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.4" shared_preferences_android: dependency: transitive description: @@ -1672,10 +1672,10 @@ packages: dependency: transitive description: name: source_helper - sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c" url: "https://pub.dev" source: hosted - version: "1.3.4" + version: "1.3.5" source_span: dependency: transitive description: @@ -1760,10 +1760,10 @@ packages: dependency: transitive description: name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: @@ -1976,26 +1976,26 @@ packages: dependency: "direct main" description: name: wakelock_plus - sha256: bf4ee6f17a2fa373ed3753ad0e602b7603f8c75af006d5b9bdade263928c0484 + sha256: "36c88af0b930121941345306d259ec4cc4ecca3b151c02e3a9e71aede83c615e" url: "https://pub.dev" source: hosted - version: "1.2.8" + version: "1.2.10" wakelock_plus_platform_interface: dependency: transitive description: name: wakelock_plus_platform_interface - sha256: "422d1cdbb448079a8a62a5a770b69baa489f8f7ca21aef47800c726d404f9d16" + sha256: "70e780bc99796e1db82fe764b1e7dcb89a86f1e5b3afb1db354de50f2e41eb7a" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" watcher: dependency: transitive description: name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" waterfall_flow: dependency: "direct main" description: @@ -2072,10 +2072,10 @@ packages: dependency: transitive description: name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" sdks: dart: ">=3.5.0 <4.0.0" flutter: ">=3.24.5"