diff --git a/violet/lib/database/user/search.dart b/violet/lib/database/user/search.dart index ad9ef1194..86f1eb67d 100644 --- a/violet/lib/database/user/search.dart +++ b/violet/lib/database/user/search.dart @@ -63,8 +63,8 @@ class SearchLogDatabase { datetime ??= DateTime.now(); final db = await CommonUserDatabase.getInstance(); final body = { - 'SearchWhat': searchWhat, - 'DateTime': datetime.toString(), + 'SearchWhat': searchWhat as Object, + 'DateTime': datetime.toString() as Object, }; await db.insert('SearchLog', body); if (Platform.isAndroid || Platform.isIOS) { diff --git a/violet/lib/main.dart b/violet/lib/main.dart index 90ced5216..2e13f9388 100644 --- a/violet/lib/main.dart +++ b/violet/lib/main.dart @@ -114,8 +114,8 @@ class MyApp extends StatelessWidget { : SystemUiOverlayStyle.light), useMaterial3: false, brightness: brightness, - bottomSheetTheme: - BottomSheetThemeData(backgroundColor: Colors.black.withOpacity(0)), + bottomSheetTheme: BottomSheetThemeData( + backgroundColor: Colors.black.withValues(alpha: 0)), scaffoldBackgroundColor: Settings.themeBlack && Settings.themeWhat ? Colors.black : null, dialogBackgroundColor: Settings.themeBlack && Settings.themeWhat diff --git a/violet/lib/pages/after_loading/afterloading_page.dart b/violet/lib/pages/after_loading/afterloading_page.dart index 56d67e350..247e1c27b 100644 --- a/violet/lib/pages/after_loading/afterloading_page.dart +++ b/violet/lib/pages/after_loading/afterloading_page.dart @@ -128,7 +128,7 @@ class AfterLoadingPageState extends State backgroundColor: Settings.themeWhat ? Settings.themeBlack ? const Color(0xFF060606) - : Colors.grey.shade900.withOpacity(0.90) + : Colors.grey.shade900.withValues(alpha: 0.90) : Colors.grey.shade50, icon: Icon(iconData), label: translations.trans(key), @@ -209,15 +209,15 @@ class AfterLoadingPageState extends State height: 54, child: Container( decoration: BoxDecoration( - color: page == _currentPage ? color.withOpacity(0.4) : null, + color: page == _currentPage ? color.withValues(alpha: 0.4) : null, borderRadius: const BorderRadius.all(Radius.circular(10))), child: InkWell( customBorder: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(10))), hoverColor: color, - highlightColor: color.withOpacity(0.2), + highlightColor: color.withValues(alpha: 0.2), focusColor: color, - splashColor: color.withOpacity(0.3), + splashColor: color.withValues(alpha: 0.3), child: Row( children: [ const SizedBox(width: 12), @@ -311,7 +311,7 @@ class AfterLoadingPageState extends State return PopScope( canPop: false, - onPopInvoked: (bool didPop) async { + onPopInvokedWithResult: (bool didPop, _) async { if (didPop) { return; } diff --git a/violet/lib/pages/article_info/article_info_page.dart b/violet/lib/pages/article_info/article_info_page.dart index ad2f347c0..572ba8a00 100644 --- a/violet/lib/pages/article_info/article_info_page.dart +++ b/violet/lib/pages/article_info/article_info_page.dart @@ -73,8 +73,8 @@ class ArticleInfoPage extends StatelessWidget { height: Variables.articleInfoHeight, child: Container( color: Settings.themeWhat - ? Colors.black.withOpacity(0.9) - : Colors.white.withOpacity(0.97), + ? Colors.black.withValues(alpha: 0.9) + : Colors.white.withValues(alpha: 0.97), child: ListView( controller: data.controller, children: [ @@ -82,8 +82,8 @@ class ArticleInfoPage extends StatelessWidget { width: width, height: simpleInfoHeight(), color: Settings.themeWhat - ? Colors.grey.shade900.withOpacity(0.6) - : Colors.white.withOpacity(0.2), + ? Colors.grey.shade900.withValues(alpha: 0.6) + : Colors.white.withValues(alpha: 0.2), child: SimpleInfoWidget(), ), buttonArea(context), diff --git a/violet/lib/pages/article_info/preview_area.dart b/violet/lib/pages/article_info/preview_area.dart index 242f1ce4e..80c2be996 100644 --- a/violet/lib/pages/article_info/preview_area.dart +++ b/violet/lib/pages/article_info/preview_area.dart @@ -106,7 +106,7 @@ class PreviewAreaWidget extends StatelessWidget { child: Container( padding: const EdgeInsets.only(bottom: 1), width: double.infinity, - color: Colors.black.withOpacity(0.7), + color: Colors.black.withValues(alpha: 0.7), child: Text( '${index + 1} page', textAlign: TextAlign.right, diff --git a/violet/lib/pages/artist_info/search_type2.dart b/violet/lib/pages/artist_info/search_type2.dart index 617cc98ef..33f614fb8 100644 --- a/violet/lib/pages/artist_info/search_type2.dart +++ b/violet/lib/pages/artist_info/search_type2.dart @@ -29,8 +29,8 @@ class SearchType2 extends StatelessWidget { boxShadow: [ BoxShadow( color: Settings.themeWhat - ? Colors.black.withOpacity(0.4) - : Colors.grey.withOpacity(0.2), + ? Colors.black.withValues(alpha: 0.4) + : Colors.grey.withValues(alpha: 0.2), spreadRadius: 1, blurRadius: 1, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/bookmark/bookmark_page.dart b/violet/lib/pages/bookmark/bookmark_page.dart index 5460c34d6..1954945a6 100644 --- a/violet/lib/pages/bookmark/bookmark_page.dart +++ b/violet/lib/pages/bookmark/bookmark_page.dart @@ -222,7 +222,7 @@ class _BookmarkPageState extends ThemeSwitchableState BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/bookmark/crop_bookmark.dart b/violet/lib/pages/bookmark/crop_bookmark.dart index 163674b8c..7338e7637 100644 --- a/violet/lib/pages/bookmark/crop_bookmark.dart +++ b/violet/lib/pages/bookmark/crop_bookmark.dart @@ -208,8 +208,9 @@ class _CropBookmarkPageState extends State { setState(() {}); } }, - highlightColor: - Theme.of(context).highlightColor.withOpacity(0.15), + highlightColor: Theme.of(context) + .highlightColor + .withValues(alpha: 0.15), ), ), ), diff --git a/violet/lib/pages/community/community_page.dart b/violet/lib/pages/community/community_page.dart index ed8d3e334..9a808a124 100644 --- a/violet/lib/pages/community/community_page.dart +++ b/violet/lib/pages/community/community_page.dart @@ -114,7 +114,7 @@ class _CommunityPageState extends State BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/community/user_status_card.dart b/violet/lib/pages/community/user_status_card.dart index aa6e9a390..3474babec 100644 --- a/violet/lib/pages/community/user_status_card.dart +++ b/violet/lib/pages/community/user_status_card.dart @@ -102,7 +102,7 @@ class _UserStatusCardState extends ThemeSwitchableState BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/community/user_status_card_dead.dart b/violet/lib/pages/community/user_status_card_dead.dart index f54a6fbb2..1d2f44a78 100644 --- a/violet/lib/pages/community/user_status_card_dead.dart +++ b/violet/lib/pages/community/user_status_card_dead.dart @@ -102,7 +102,7 @@ class _UserStatusCardState extends State BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/download/download_item_menu.dart b/violet/lib/pages/download/download_item_menu.dart index 82bd1c36c..92d91605a 100644 --- a/violet/lib/pages/download/download_item_menu.dart +++ b/violet/lib/pages/download/download_item_menu.dart @@ -25,8 +25,8 @@ class DownloadImageMenu extends StatelessWidget { boxShadow: [ BoxShadow( color: Settings.themeWhat - ? Colors.black.withOpacity(0.4) - : Colors.grey.withOpacity(0.2), + ? Colors.black.withValues(alpha: 0.4) + : Colors.grey.withValues(alpha: 0.2), spreadRadius: 1, blurRadius: 1, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/download/download_item_widget.dart b/violet/lib/pages/download/download_item_widget.dart index b41fd75d8..4f2c4dcf0 100644 --- a/violet/lib/pages/download/download_item_widget.dart +++ b/violet/lib/pages/download/download_item_widget.dart @@ -423,13 +423,13 @@ class DownloadItemWidgetState extends State ? Palette.blackThemeBackground : Colors.grey.shade800 : Colors.white70 - : Colors.grey.withOpacity(0.3), + : Colors.grey.withValues(alpha: 0.3), borderRadius: const BorderRadius.all(Radius.circular(5)), boxShadow: [ BoxShadow( color: Settings.themeWhat - ? Colors.grey.withOpacity(0.08) - : Colors.grey.withOpacity(0.4), + ? Colors.grey.withValues(alpha: 0.08) + : Colors.grey.withValues(alpha: 0.4), spreadRadius: 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/download/download_page.dart b/violet/lib/pages/download/download_page.dart index e409e84db..8f5a8f46e 100644 --- a/violet/lib/pages/download/download_page.dart +++ b/violet/lib/pages/download/download_page.dart @@ -606,7 +606,7 @@ class _DownloadPageState extends ThemeSwitchableState BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow @@ -722,8 +722,8 @@ class _DownloadPageState extends ThemeSwitchableState color: Settings.themeWhat ? Settings.themeBlack ? Palette.blackThemeBackground - : Colors.grey.shade900.withOpacity(0.4) - : Colors.grey.shade200.withOpacity(0.4), + : Colors.grey.shade900.withValues(alpha: 0.4) + : Colors.grey.shade200.withValues(alpha: 0.4), child: ListTile( title: TextFormField( cursorColor: Colors.black, diff --git a/violet/lib/pages/hot/hot_page.dart b/violet/lib/pages/hot/hot_page.dart index e42681875..87b6e0936 100644 --- a/violet/lib/pages/hot/hot_page.dart +++ b/violet/lib/pages/hot/hot_page.dart @@ -228,7 +228,7 @@ class _HotPageState extends ThemeSwitchableState color: Settings.themeWhat ? Settings.themeBlack ? const Color(0xFF060606) - : Colors.grey.shade900.withOpacity(0.90) + : Colors.grey.shade900.withValues(alpha: 0.90) : Colors.grey.shade50, icon: Theme( data: ThemeData( diff --git a/violet/lib/pages/lab/lab/bookmark/bookmarks.dart b/violet/lib/pages/lab/lab/bookmark/bookmarks.dart index 9f466f9d7..8ca94479a 100644 --- a/violet/lib/pages/lab/lab/bookmark/bookmarks.dart +++ b/violet/lib/pages/lab/lab/bookmark/bookmarks.dart @@ -125,7 +125,7 @@ class _BookmarkPageState extends State { BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/lab/lab/bookmark_spy.dart b/violet/lib/pages/lab/lab/bookmark_spy.dart index 496b60aa7..1205be2e9 100644 --- a/violet/lib/pages/lab/lab/bookmark_spy.dart +++ b/violet/lib/pages/lab/lab/bookmark_spy.dart @@ -82,7 +82,7 @@ class _LabBookmarkSpyPageState extends State { BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), diff --git a/violet/lib/pages/lab/lab/recent_record.dart b/violet/lib/pages/lab/lab/recent_record.dart index f2b539603..9f2099dbe 100644 --- a/violet/lib/pages/lab/lab/recent_record.dart +++ b/violet/lib/pages/lab/lab/recent_record.dart @@ -171,7 +171,8 @@ class _LabRecentRecordsState extends State { max: 180, min: 0, divisions: (180 - 0), - inactiveColor: Settings.majorColor.withOpacity(0.7), + inactiveColor: + Settings.majorColor.withValues(alpha: 0.7), activeColor: Settings.majorColor, onChangeEnd: (value) async { limit = value.toInt(); diff --git a/violet/lib/pages/lab/lab/recent_record_u.dart b/violet/lib/pages/lab/lab/recent_record_u.dart index 8b668ce9f..c7b8238e6 100644 --- a/violet/lib/pages/lab/lab/recent_record_u.dart +++ b/violet/lib/pages/lab/lab/recent_record_u.dart @@ -175,7 +175,8 @@ class _LabRecentRecordsUState extends State { max: 180, min: 0, divisions: (180 - 0), - inactiveColor: Settings.majorColor.withOpacity(0.7), + inactiveColor: + Settings.majorColor.withValues(alpha: 0.7), activeColor: Settings.majorColor, onChangeEnd: (value) async { limit = value.toInt(); diff --git a/violet/lib/pages/lab/lab/recent_user_record.dart b/violet/lib/pages/lab/lab/recent_user_record.dart index ecd2968d8..5a33ad865 100644 --- a/violet/lib/pages/lab/lab/recent_user_record.dart +++ b/violet/lib/pages/lab/lab/recent_user_record.dart @@ -200,7 +200,8 @@ class _LabUserRecentRecordsState extends State { max: 180, min: 0, divisions: (180 - 0), - inactiveColor: Settings.majorColor.withOpacity(0.7), + inactiveColor: + Settings.majorColor.withValues(alpha: 0.7), activeColor: Settings.majorColor, onChangeEnd: (value) async { limit = value.toInt(); diff --git a/violet/lib/pages/lab/lab/top_recent.dart b/violet/lib/pages/lab/lab/top_recent.dart index e5b95ccf0..bba823404 100644 --- a/violet/lib/pages/lab/lab/top_recent.dart +++ b/violet/lib/pages/lab/lab/top_recent.dart @@ -168,7 +168,8 @@ class _LabTopRecentState extends State { max: 30000, min: 1, divisions: (30000 - 1), - inactiveColor: Settings.majorColor.withOpacity(0.7), + inactiveColor: + Settings.majorColor.withValues(alpha: 0.7), activeColor: Settings.majorColor, onChangeEnd: (value) async { limit = value.toInt(); diff --git a/violet/lib/pages/lab/lab/user_bookmark_page.dart b/violet/lib/pages/lab/lab/user_bookmark_page.dart index 646fc2647..47253faa9 100644 --- a/violet/lib/pages/lab/lab/user_bookmark_page.dart +++ b/violet/lib/pages/lab/lab/user_bookmark_page.dart @@ -61,7 +61,7 @@ class _LabUserBookmarkPageState extends State { BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), diff --git a/violet/lib/pages/lab/lab_page.dart b/violet/lib/pages/lab/lab_page.dart index 3504a9b20..400a0bcee 100644 --- a/violet/lib/pages/lab/lab_page.dart +++ b/violet/lib/pages/lab/lab_page.dart @@ -429,7 +429,7 @@ class _LaboratoryPageState extends State { BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/search/search_bar_page.dart b/violet/lib/pages/search/search_bar_page.dart index e06aee156..b390c491e 100644 --- a/violet/lib/pages/search/search_bar_page.dart +++ b/violet/lib/pages/search/search_bar_page.dart @@ -494,7 +494,7 @@ class _SearchBarPageState extends State // title: Slider( // activeColor: Settings.majorColor, // inactiveColor: Settings.majorColor - // .withOpacity(0.2), + // .withValues(alpha: 0.2), // min: 60.0, // max: 2000.0, // divisions: (2000 - 60) ~/ 30, @@ -793,7 +793,7 @@ class _SearchBarPageState extends State } else if (info.$1.group == 'series') { color = Colors.cyan; } else if (info.$1.group == 'artist' || info.$1.group == 'group') { - color = Colors.green.withOpacity(0.6); + color = Colors.green.withValues(alpha: 0.6); } else if (info.$1.group == 'type' || info.$1.group == 'page') { color = Colors.orange; } diff --git a/violet/lib/pages/search/search_page.dart b/violet/lib/pages/search/search_page.dart index 472107f44..ac77fcb64 100644 --- a/violet/lib/pages/search/search_page.dart +++ b/violet/lib/pages/search/search_page.dart @@ -352,8 +352,8 @@ class _SearchPageState extends ThemeSwitchableState color: Settings.themeWhat ? Settings.themeBlack ? Palette.blackThemeBackground - : Colors.grey.shade900.withOpacity(0.4) - : Colors.grey.shade200.withOpacity(0.4), + : Colors.grey.shade900.withValues(alpha: 0.4) + : Colors.grey.shade200.withValues(alpha: 0.4), child: ListTile( title: textFormField, leading: SizedBox( diff --git a/violet/lib/pages/search/search_result_selector.dart b/violet/lib/pages/search/search_result_selector.dart index afe4e761f..ce916677a 100644 --- a/violet/lib/pages/search/search_result_selector.dart +++ b/violet/lib/pages/search/search_result_selector.dart @@ -20,8 +20,8 @@ class SearchResultSelector extends StatelessWidget { boxShadow: [ BoxShadow( color: Settings.themeWhat - ? Colors.black.withOpacity(0.4) - : Colors.grey.withOpacity(0.2), + ? Colors.black.withValues(alpha: 0.4) + : Colors.grey.withValues(alpha: 0.2), spreadRadius: 1, blurRadius: 1, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/segment/filter_page.dart b/violet/lib/pages/segment/filter_page.dart index 32a500d69..0e322b041 100644 --- a/violet/lib/pages/segment/filter_page.dart +++ b/violet/lib/pages/segment/filter_page.dart @@ -419,7 +419,7 @@ class __ChipState extends State<_Chip> { } else if (group == 'series') { color = Colors.cyan; } else if (group == 'artist' || group == 'group') { - color = Colors.green.withOpacity(0.6); + color = Colors.green.withValues(alpha: 0.6); } else if (group == 'type') { color = Colors.orange; } diff --git a/violet/lib/pages/settings/bookmark_version_select.dart b/violet/lib/pages/settings/bookmark_version_select.dart index bf808a436..f427ed929 100644 --- a/violet/lib/pages/settings/bookmark_version_select.dart +++ b/violet/lib/pages/settings/bookmark_version_select.dart @@ -93,7 +93,7 @@ class _BookmarkVersionSelectPageState extends State { BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), diff --git a/violet/lib/pages/settings/db_rebuild_page.dart b/violet/lib/pages/settings/db_rebuild_page.dart index 2b98811f2..a60e32a43 100644 --- a/violet/lib/pages/settings/db_rebuild_page.dart +++ b/violet/lib/pages/settings/db_rebuild_page.dart @@ -39,8 +39,8 @@ class _DBRebuildPagePageState extends State { boxShadow: [ BoxShadow( color: Settings.themeWhat - ? Colors.black.withOpacity(0.4) - : Colors.grey.withOpacity(0.2), + ? Colors.black.withValues(alpha: 0.4) + : Colors.grey.withValues(alpha: 0.2), spreadRadius: 1, blurRadius: 1, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/settings/import_from_eh.dart b/violet/lib/pages/settings/import_from_eh.dart index f8a62cdb0..f4bb37546 100644 --- a/violet/lib/pages/settings/import_from_eh.dart +++ b/violet/lib/pages/settings/import_from_eh.dart @@ -36,8 +36,8 @@ class _ImportFromEHPageState extends State { boxShadow: [ BoxShadow( color: Settings.themeWhat - ? Colors.black.withOpacity(0.4) - : Colors.grey.withOpacity(0.2), + ? Colors.black.withValues(alpha: 0.4) + : Colors.grey.withValues(alpha: 0.2), spreadRadius: 1, blurRadius: 1, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/settings/info_page.dart b/violet/lib/pages/settings/info_page.dart index c990fcaf1..3d96e8175 100644 --- a/violet/lib/pages/settings/info_page.dart +++ b/violet/lib/pages/settings/info_page.dart @@ -202,7 +202,7 @@ class _InfoPageState extends State { BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/settings/log_page.dart b/violet/lib/pages/settings/log_page.dart index bb301bdae..1f481f7fe 100644 --- a/violet/lib/pages/settings/log_page.dart +++ b/violet/lib/pages/settings/log_page.dart @@ -92,10 +92,10 @@ class _LogPageState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular(10.0), color: ii.isError == false && ii.isWarning == false - ? Colors.greenAccent.withOpacity(0.8) + ? Colors.greenAccent.withValues(alpha: 0.8) : ii.isWarning - ? Colors.orangeAccent.withOpacity(0.8) - : Colors.redAccent.withOpacity(0.8), + ? Colors.orangeAccent.withValues(alpha: 0.8) + : Colors.redAccent.withValues(alpha: 0.8), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/violet/lib/pages/settings/patchnote_page.dart b/violet/lib/pages/settings/patchnote_page.dart index 6b68382bd..b148e48e7 100644 --- a/violet/lib/pages/settings/patchnote_page.dart +++ b/violet/lib/pages/settings/patchnote_page.dart @@ -1064,12 +1064,12 @@ class _PatchNotePageState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular(10.0), color: i == 0 - ? Colors.greenAccent.withOpacity(0.8) + ? Colors.greenAccent.withValues(alpha: 0.8) : ii.isMajor - ? Colors.lightBlueAccent.withOpacity(0.8) + ? Colors.lightBlueAccent.withValues(alpha: 0.8) : ii.isMinor - ? Colors.orange.withOpacity(0.8) - : Colors.redAccent.withOpacity(0.8)), + ? Colors.orange.withValues(alpha: 0.8) + : Colors.redAccent.withValues(alpha: 0.8)), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/violet/lib/pages/settings/restore_bookmark.dart b/violet/lib/pages/settings/restore_bookmark.dart index 2e1966cc3..0f5ef76d5 100644 --- a/violet/lib/pages/settings/restore_bookmark.dart +++ b/violet/lib/pages/settings/restore_bookmark.dart @@ -140,8 +140,8 @@ class _RestoreBookmarkPageState extends State { boxShadow: [ BoxShadow( color: Settings.themeWhat - ? Colors.black.withOpacity(0.4) - : Colors.grey.withOpacity(0.2), + ? Colors.black.withValues(alpha: 0.4) + : Colors.grey.withValues(alpha: 0.2), spreadRadius: 1, blurRadius: 1, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/settings/settings_page.dart b/violet/lib/pages/settings/settings_page.dart index 7d7ba629a..1df19635c 100644 --- a/violet/lib/pages/settings/settings_page.dart +++ b/violet/lib/pages/settings/settings_page.dart @@ -149,7 +149,7 @@ class _SettingsPageState extends State BoxShadow( color: Settings.themeWhat ? Colors.black26 - : Colors.grey.withOpacity(0.1), + : Colors.grey.withValues(alpha: 0.1), spreadRadius: Settings.themeWhat ? 0 : 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow @@ -276,7 +276,7 @@ class _SettingsPageState extends State useMaterial3: false, brightness: Theme.of(context).brightness, bottomSheetTheme: BottomSheetThemeData( - backgroundColor: Colors.black.withOpacity(0)), + backgroundColor: Colors.black.withValues(alpha: 0)), scaffoldBackgroundColor: Settings.themeBlack && Settings.themeWhat ? Colors.black @@ -327,7 +327,8 @@ class _SettingsPageState extends State useMaterial3: false, brightness: Theme.of(context).brightness, bottomSheetTheme: BottomSheetThemeData( - backgroundColor: Colors.black.withOpacity(0)), + backgroundColor: + Colors.black.withValues(alpha: 0)), scaffoldBackgroundColor: Settings.themeBlack && Settings.themeWhat ? Colors.black diff --git a/violet/lib/pages/settings/tag_rebuild_page.dart b/violet/lib/pages/settings/tag_rebuild_page.dart index 7fa9142d4..28cf00f2a 100644 --- a/violet/lib/pages/settings/tag_rebuild_page.dart +++ b/violet/lib/pages/settings/tag_rebuild_page.dart @@ -44,8 +44,8 @@ class _TagRebuildPageState extends State { boxShadow: [ BoxShadow( color: Settings.themeWhat - ? Colors.black.withOpacity(0.4) - : Colors.grey.withOpacity(0.2), + ? Colors.black.withValues(alpha: 0.4) + : Colors.grey.withValues(alpha: 0.2), spreadRadius: 1, blurRadius: 1, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/pages/settings/tag_selector.dart b/violet/lib/pages/settings/tag_selector.dart index 595b11389..bc032ef41 100644 --- a/violet/lib/pages/settings/tag_selector.dart +++ b/violet/lib/pages/settings/tag_selector.dart @@ -224,7 +224,7 @@ class _TagSelectorDialogState extends State { } else if (info.$1.group == 'series') { color = Colors.cyan; } else if (info.$1.group == 'artist' || info.$1.group == 'group') { - color = Colors.green.withOpacity(0.6); + color = Colors.green.withValues(alpha: 0.6); } else if (info.$1.group == 'type') { color = Colors.orange; } diff --git a/violet/lib/pages/settings/version_page.dart b/violet/lib/pages/settings/version_page.dart index 9a091d230..f6987ba0b 100644 --- a/violet/lib/pages/settings/version_page.dart +++ b/violet/lib/pages/settings/version_page.dart @@ -20,7 +20,7 @@ class VersionViewPage extends StatelessWidget { borderRadius: const BorderRadius.all(Radius.circular(1)), boxShadow: [ BoxShadow( - color: Colors.grey.withOpacity(0.2), + color: Colors.grey.withValues(alpha: 0.2), spreadRadius: 1, blurRadius: 1, offset: const Offset(0, 3), // changes position of shadow @@ -33,8 +33,8 @@ class VersionViewPage extends StatelessWidget { children: [ Card( color: Settings.themeWhat - ? Colors.black.withOpacity(0.9) - : Colors.white.withOpacity(0.9), + ? Colors.black.withValues(alpha: 0.9) + : Colors.white.withValues(alpha: 0.9), elevation: 10, child: SizedBox( child: Container( diff --git a/violet/lib/pages/splash/splash_page.dart b/violet/lib/pages/splash/splash_page.dart index 51fb1dc69..66c6e8503 100644 --- a/violet/lib/pages/splash/splash_page.dart +++ b/violet/lib/pages/splash/splash_page.dart @@ -518,7 +518,7 @@ class _SplashPageState extends State { MdiIcons.database, size: 50, color: widget.switching - ? Settings.majorAccentColor.withOpacity(0.8) + ? Settings.majorAccentColor.withValues(alpha: 0.8) : Colors.grey, ), Container( diff --git a/violet/lib/pages/viewer/overlay/viewer_gallery.dart b/violet/lib/pages/viewer/overlay/viewer_gallery.dart index f07ba3fec..90de0f300 100644 --- a/violet/lib/pages/viewer/overlay/viewer_gallery.dart +++ b/violet/lib/pages/viewer/overlay/viewer_gallery.dart @@ -178,7 +178,7 @@ class _ViewerGalleryState extends State { child: Container( padding: const EdgeInsets.only(bottom: 1), width: double.infinity, - color: Colors.black.withOpacity(0.7), + color: Colors.black.withValues(alpha: 0.7), child: Text( '${index + 1} page', textAlign: TextAlign.right, @@ -301,7 +301,7 @@ class _ViewerGalleryState extends State { child: Container( padding: const EdgeInsets.only(bottom: 1), width: double.infinity, - color: Colors.black.withOpacity(0.7), + color: Colors.black.withValues(alpha: 0.7), child: Text( '${index + 1} page', textAlign: TextAlign.right, @@ -314,8 +314,8 @@ class _ViewerGalleryState extends State { child: Material( color: Colors.transparent, child: InkWell( - splashColor: Colors.black.withOpacity(0.4), - highlightColor: Colors.black.withOpacity(0.1), + splashColor: Colors.black.withValues(alpha: 0.4), + highlightColor: Colors.black.withValues(alpha: 0.1), onTap: () { Navigator.pop(context, index); }, diff --git a/violet/lib/pages/viewer/overlay/viewer_overlay.dart b/violet/lib/pages/viewer/overlay/viewer_overlay.dart index 6ed0d8916..1040c8219 100644 --- a/violet/lib/pages/viewer/overlay/viewer_overlay.dart +++ b/violet/lib/pages/viewer/overlay/viewer_overlay.dart @@ -128,7 +128,7 @@ class _ViewerOverlayState extends State { ), child: CupertinoButton( minSize: 48.0, - color: Colors.black.withOpacity(0.8), + color: Colors.black.withValues(alpha: 0.8), pressedOpacity: 0.4, disabledColor: CupertinoColors.quaternarySystemFill, borderRadius: const BorderRadius.all(Radius.circular(8.0)), @@ -192,7 +192,7 @@ class _ViewerOverlayState extends State { : MainAxisAlignment.start, children: [ Material( - color: Colors.black.withOpacity(0.8), + color: Colors.black.withValues(alpha: 0.8), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -234,7 +234,7 @@ class _ViewerOverlayState extends State { height: Variables.bottomBarHeight + (Platform.isIOS ? 48 - 24 : 0), color: Platform.isIOS - ? Colors.black.withOpacity(0.8) + ? Colors.black.withValues(alpha: 0.8) : Colors.black, ) : Container(), @@ -276,8 +276,8 @@ class _ViewerOverlayState extends State { child: ToastWrapper( icon: c.bookmark.value ? Icons.delete_forever : Icons.check, color: c.bookmark.value - ? Colors.redAccent.withOpacity(0.8) - : Colors.greenAccent.withOpacity(0.8), + ? Colors.redAccent.withValues(alpha: 0.8) + : Colors.greenAccent.withValues(alpha: 0.8), ignoreDrawer: true, reverse: true, msg: @@ -541,7 +541,7 @@ class _ViewerOverlayState extends State { min: 1, label: '${c.page.value + 1}', divisions: c.maxPage, - inactiveColor: Settings.majorColor.withOpacity(0.7), + inactiveColor: Settings.majorColor.withValues(alpha: 0.7), activeColor: Settings.majorColor, onChangeStart: (value) { c.sliderOnChange = true; @@ -640,7 +640,7 @@ class _ViewerOverlayState extends State { (!c.appBarToBottom.value ? 48 : 0)), curve: Curves.easeInOut, child: Material( - color: Colors.black.withOpacity(0.8), + color: Colors.black.withValues(alpha: 0.8), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, mainAxisAlignment: MainAxisAlignment.start, @@ -882,7 +882,8 @@ class _ViewerOverlayState extends State { style: const TextStyle(color: Colors.white), decoration: InputDecoration.collapsed( hintText: '대사 입력', - hintStyle: TextStyle(color: Colors.white.withOpacity(0.5))), + hintStyle: + TextStyle(color: Colors.white.withValues(alpha: 0.5))), controller: c.searchText, // autofocus: true, onEditingComplete: c.onModifiedText, diff --git a/violet/lib/pages/viewer/overlay/viewer_record_panel.dart b/violet/lib/pages/viewer/overlay/viewer_record_panel.dart index 4917727ad..554f65e42 100644 --- a/violet/lib/pages/viewer/overlay/viewer_record_panel.dart +++ b/violet/lib/pages/viewer/overlay/viewer_record_panel.dart @@ -111,7 +111,8 @@ class _ViewerRecordPanelState extends State { child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), child: Container( - decoration: BoxDecoration(color: Colors.black.withOpacity(0.6)), + decoration: + BoxDecoration(color: Colors.black.withValues(alpha: 0.6)), padding: EdgeInsets.only(bottom: Variables.bottomBarHeight), child: records, ), @@ -119,7 +120,7 @@ class _ViewerRecordPanelState extends State { ); } else { return Container( - color: Colors.black.withOpacity(0.8), + color: Colors.black.withValues(alpha: 0.8), padding: EdgeInsets.only(bottom: Variables.bottomBarHeight), child: records, ); diff --git a/violet/lib/pages/viewer/overlay/viewer_setting_panel.dart b/violet/lib/pages/viewer/overlay/viewer_setting_panel.dart index d8d220e0d..e04a2efc7 100644 --- a/violet/lib/pages/viewer/overlay/viewer_setting_panel.dart +++ b/violet/lib/pages/viewer/overlay/viewer_setting_panel.dart @@ -67,7 +67,7 @@ class _ViewerSettingPanelState extends State { max: 20, min: 1, divisions: (20 - 1) * 2, - inactiveColor: Settings.majorColor.withOpacity(0.7), + inactiveColor: Settings.majorColor.withValues(alpha: 0.7), activeColor: Settings.majorColor, onChangeEnd: (value) async { await Settings.setTimerTick(value); @@ -313,7 +313,8 @@ class _ViewerSettingPanelState extends State { child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), child: Container( - decoration: BoxDecoration(color: Colors.black.withOpacity(0.6)), + decoration: + BoxDecoration(color: Colors.black.withValues(alpha: 0.6)), padding: EdgeInsets.only(bottom: Variables.bottomBarHeight), child: listview, ), @@ -321,7 +322,7 @@ class _ViewerSettingPanelState extends State { ); } else { return Container( - color: Colors.black.withOpacity(0.8), + color: Colors.black.withValues(alpha: 0.8), padding: EdgeInsets.only(bottom: Variables.bottomBarHeight), child: listview, ); diff --git a/violet/lib/pages/viewer/overlay/viewer_tab_panel.dart b/violet/lib/pages/viewer/overlay/viewer_tab_panel.dart index 081f80a39..db13647de 100644 --- a/violet/lib/pages/viewer/overlay/viewer_tab_panel.dart +++ b/violet/lib/pages/viewer/overlay/viewer_tab_panel.dart @@ -105,7 +105,8 @@ class _ViewerTabPanelState extends State { child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), child: Container( - decoration: BoxDecoration(color: Colors.black.withOpacity(0.4)), + decoration: + BoxDecoration(color: Colors.black.withValues(alpha: 0.4)), padding: EdgeInsets.only(bottom: Variables.bottomBarHeight), child: view, ), @@ -113,7 +114,7 @@ class _ViewerTabPanelState extends State { ); } else { return Container( - color: Colors.black.withOpacity(0.8), + color: Colors.black.withValues(alpha: 0.8), padding: EdgeInsets.only(bottom: Variables.bottomBarHeight), child: view, ); diff --git a/violet/lib/pages/viewer/overlay/viewer_thumbnails.dart b/violet/lib/pages/viewer/overlay/viewer_thumbnails.dart index 17218b2cd..dca8a54fb 100644 --- a/violet/lib/pages/viewer/overlay/viewer_thumbnails.dart +++ b/violet/lib/pages/viewer/overlay/viewer_thumbnails.dart @@ -77,7 +77,8 @@ class _ViewerThumbnailState extends State { child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), child: Container( - decoration: BoxDecoration(color: Colors.black.withOpacity(0.4)), + decoration: + BoxDecoration(color: Colors.black.withValues(alpha: 0.4)), padding: EdgeInsets.only(bottom: Variables.bottomBarHeight), child: _buildThumbanilsList(), ), @@ -85,7 +86,7 @@ class _ViewerThumbnailState extends State { ); } else { return Container( - color: Colors.black.withOpacity(0.8), + color: Colors.black.withValues(alpha: 0.8), padding: EdgeInsets.only(bottom: Variables.bottomBarHeight), child: _buildThumbanilsList(), ); @@ -225,7 +226,7 @@ class _ViewerThumbnailState extends State { child: Container( padding: const EdgeInsets.only(bottom: 1), width: double.infinity, - color: Colors.black.withOpacity(0.7), + color: Colors.black.withValues(alpha: 0.7), child: Text( '${index + 1} page', textAlign: TextAlign.right, diff --git a/violet/lib/pages/viewer/viewer_page.dart b/violet/lib/pages/viewer/viewer_page.dart index 69fae0a5e..bfc50974f 100644 --- a/violet/lib/pages/viewer/viewer_page.dart +++ b/violet/lib/pages/viewer/viewer_page.dart @@ -130,7 +130,7 @@ class _ViewerPageState extends State { return PopScope( canPop: true, - onPopInvoked: _handlePopInvoked, + onPopInvokedWithResult: _handlePopInvoked, child: pageKeyListener, ); } @@ -266,7 +266,7 @@ class _ViewerPageState extends State { await _savePageRead(); } - Future _handlePopInvoked(bool didPop) async { + Future _handlePopInvoked(bool didPop, dynamic _) async { await _close(); } diff --git a/violet/lib/widgets/article_item/article_list_item_widget.dart b/violet/lib/widgets/article_item/article_list_item_widget.dart index 065d130bd..03d161e99 100644 --- a/violet/lib/widgets/article_item/article_list_item_widget.dart +++ b/violet/lib/widgets/article_item/article_list_item_widget.dart @@ -317,8 +317,8 @@ class _ArticleListItemWidgetState extends State child: ToastWrapper( icon: c.isBookmarked.value ? Icons.delete_forever : Icons.check, color: c.isBookmarked.value - ? Colors.redAccent.withOpacity(0.8) - : Colors.greenAccent.withOpacity(0.8), + ? Colors.redAccent.withValues(alpha: 0.8) + : Colors.greenAccent.withValues(alpha: 0.8), msg: '${data.queryResult.id()}${locale.Translations.instance!.trans(c.isBookmarked.value ? 'removetobookmark' : 'addtobookmark')}', ), @@ -434,13 +434,13 @@ class BodyWidget extends StatelessWidget { ? Palette.blackThemeBackground : Colors.grey.shade800 : Colors.white70 - : Colors.grey.withOpacity(0.3), + : Colors.grey.withValues(alpha: 0.3), borderRadius: const BorderRadius.all(Radius.circular(3)), boxShadow: [ BoxShadow( color: Settings.themeWhat - ? Colors.grey.withOpacity(0.08) - : Colors.grey.withOpacity(0.4), + ? Colors.grey.withValues(alpha: 0.08) + : Colors.grey.withValues(alpha: 0.4), spreadRadius: 5, blurRadius: 7, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/widgets/article_item/thumbnail_view_page.dart b/violet/lib/widgets/article_item/thumbnail_view_page.dart index e92f7fb22..5e7816074 100644 --- a/violet/lib/widgets/article_item/thumbnail_view_page.dart +++ b/violet/lib/widgets/article_item/thumbnail_view_page.dart @@ -48,8 +48,8 @@ class _ThumbnailViewPageState extends State { boxShadow: [ BoxShadow( color: Settings.themeWhat - ? Colors.black.withOpacity(0.2) - : Colors.grey.withOpacity(0.2), + ? Colors.black.withValues(alpha: 0.2) + : Colors.grey.withValues(alpha: 0.2), spreadRadius: 1, blurRadius: 1, offset: const Offset(0, 3), // changes position of shadow diff --git a/violet/lib/widgets/toast.dart b/violet/lib/widgets/toast.dart index bc0fd2ed4..5ef700824 100644 --- a/violet/lib/widgets/toast.dart +++ b/violet/lib/widgets/toast.dart @@ -78,10 +78,10 @@ class _ToastWrapperState extends State Widget build(BuildContext context) { var color = widget.color ?? (widget.isCheck - ? Colors.greenAccent.withOpacity(0.8) + ? Colors.greenAccent.withValues(alpha: 0.8) : widget.isWarning - ? Colors.orangeAccent.withOpacity(0.8) - : Colors.redAccent.withOpacity(0.8)); + ? Colors.orangeAccent.withValues(alpha: 0.8) + : Colors.redAccent.withValues(alpha: 0.8)); return IgnorePointer( child: Visibility( @@ -118,15 +118,15 @@ class _ToastWrapperState extends State horizontal: 24.0, vertical: 12.0), decoration: BoxDecoration( color: Settings.themeWhat - ? Colors.black.withOpacity(0.6) - : Colors.grey.withOpacity(0.1)), + ? Colors.black.withValues(alpha: 0.6) + : Colors.grey.withValues(alpha: 0.1)), // decoration: BoxDecoration( // borderRadius: BorderRadius.circular(25.0), // color: widget.isCheck - // ? Colors.greenAccent.withOpacity(0.8) + // ? Colors.greenAccent.withValues(alpha: 0.8) // : widget.isWarning != null && widget.isWarning - // ? Colors.orangeAccent.withOpacity(0.8) - // : Colors.redAccent.withOpacity(0.8), + // ? Colors.orangeAccent.withValues(alpha: 0.8) + // : Colors.redAccent.withValues(alpha: 0.8), // ), child: Row( mainAxisSize: MainAxisSize.min, diff --git a/violet/pubspec.lock b/violet/pubspec.lock index d416e7e9b..b255b9e16 100644 --- a/violet/pubspec.lock +++ b/violet/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" + sha256: e051259913915ea5bc8fe18664596bea08592fd123930605d562969cd7315fcd url: "https://pub.dev" source: hosted - version: "1.3.35" + version: "1.3.51" _macros: dependency: transitive description: dart @@ -557,66 +557,66 @@ packages: dependency: "direct main" description: name: firebase_analytics - sha256: dbf1e7ab22cfb1f4a4adb103b46a26276b4edc593d4a78ef6fb942bafc92e035 + sha256: "47428047a0778f72af53a3c7cb5d556e1cb25e2327cc8aa40d544971dc6245b2" url: "https://pub.dev" source: hosted - version: "10.10.7" + version: "11.4.2" firebase_analytics_platform_interface: dependency: transitive description: name: firebase_analytics_platform_interface - sha256: "3729b74f8cf1d974a27ba70332ecb55ff5ff560edc8164a6469f4a055b429c37" + sha256: "1076f4b041f76143e14878c70f0758f17fe5910c0cd992db9e93bd3c3584512b" url: "https://pub.dev" source: hosted - version: "3.10.8" + version: "4.3.2" firebase_analytics_web: dependency: transitive description: name: firebase_analytics_web - sha256: "019cd7eee74254d33fbd2e29229367ce33063516bf6b3258a341d89e3b0f1655" + sha256: "8f6dd64ea6d28b7f5b9e739d183a9e1c7f17027794a3e9aba1879621d42426ef" url: "https://pub.dev" source: hosted - version: "0.5.7+7" + version: "0.5.10+8" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" + sha256: "93dc4dd12f9b02c5767f235307f609e61ed9211047132d07f9e02c668f0bfc33" url: "https://pub.dev" source: hosted - version: "2.32.0" + version: "3.11.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: f7d7180c7f99babd4b4c517754d41a09a4943a0f7a69b65c894ca5c68ba66315 + sha256: d7253d255ff10f85cfd2adaba9ac17bae878fa3ba577462451163bd9f1d1f0bf url: "https://pub.dev" source: hosted - version: "5.2.1" + version: "5.4.0" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: f4ee170441ca141c5f9ee5ad8737daba3ee9c8e7efb6902aee90b4fbd178ce25 + sha256: "0e13c80f0de8acaa5d0519cbe23c8b4cc138a2d5d508b5755c861bdfc9762678" url: "https://pub.dev" source: hosted - version: "2.18.0" + version: "2.20.0" firebase_crashlytics: dependency: "direct main" description: name: firebase_crashlytics - sha256: "9897c01efaa950d2f6da8317d12452749a74dc45f33b46390a14cfe28067f271" + sha256: "6273ed71bcd8a6fb4d0ca13d3abddbb3301796807efaad8782b5f90156f26f03" url: "https://pub.dev" source: hosted - version: "3.5.7" + version: "4.3.2" firebase_crashlytics_platform_interface: dependency: transitive description: name: firebase_crashlytics_platform_interface - sha256: "16a71e08fbf6e00382816e1b13397898c29a54fa0ad969c2c2a3b82a704877f0" + sha256: "94f3986e1a10e5a883f2ad5e3d719aef98a8a0f9a49357f6e45b7d3696ea6a97" url: "https://pub.dev" source: hosted - version: "3.6.35" + version: "3.8.2" fixnum: dependency: transitive description: diff --git a/violet/pubspec.yaml b/violet/pubspec.yaml index b29113769..600c6487e 100644 --- a/violet/pubspec.yaml +++ b/violet/pubspec.yaml @@ -74,9 +74,9 @@ dependencies: extended_wrap: ^0.1.5 ffi: ^2.0.2 file_picker: ^8.1.2 - firebase_core: ^2.5.0 - firebase_analytics: ^10.1.1 - firebase_crashlytics: ^3.0.12 + firebase_core: ^3.11.0 + firebase_analytics: ^11.4.2 + firebase_crashlytics: ^4.3.2 # flare_dart: flare_flutter: git: