From 1561058113e62c6d083ca28419705418da9ab45c Mon Sep 17 00:00:00 2001 From: DattatreyaReddy Panta <58727124+DattatreyaReddy@users.noreply.github.com> Date: Wed, 17 Jan 2024 00:47:33 +0530 Subject: [PATCH 1/4] added requested features and themes --- .vscode/settings.json | 4 +- lib/src/constants/app_sizes.dart | 34 -- lib/src/constants/app_themes/app_theme.dart | 27 -- .../color_schemas/default_theme.dart | 88 ----- lib/src/constants/db_keys.dart | 4 + .../domain/about/about_model.freezed.dart | 2 +- .../server_update_model.freezed.dart | 2 +- .../about/widget/app_update_dialog.dart | 6 +- .../extension/extension_model.freezed.dart | 2 +- .../domain/filter/filter_model.freezed.dart | 2 +- .../filter_state_model.freezed.dart | 20 +- .../language/language_model.freezed.dart | 2 +- .../domain/manga_page/manga_page.freezed.dart | 2 +- .../domain/source/source_model.freezed.dart | 2 +- .../source_preference.freezed.dart | 2 +- .../source_preference_prop.freezed.dart | 12 +- .../presentation/browse/browse_screen.dart | 1 - .../controller/extension_controller.dart | 6 +- .../controller/extension_controller.g.dart | 2 +- .../source/controller/source_controller.dart | 12 +- .../controller/source_controller.g.dart | 4 +- .../controller/source_manga_controller.dart | 4 +- .../controller/source_manga_controller.g.dart | 2 +- .../source_manga_list_screen.dart | 4 +- .../source_manga_display_icon_popup.dart | 5 +- .../widgets/source_preference_to_widget.dart | 3 +- .../category/category_model.freezed.dart | 2 +- .../category/widgets/category_tile.dart | 7 +- .../widgets/edit_category_dialog.dart | 5 +- .../controller/library_controller.dart | 32 +- .../controller/library_controller.g.dart | 12 +- .../presentation/library/library_screen.dart | 1 - .../domain/chapter/chapter_model.freezed.dart | 2 +- .../chapter_batch_model.freezed.dart | 4 +- .../chapter_page_model.freezed.dart | 4 +- .../chapter_put_model.freezed.dart | 2 +- .../downloads/downloads_model.freezed.dart | 2 +- .../downloads_queue_model.freezed.dart | 2 +- .../domain/manga/manga_model.freezed.dart | 4 +- .../update_status_model.freezed.dart | 2 +- .../downloads/downloads_screen.dart | 5 +- .../controller/manga_details_controller.dart | 28 +- .../manga_details_controller.g.dart | 10 +- .../manga_details/manga_details_screen.dart | 53 +-- .../widgets/chapter_list_tile.dart | 5 +- .../presentation/reader/reader_screen.dart | 11 +- .../reader/widgets/chapter_separator.dart | 5 +- .../reader_mode/continuous_reader_mode.dart | 11 +- .../reader/widgets/reader_wrapper.dart | 13 +- .../widgets/chapter_manga_list_tile.dart | 3 +- .../manga_book/widgets/update_status_fab.dart | 1 - .../domain/quick_search_result.freezed.dart | 18 +- .../backup_missing.freezed.dart | 2 +- .../appearance/appearance_screen.dart | 18 +- .../app_theme_selector.dart | 69 ++++ .../app_theme_selector.g.dart | 25 ++ .../widgets/grid_cover_min_width.dart | 6 +- .../widgets/grid_cover_min_width.g.dart | 2 +- .../is_true_black/is_true_black_tile.dart | 35 ++ .../is_true_black/is_true_black_tile.g.dart | 25 ++ .../show_nsfw_switch/show_nsfw_switch.dart | 7 +- .../show_nsfw_switch/show_nsfw_switch.g.dart | 2 +- .../presentation/general/general_screen.dart | 3 +- .../presentation/more/more_screen.dart | 5 +- .../reader/reader_settings_screen.dart | 15 +- .../reader_initial_overlay_tile.dart | 7 +- .../reader_initial_overlay_tile.g.dart | 2 +- .../reader_invert_tap_tile.dart | 7 +- .../reader_invert_tap_tile.g.dart | 2 +- .../reader_magnifier_size_slider.dart | 7 +- .../reader_magnifier_size_slider.g.dart | 2 +- .../reader_mode_tile/reader_mode_tile.dart | 12 +- .../reader_mode_tile/reader_mode_tile.g.dart | 2 +- .../reader_navigation_layout_tile.dart | 8 +- .../reader_navigation_layout_tile.g.dart | 2 +- .../reader_padding_slider.dart | 7 +- .../reader_padding_slider.g.dart | 2 +- .../reader_invert_tap_tile.g.dart | 25 ++ .../reader_pinch_to_zoom.dart | 34 ++ .../reader_pinch_to_zoom.g.dart | 25 ++ .../reader_volume_tap_tile.g.dart | 25 ++ .../reader_scroll_animation_tile.dart | 7 +- .../reader_scroll_animation_tile.g.dart | 2 +- .../reader_swipe_chapter_toggle_tile.dart | 7 +- .../reader_swipe_chapter_toggle_tile.g.dart | 2 +- .../reader_volume_tap_invert_tile.dart | 8 +- .../reader_volume_tap_invert_tile.g.dart | 2 +- .../reader_volume_tap_tile.dart | 8 +- .../reader_volume_tap_tile.g.dart | 2 +- .../server/widget/auth_type_tile.dart | 4 +- .../credential_popup/credentials_popup.dart | 14 +- .../credential_popup/credentials_popup.g.dart | 2 +- .../app_theme_mode_tile.dart} | 20 +- .../app_theme_mode_tile.g.dart} | 20 +- .../server_port_tile/server_port_tile.dart | 14 +- .../server_port_tile/server_port_tile.g.dart | 4 +- .../server_url_tile/server_url_tile.dart | 9 +- .../server_url_tile/server_url_tile.g.dart | 2 +- .../global_providers/global_providers.dart | 8 +- .../global_providers/global_providers.g.dart | 4 +- lib/src/l10n/app_en.arb | 151 +++++---- lib/src/routes/router_config.dart | 12 +- lib/src/sorayomi.dart | 29 +- .../custom_extensions/context_extensions.dart | 2 +- lib/src/utils/misc/toast/toast.dart | 4 +- .../shared_preferences_client_mixin.dart | 21 +- lib/src/widgets/emoticons.dart | 4 +- .../providers/manga_cover_providers.dart | 12 +- .../providers/manga_cover_providers.g.dart | 4 +- .../manga_cover/widgets/manga_chips.dart | 5 +- lib/src/widgets/server_image.dart | 3 +- lib/src/widgets/text_field_popup.dart | 3 +- macos/Podfile.lock | 6 +- pubspec.lock | 312 ++++++++++-------- pubspec.yaml | 8 +- 115 files changed, 828 insertions(+), 768 deletions(-) delete mode 100644 lib/src/constants/app_themes/app_theme.dart delete mode 100644 lib/src/constants/app_themes/color_schemas/default_theme.dart create mode 100644 lib/src/features/settings/presentation/appearance/widgets/app_theme_selector/app_theme_selector.dart create mode 100644 lib/src/features/settings/presentation/appearance/widgets/app_theme_selector/app_theme_selector.g.dart create mode 100644 lib/src/features/settings/presentation/appearance/widgets/is_true_black/is_true_black_tile.dart create mode 100644 lib/src/features/settings/presentation/appearance/widgets/is_true_black/is_true_black_tile.g.dart create mode 100644 lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_invert_tap_tile.g.dart create mode 100644 lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_pinch_to_zoom.dart create mode 100644 lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_pinch_to_zoom.g.dart create mode 100644 lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_volume_tap_tile.g.dart rename lib/src/features/settings/widgets/{theme_mode_tile/theme_mode_tile.dart => app_theme_mode_tile/app_theme_mode_tile.dart} (79%) rename lib/src/features/settings/widgets/{theme_mode_tile/theme_mode_tile.g.dart => app_theme_mode_tile/app_theme_mode_tile.g.dart} (50%) diff --git a/.vscode/settings.json b/.vscode/settings.json index e3027e40..aea96891 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,10 @@ { "cSpell.words": [ "canonicalized", + "Compat", "dattatreya", "horiz", + "keydown", "kindlish", "localsourcelang", "Mangas", @@ -26,4 +28,4 @@ "licenser.license": "MPLv2", "licenser.projectName": "Tachidesk-Sorayomi", "licenser.author": "Contributors to the Suwayomi project" -} \ No newline at end of file +} diff --git a/lib/src/constants/app_sizes.dart b/lib/src/constants/app_sizes.dart index 84d31e74..b3cef0c7 100644 --- a/lib/src/constants/app_sizes.dart +++ b/lib/src/constants/app_sizes.dart @@ -8,7 +8,6 @@ import 'dart:math'; import 'package:flutter/material.dart'; -import '../utils/extensions/custom_extensions.dart'; import 'app_constants.dart'; import 'db_keys.dart'; @@ -72,39 +71,6 @@ enum KEdgeInsets { final EdgeInsets size; } -enum KSizedBox { - h4(SizedBox(height: 4)), - h8(SizedBox(height: 8)), - w4(SizedBox(width: 4)), - h16(SizedBox(height: 16)), - w16(SizedBox(width: 16)), - h32(SizedBox(height: 32)), - w32(SizedBox(width: 32)), - h64(SizedBox(height: 64)), - w64(SizedBox(width: 64)), - h96(SizedBox(height: 96)), - w96(SizedBox(width: 96)), - h104(SizedBox(height: 104)), - ; - - static SizedBox scale( - BuildContext context, { - double? height, - double? width, - Widget? child, - }) { - return SizedBox( - height: height != null ? context.height * height : null, - width: width != null ? context.width * width : null, - child: child, - ); - } - - const KSizedBox(this.size); - - final SizedBox size; -} - enum KBorderRadius { r8(BorderRadius.all(Radius.circular(8))), r12(BorderRadius.all(Radius.circular(12))), diff --git a/lib/src/constants/app_themes/app_theme.dart b/lib/src/constants/app_themes/app_theme.dart deleted file mode 100644 index 847f6e42..00000000 --- a/lib/src/constants/app_themes/app_theme.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2022 Contributors to the Suwayomi project -// -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -import 'package:flutter/material.dart'; - -class ThemeColorSchema { - final ColorScheme light; - final ColorScheme dark; - const ThemeColorSchema(this.light, this.dark); -} - -class LightAndDarkThemeData { - late final ThemeData light; - final ThemeData dark; - LightAndDarkThemeData(ThemeData light, this.dark) { - this.light = light.copyWith( - tabBarTheme: TabBarTheme( - labelColor: light.colorScheme.primary, - unselectedLabelColor: light.colorScheme.onBackground, - ), - indicatorColor: light.colorScheme.primary, - ); - } -} diff --git a/lib/src/constants/app_themes/color_schemas/default_theme.dart b/lib/src/constants/app_themes/color_schemas/default_theme.dart deleted file mode 100644 index b3f1320d..00000000 --- a/lib/src/constants/app_themes/color_schemas/default_theme.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2022 Contributors to the Suwayomi project -// -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -import 'package:flutter/material.dart'; - -import '../app_theme.dart'; - -final LightAndDarkThemeData defaultTheme = LightAndDarkThemeData( - ThemeData( - useMaterial3: true, - colorScheme: _lightColorScheme, - ), - ThemeData( - useMaterial3: true, - colorScheme: _darkColorScheme, - ), -); - -const _lightColorScheme = ColorScheme( - brightness: Brightness.light, - primary: Color(0xFF335CA8), - onPrimary: Color(0xFFFFFFFF), - primaryContainer: Color(0xFFD8E2FF), - onPrimaryContainer: Color(0xFF001A42), - secondary: Color(0xFF335CA8), - onSecondary: Color(0xFFFFFFFF), - secondaryContainer: Color(0xFFD8E2FF), - onSecondaryContainer: Color(0xFF001A42), - tertiary: Color(0xFF006E1B), - onTertiary: Color(0xFFFFFFFF), - tertiaryContainer: Color(0xFF95F990), - onTertiaryContainer: Color(0xFF002203), - error: Color(0xFFBA1A1A), - errorContainer: Color(0xFFFFDAD6), - onError: Color(0xFFFFFFFF), - onErrorContainer: Color(0xFF410002), - background: Color(0xFFFEFBFF), - onBackground: Color(0xFF1B1B1F), - surface: Color(0xFFFEFBFF), - onSurface: Color(0xFF1B1B1F), - surfaceVariant: Color(0xFFE1E2EC), - onSurfaceVariant: Color(0xFF44474F), - outline: Color(0xFF757780), - onInverseSurface: Color(0xFFF2F0F4), - inverseSurface: Color(0xFF303034), - inversePrimary: Color(0xFFAEC6FF), - shadow: Color(0xFF000000), - surfaceTint: Color(0xFF335CA8), - outlineVariant: Color(0xFFC5C6D0), - scrim: Color(0xFF000000), -); - -const _darkColorScheme = ColorScheme( - brightness: Brightness.dark, - primary: Color(0xFFAEC6FF), - onPrimary: Color(0xFF002E6B), - primaryContainer: Color(0xFF13448F), - onPrimaryContainer: Color(0xFFD8E2FF), - secondary: Color(0xFFAEC6FF), - onSecondary: Color(0xFF002E6B), - secondaryContainer: Color(0xFF13448F), - onSecondaryContainer: Color(0xFFD8E2FF), - tertiary: Color(0xFF7ADC77), - onTertiary: Color(0xFF003909), - tertiaryContainer: Color(0xFF005312), - onTertiaryContainer: Color(0xFF95F990), - error: Color(0xFFFFB4AB), - errorContainer: Color(0xFF93000A), - onError: Color(0xFF690005), - onErrorContainer: Color(0xFFFFDAD6), - background: Color(0xFF1B1B1F), - onBackground: Color(0xFFE3E2E6), - surface: Color(0xFF1B1B1F), - onSurface: Color(0xFFE3E2E6), - surfaceVariant: Color(0xFF44474F), - onSurfaceVariant: Color(0xFFC5C6D0), - outline: Color(0xFF8E9099), - onInverseSurface: Color(0xFF1B1B1F), - inverseSurface: Color(0xFFE3E2E6), - inversePrimary: Color(0xFF335CA8), - shadow: Color(0xFF000000), - surfaceTint: Color(0xFFAEC6FF), - outlineVariant: Color(0xFF44474F), - scrim: Color(0xFF000000), -); diff --git a/lib/src/constants/db_keys.dart b/lib/src/constants/db_keys.dart index 631b382a..0e3e06f1 100644 --- a/lib/src/constants/db_keys.dart +++ b/lib/src/constants/db_keys.dart @@ -4,6 +4,7 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. +import 'package:flex_color_scheme/flex_color_scheme.dart'; import 'package:flutter/material.dart'; import 'enum.dart'; @@ -16,6 +17,7 @@ enum DBKeys { extensionLanguageFilter(["installed", "update", "en", "all"]), sourceLastUsed(null), themeMode(ThemeMode.system), + isTrueBlack(false), authType(AuthType.none), basicCredentials(null), readerMode(ReaderMode.webtoon), @@ -46,6 +48,8 @@ enum DBKeys { readerOverlay(true), volumeTap(false), volumeTapInvert(false), + pinchToZoom(true), + flexScheme(FlexScheme.material), ; const DBKeys(this.initial); diff --git a/lib/src/features/about/domain/about/about_model.freezed.dart b/lib/src/features/about/domain/about/about_model.freezed.dart index 5b0c0a4c..ec5ba4d9 100644 --- a/lib/src/features/about/domain/about/about_model.freezed.dart +++ b/lib/src/features/about/domain/about/about_model.freezed.dart @@ -207,7 +207,7 @@ class _$AboutImpl implements _About { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AboutImpl && diff --git a/lib/src/features/about/domain/server_update/server_update_model.freezed.dart b/lib/src/features/about/domain/server_update/server_update_model.freezed.dart index ae824973..6769c458 100644 --- a/lib/src/features/about/domain/server_update/server_update_model.freezed.dart +++ b/lib/src/features/about/domain/server_update/server_update_model.freezed.dart @@ -137,7 +137,7 @@ class _$ServerUpdateImpl implements _ServerUpdate { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ServerUpdateImpl && diff --git a/lib/src/features/about/presentation/about/widget/app_update_dialog.dart b/lib/src/features/about/presentation/about/widget/app_update_dialog.dart index e9c8a681..528c23b4 100644 --- a/lib/src/features/about/presentation/about/widget/app_update_dialog.dart +++ b/lib/src/features/about/presentation/about/widget/app_update_dialog.dart @@ -6,10 +6,8 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:go_router/go_router.dart'; import '../../../../../constants/urls.dart'; - import '../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../utils/launch_url_in_web.dart'; import '../../../../../utils/misc/toast/toast.dart'; @@ -29,14 +27,14 @@ void appUpdateDialog({ content: Text(context.l10n!.versionAvailable(title, newRelease)), actions: [ TextButton( - onPressed: () => context.pop(), + onPressed: () => Navigator.pop(context), child: Text(context.l10n!.close), ), ElevatedButton.icon( onPressed: () { launchUrlInWeb(context, url ?? AppUrls.sorayomiLatestReleaseUrl.url, toast); - context.pop(); + Navigator.pop(context); }, icon: const Icon(FontAwesomeIcons.github), label: Text(context.l10n!.gitHub), diff --git a/lib/src/features/browse_center/domain/extension/extension_model.freezed.dart b/lib/src/features/browse_center/domain/extension/extension_model.freezed.dart index 036d2a53..4317427d 100644 --- a/lib/src/features/browse_center/domain/extension/extension_model.freezed.dart +++ b/lib/src/features/browse_center/domain/extension/extension_model.freezed.dart @@ -305,7 +305,7 @@ class _$ExtensionImpl implements _Extension { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ExtensionImpl && diff --git a/lib/src/features/browse_center/domain/filter/filter_model.freezed.dart b/lib/src/features/browse_center/domain/filter/filter_model.freezed.dart index 46fcea51..3a18d33b 100644 --- a/lib/src/features/browse_center/domain/filter/filter_model.freezed.dart +++ b/lib/src/features/browse_center/domain/filter/filter_model.freezed.dart @@ -149,7 +149,7 @@ class _$FilterImpl implements _Filter { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FilterImpl && diff --git a/lib/src/features/browse_center/domain/filter_state/filter_state_model.freezed.dart b/lib/src/features/browse_center/domain/filter_state/filter_state_model.freezed.dart index 89d93561..76957d02 100644 --- a/lib/src/features/browse_center/domain/filter_state/filter_state_model.freezed.dart +++ b/lib/src/features/browse_center/domain/filter_state/filter_state_model.freezed.dart @@ -222,7 +222,7 @@ class _$FilterHeaderImpl implements FilterHeader { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FilterHeaderImpl && @@ -432,7 +432,7 @@ class _$FilterSeparatorImpl implements FilterSeparator { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FilterSeparatorImpl && @@ -643,7 +643,7 @@ class _$FilterTextImpl implements FilterText { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FilterTextImpl && @@ -853,7 +853,7 @@ class _$FilterCheckBoxImpl implements FilterCheckBox { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FilterCheckBoxImpl && @@ -1064,7 +1064,7 @@ class _$FilterTriStateImpl implements FilterTriState { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FilterTriStateImpl && @@ -1305,7 +1305,7 @@ class _$FilterSortImpl implements FilterSort { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FilterSortImpl && @@ -1539,7 +1539,7 @@ class _$FilterSelectImpl implements FilterSelect { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FilterSelectImpl && @@ -1765,7 +1765,7 @@ class _$FilterGroupImpl implements FilterGroup { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FilterGroupImpl && @@ -2024,7 +2024,7 @@ class _$SortStateImpl implements _SortState { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SortStateImpl && @@ -2178,7 +2178,7 @@ class _$SelectValuesImpl implements _SelectValues { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SelectValuesImpl && diff --git a/lib/src/features/browse_center/domain/language/language_model.freezed.dart b/lib/src/features/browse_center/domain/language/language_model.freezed.dart index fa801cf7..55da1d48 100644 --- a/lib/src/features/browse_center/domain/language/language_model.freezed.dart +++ b/lib/src/features/browse_center/domain/language/language_model.freezed.dart @@ -136,7 +136,7 @@ class _$LanguageImpl extends _Language { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LanguageImpl && diff --git a/lib/src/features/browse_center/domain/manga_page/manga_page.freezed.dart b/lib/src/features/browse_center/domain/manga_page/manga_page.freezed.dart index b17645d4..59654d82 100644 --- a/lib/src/features/browse_center/domain/manga_page/manga_page.freezed.dart +++ b/lib/src/features/browse_center/domain/manga_page/manga_page.freezed.dart @@ -132,7 +132,7 @@ class _$MangaPageImpl implements _MangaPage { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MangaPageImpl && diff --git a/lib/src/features/browse_center/domain/source/source_model.freezed.dart b/lib/src/features/browse_center/domain/source/source_model.freezed.dart index 443bb3cb..5276f0dc 100644 --- a/lib/src/features/browse_center/domain/source/source_model.freezed.dart +++ b/lib/src/features/browse_center/domain/source/source_model.freezed.dart @@ -255,7 +255,7 @@ class _$SourceImpl implements _Source { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SourceImpl && diff --git a/lib/src/features/browse_center/domain/source_preference/source_preference.freezed.dart b/lib/src/features/browse_center/domain/source_preference/source_preference.freezed.dart index fa46e716..addd3ec1 100644 --- a/lib/src/features/browse_center/domain/source_preference/source_preference.freezed.dart +++ b/lib/src/features/browse_center/domain/source_preference/source_preference.freezed.dart @@ -154,7 +154,7 @@ class _$SourcePreferenceImpl implements _SourcePreference { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SourcePreferenceImpl && diff --git a/lib/src/features/browse_center/domain/source_preference_prop/source_preference_prop.freezed.dart b/lib/src/features/browse_center/domain/source_preference_prop/source_preference_prop.freezed.dart index 8687e5d7..3a0c109c 100644 --- a/lib/src/features/browse_center/domain/source_preference_prop/source_preference_prop.freezed.dart +++ b/lib/src/features/browse_center/domain/source_preference_prop/source_preference_prop.freezed.dart @@ -293,7 +293,7 @@ class _$FallbackImpl implements Fallback { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FallbackImpl && @@ -620,7 +620,7 @@ class _$CheckBoxPreferenceImpl implements CheckBoxPreference { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CheckBoxPreferenceImpl && @@ -969,7 +969,7 @@ class _$SwitchPreferenceCompatImpl implements SwitchPreferenceCompat { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SwitchPreferenceCompatImpl && @@ -1332,7 +1332,7 @@ class _$ListPreferenceImpl implements ListPreference { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ListPreferenceImpl && @@ -1726,7 +1726,7 @@ class _$MultiSelectListPreferenceImpl implements MultiSelectListPreference { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MultiSelectListPreferenceImpl && @@ -2109,7 +2109,7 @@ class _$EditTextPreferenceImpl implements EditTextPreference { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$EditTextPreferenceImpl && diff --git a/lib/src/features/browse_center/presentation/browse/browse_screen.dart b/lib/src/features/browse_center/presentation/browse/browse_screen.dart index df3e7d08..596c01e5 100644 --- a/lib/src/features/browse_center/presentation/browse/browse_screen.dart +++ b/lib/src/features/browse_center/presentation/browse/browse_screen.dart @@ -9,7 +9,6 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../constants/app_sizes.dart'; - import '../../../../routes/router_config.dart'; import '../../../../utils/extensions/custom_extensions.dart'; import '../../../../widgets/search_field.dart'; diff --git a/lib/src/features/browse_center/presentation/extension/controller/extension_controller.dart b/lib/src/features/browse_center/presentation/extension/controller/extension_controller.dart index d3914d02..0ad37af5 100644 --- a/lib/src/features/browse_center/presentation/extension/controller/extension_controller.dart +++ b/lib/src/features/browse_center/presentation/extension/controller/extension_controller.dart @@ -73,11 +73,7 @@ List extensionFilterLangList(ExtensionFilterLangListRef ref) { class ExtensionLanguageFilter extends _$ExtensionLanguageFilter with SharedPreferenceClientMixin> { @override - List? build() => initialize( - ref, - key: DBKeys.extensionLanguageFilter.name, - initial: DBKeys.extensionLanguageFilter.initial, - ); + List? build() => initialize(DBKeys.extensionLanguageFilter); } @riverpod diff --git a/lib/src/features/browse_center/presentation/extension/controller/extension_controller.g.dart b/lib/src/features/browse_center/presentation/extension/controller/extension_controller.g.dart index f2002cd7..9d1ca6bf 100644 --- a/lib/src/features/browse_center/presentation/extension/controller/extension_controller.g.dart +++ b/lib/src/features/browse_center/presentation/extension/controller/extension_controller.g.dart @@ -90,7 +90,7 @@ final extensionMapFilteredAndQueriedProvider = typedef ExtensionMapFilteredAndQueriedRef = AutoDisposeProviderRef>>>; String _$extensionLanguageFilterHash() => - r'88d38cadc3c1d8ac110d8f0e6150bae813c204f4'; + r'6a687d8f842a353a9d5ed7f4333f99b8557a2e0c'; /// See also [ExtensionLanguageFilter]. @ProviderFor(ExtensionLanguageFilter) diff --git a/lib/src/features/browse_center/presentation/source/controller/source_controller.dart b/lib/src/features/browse_center/presentation/source/controller/source_controller.dart index e8bec3d9..7bae8734 100644 --- a/lib/src/features/browse_center/presentation/source/controller/source_controller.dart +++ b/lib/src/features/browse_center/presentation/source/controller/source_controller.dart @@ -99,20 +99,12 @@ List? sourceQuery(SourceQueryRef ref, {String? query}) { class SourceLanguageFilter extends _$SourceLanguageFilter with SharedPreferenceClientMixin> { @override - List? build() => initialize( - ref, - key: DBKeys.sourceLanguageFilter.name, - initial: DBKeys.sourceLanguageFilter.initial, - ); + List? build() => initialize(DBKeys.sourceLanguageFilter); } @riverpod class SourceLastUsed extends _$SourceLastUsed with SharedPreferenceClientMixin { @override - String? build() => initialize( - ref, - key: DBKeys.sourceLastUsed.name, - initial: DBKeys.sourceLastUsed.initial, - ); + String? build() => initialize(DBKeys.sourceLastUsed); } diff --git a/lib/src/features/browse_center/presentation/source/controller/source_controller.g.dart b/lib/src/features/browse_center/presentation/source/controller/source_controller.g.dart index 24508e47..2bb86ee7 100644 --- a/lib/src/features/browse_center/presentation/source/controller/source_controller.g.dart +++ b/lib/src/features/browse_center/presentation/source/controller/source_controller.g.dart @@ -220,7 +220,7 @@ final sourceFilterLangMapProvider = AutoDisposeNotifierProvider< typedef _$SourceFilterLangMap = AutoDisposeNotifier>; String _$sourceLanguageFilterHash() => - r'a5a8701a5d14b4c784744131113eb56cf1979dbc'; + r'8b8f9811770558706a1a9da80a51dc59ac541afa'; /// See also [SourceLanguageFilter]. @ProviderFor(SourceLanguageFilter) @@ -236,7 +236,7 @@ final sourceLanguageFilterProvider = ); typedef _$SourceLanguageFilter = AutoDisposeNotifier?>; -String _$sourceLastUsedHash() => r'afe764b063f80d11ed033dd6386ad8133b2c0fcd'; +String _$sourceLastUsedHash() => r'd7e60ae5aec05d5ae9bf07ed32c57c7d9fc9ccf8'; /// See also [SourceLastUsed]. @ProviderFor(SourceLastUsed) diff --git a/lib/src/features/browse_center/presentation/source_manga_list/controller/source_manga_controller.dart b/lib/src/features/browse_center/presentation/source_manga_list/controller/source_manga_controller.dart index d443a744..af1d1682 100644 --- a/lib/src/features/browse_center/presentation/source_manga_list/controller/source_manga_controller.dart +++ b/lib/src/features/browse_center/presentation/source_manga_list/controller/source_manga_controller.dart @@ -78,9 +78,7 @@ class SourceDisplayMode extends _$SourceDisplayMode with SharedPreferenceEnumClientMixin { @override DisplayMode? build() => initialize( - ref, - key: DBKeys.sourceDisplayMode.name, - initial: DBKeys.sourceDisplayMode.initial, + DBKeys.sourceDisplayMode, enumList: DisplayMode.sourceDisplayList, ); } diff --git a/lib/src/features/browse_center/presentation/source_manga_list/controller/source_manga_controller.g.dart b/lib/src/features/browse_center/presentation/source_manga_list/controller/source_manga_controller.g.dart index 9a4f0f5c..90c8d408 100644 --- a/lib/src/features/browse_center/presentation/source_manga_list/controller/source_manga_controller.g.dart +++ b/lib/src/features/browse_center/presentation/source_manga_list/controller/source_manga_controller.g.dart @@ -458,7 +458,7 @@ class _SourceMangaFilterListProviderElement List? get filter => (origin as SourceMangaFilterListProvider).filter; } -String _$sourceDisplayModeHash() => r'363b2f9b0683cd1abea761e244ae9362260f4c5e'; +String _$sourceDisplayModeHash() => r'f386ba15fdc6025e0471b7ffc8066162d83ea083'; /// See also [SourceDisplayMode]. @ProviderFor(SourceDisplayMode) diff --git a/lib/src/features/browse_center/presentation/source_manga_list/source_manga_list_screen.dart b/lib/src/features/browse_center/presentation/source_manga_list/source_manga_list_screen.dart index f6252682..2f5ebf1d 100644 --- a/lib/src/features/browse_center/presentation/source_manga_list/source_manga_list_screen.dart +++ b/lib/src/features/browse_center/presentation/source_manga_list/source_manga_list_screen.dart @@ -6,13 +6,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart'; import '../../../../constants/app_sizes.dart'; import '../../../../constants/enum.dart'; - import '../../../../routes/router_config.dart'; import '../../../../utils/extensions/custom_extensions.dart'; import '../../../../utils/hooks/paging_controller_hook.dart'; @@ -92,7 +90,7 @@ class SourceMangaListScreen extends HookConsumerWidget { onReset: () => ref.read(provider.notifier).reset(), onSubmitted: (value) { if (sourceType == SourceType.filter) { - context.pop(); + Navigator.pop(context); ref.read(provider.notifier).updateFilter(value); controller.refresh(); } else { diff --git a/lib/src/features/browse_center/presentation/source_manga_list/widgets/source_manga_display_icon_popup.dart b/lib/src/features/browse_center/presentation/source_manga_list/widgets/source_manga_display_icon_popup.dart index ca6c51ff..88932947 100644 --- a/lib/src/features/browse_center/presentation/source_manga_list/widgets/source_manga_display_icon_popup.dart +++ b/lib/src/features/browse_center/presentation/source_manga_list/widgets/source_manga_display_icon_popup.dart @@ -5,13 +5,10 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; - import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../../constants/db_keys.dart'; import '../../../../../constants/enum.dart'; - import '../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../widgets/radio_list_popup.dart'; import '../controller/source_manga_controller.dart'; @@ -34,7 +31,7 @@ class SourceMangaDisplayIconPopup extends ConsumerWidget { value: displayMode, onChange: (enumValue) async { ref.read(sourceDisplayModeProvider.notifier).update(enumValue); - if (context.mounted) context.pop(); + if (context.mounted) Navigator.pop(context); }, ), ), diff --git a/lib/src/features/browse_center/presentation/source_preference/widgets/source_preference_to_widget.dart b/lib/src/features/browse_center/presentation/source_preference/widgets/source_preference_to_widget.dart index 7d012d9d..ad91066f 100644 --- a/lib/src/features/browse_center/presentation/source_preference/widgets/source_preference_to_widget.dart +++ b/lib/src/features/browse_center/presentation/source_preference/widgets/source_preference_to_widget.dart @@ -5,7 +5,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; import '../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../widgets/multi_select_popup.dart'; @@ -27,7 +26,7 @@ class SourcePreferenceToWidget extends StatelessWidget { void onChangedPreferenceCopyWith(T prop, [BuildContext? context]) { onChanged(sourcePreference.copyWith(sourcePreferenceProp: prop)); - if (context != null) context.pop(); + if (context != null) Navigator.pop(context); } @override diff --git a/lib/src/features/library/domain/category/category_model.freezed.dart b/lib/src/features/library/domain/category/category_model.freezed.dart index f405c4f6..435a96e4 100644 --- a/lib/src/features/library/domain/category/category_model.freezed.dart +++ b/lib/src/features/library/domain/category/category_model.freezed.dart @@ -163,7 +163,7 @@ class _$CategoryImpl implements _Category { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CategoryImpl && diff --git a/lib/src/features/library/presentation/category/widgets/category_tile.dart b/lib/src/features/library/presentation/category/widgets/category_tile.dart index a52f9583..665c9450 100644 --- a/lib/src/features/library/presentation/category/widgets/category_tile.dart +++ b/lib/src/features/library/presentation/category/widgets/category_tile.dart @@ -5,11 +5,10 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; +import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../../constants/app_sizes.dart'; - import '../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../widgets/pop_button.dart'; import '../../../domain/category/category_model.dart'; @@ -89,7 +88,7 @@ class CategoryTile extends HookConsumerWidget { ref .read(categoryControllerProvider.notifier) .deleteCategory(category); - context.pop(); + Navigator.pop(context); }, child: Text(context.l10n!.delete), ), @@ -101,7 +100,7 @@ class CategoryTile extends HookConsumerWidget { ), ], ), - KSizedBox.h8.size, + const Gap(8), ], ), ), diff --git a/lib/src/features/library/presentation/category/widgets/edit_category_dialog.dart b/lib/src/features/library/presentation/category/widgets/edit_category_dialog.dart index 5a1efc67..2fcbd5a8 100644 --- a/lib/src/features/library/presentation/category/widgets/edit_category_dialog.dart +++ b/lib/src/features/library/presentation/category/widgets/edit_category_dialog.dart @@ -6,7 +6,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../../utils/extensions/custom_extensions.dart'; @@ -61,7 +60,7 @@ class EditCategoryDialog extends HookConsumerWidget { categoryName.text, defaultCategory.value, ); - context.pop(); + Navigator.pop(context); } : null, ), @@ -89,7 +88,7 @@ class EditCategoryDialog extends HookConsumerWidget { return; } submitEditCategory(categoryName.text, defaultCategory.value); - context.pop(); + Navigator.pop(context); }, child: Text(context.l10n!.save), ), diff --git a/lib/src/features/library/presentation/library/controller/library_controller.dart b/lib/src/features/library/presentation/library/controller/library_controller.dart index fc1f7f09..06ba5629 100644 --- a/lib/src/features/library/presentation/library/controller/library_controller.dart +++ b/lib/src/features/library/presentation/library/controller/library_controller.dart @@ -112,33 +112,21 @@ class LibraryQuery extends _$LibraryQuery with StateProviderMixin { class LibraryMangaFilterDownloaded extends _$LibraryMangaFilterDownloaded with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.mangaFilterDownloaded.name, - initial: DBKeys.mangaFilterDownloaded.initial, - ); + bool? build() => initialize(DBKeys.mangaFilterDownloaded); } @riverpod class LibraryMangaFilterUnread extends _$LibraryMangaFilterUnread with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.mangaFilterUnread.name, - initial: DBKeys.mangaFilterUnread.initial, - ); + bool? build() => initialize(DBKeys.mangaFilterUnread); } @riverpod class LibraryMangaFilterCompleted extends _$LibraryMangaFilterCompleted with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.mangaFilterCompleted.name, - initial: DBKeys.mangaFilterCompleted.initial, - ); + bool? build() => initialize(DBKeys.mangaFilterCompleted); } @riverpod @@ -146,9 +134,7 @@ class LibraryMangaSort extends _$LibraryMangaSort with SharedPreferenceEnumClientMixin { @override MangaSort? build() => initialize( - ref, - key: DBKeys.mangaSort.name, - initial: DBKeys.mangaSort.initial, + DBKeys.mangaSort, enumList: MangaSort.values, ); } @@ -157,11 +143,7 @@ class LibraryMangaSort extends _$LibraryMangaSort class LibraryMangaSortDirection extends _$LibraryMangaSortDirection with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.mangaSortDirection.name, - initial: DBKeys.mangaSortDirection.initial, - ); + bool? build() => initialize(DBKeys.mangaSortDirection); } @riverpod @@ -169,9 +151,7 @@ class LibraryDisplayMode extends _$LibraryDisplayMode with SharedPreferenceEnumClientMixin { @override DisplayMode? build() => initialize( - ref, - key: DBKeys.libraryDisplayMode.name, - initial: DBKeys.libraryDisplayMode.initial, + DBKeys.libraryDisplayMode, enumList: DisplayMode.values, ); } diff --git a/lib/src/features/library/presentation/library/controller/library_controller.g.dart b/lib/src/features/library/presentation/library/controller/library_controller.g.dart index eb51d34c..fe3e0a41 100644 --- a/lib/src/features/library/presentation/library/controller/library_controller.g.dart +++ b/lib/src/features/library/presentation/library/controller/library_controller.g.dart @@ -342,7 +342,7 @@ final libraryQueryProvider = typedef _$LibraryQuery = AutoDisposeNotifier; String _$libraryMangaFilterDownloadedHash() => - r'4b5c2ca8b1f0321d704f8676676f62eb3eb21888'; + r'85e6dc002b8d627d09f88aef898a1810a5830ce5'; /// See also [LibraryMangaFilterDownloaded]. @ProviderFor(LibraryMangaFilterDownloaded) @@ -359,7 +359,7 @@ final libraryMangaFilterDownloadedProvider = typedef _$LibraryMangaFilterDownloaded = AutoDisposeNotifier; String _$libraryMangaFilterUnreadHash() => - r'26994046eb38ff69b5ea7efc5b1878e59308eddb'; + r'fc473316bce2fa425ace19baeda74758258dd769'; /// See also [LibraryMangaFilterUnread]. @ProviderFor(LibraryMangaFilterUnread) @@ -376,7 +376,7 @@ final libraryMangaFilterUnreadProvider = typedef _$LibraryMangaFilterUnread = AutoDisposeNotifier; String _$libraryMangaFilterCompletedHash() => - r'286c538b222f4212f1c1b1d25c6205db9e1ef092'; + r'ac96c775a5fdbda052991140af86dc5d6e72887d'; /// See also [LibraryMangaFilterCompleted]. @ProviderFor(LibraryMangaFilterCompleted) @@ -392,7 +392,7 @@ final libraryMangaFilterCompletedProvider = ); typedef _$LibraryMangaFilterCompleted = AutoDisposeNotifier; -String _$libraryMangaSortHash() => r'0442be97843a0ef97ead6592820af33162ecc11e'; +String _$libraryMangaSortHash() => r'aac0d1c0b08c67dc4c74e2969869faf6e1c6c25a'; /// See also [LibraryMangaSort]. @ProviderFor(LibraryMangaSort) @@ -409,7 +409,7 @@ final libraryMangaSortProvider = typedef _$LibraryMangaSort = AutoDisposeNotifier; String _$libraryMangaSortDirectionHash() => - r'70819ff0294ca866e94d229cce3bf75d7ed614a0'; + r'f61359ba47215f496a0cce9fd33f392fad2281f0'; /// See also [LibraryMangaSortDirection]. @ProviderFor(LibraryMangaSortDirection) @@ -426,7 +426,7 @@ final libraryMangaSortDirectionProvider = typedef _$LibraryMangaSortDirection = AutoDisposeNotifier; String _$libraryDisplayModeHash() => - r'59e6744684315ec99998bb19f91c6c85c6659161'; + r'dc791f4883cf9e8b283f56ed486fd6f3545a42af'; /// See also [LibraryDisplayMode]. @ProviderFor(LibraryDisplayMode) diff --git a/lib/src/features/library/presentation/library/library_screen.dart b/lib/src/features/library/presentation/library/library_screen.dart index 3d749459..11f758a4 100644 --- a/lib/src/features/library/presentation/library/library_screen.dart +++ b/lib/src/features/library/presentation/library/library_screen.dart @@ -11,7 +11,6 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../constants/app_sizes.dart'; - import '../../../../utils/extensions/custom_extensions.dart'; import '../../../../utils/misc/toast/toast.dart'; import '../../../../widgets/emoticons.dart'; diff --git a/lib/src/features/manga_book/domain/chapter/chapter_model.freezed.dart b/lib/src/features/manga_book/domain/chapter/chapter_model.freezed.dart index dd2d4cd0..36e94f70 100644 --- a/lib/src/features/manga_book/domain/chapter/chapter_model.freezed.dart +++ b/lib/src/features/manga_book/domain/chapter/chapter_model.freezed.dart @@ -392,7 +392,7 @@ class _$ChapterImpl extends _Chapter { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChapterImpl && diff --git a/lib/src/features/manga_book/domain/chapter_batch/chapter_batch_model.freezed.dart b/lib/src/features/manga_book/domain/chapter_batch/chapter_batch_model.freezed.dart index 2cf86193..75e3c1d7 100644 --- a/lib/src/features/manga_book/domain/chapter_batch/chapter_batch_model.freezed.dart +++ b/lib/src/features/manga_book/domain/chapter_batch/chapter_batch_model.freezed.dart @@ -150,7 +150,7 @@ class _$ChapterBatchImpl implements _ChapterBatch { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChapterBatchImpl && @@ -335,7 +335,7 @@ class _$ChapterChangeImpl implements _ChapterChange { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChapterChangeImpl && diff --git a/lib/src/features/manga_book/domain/chapter_page/chapter_page_model.freezed.dart b/lib/src/features/manga_book/domain/chapter_page/chapter_page_model.freezed.dart index 7d52d4ad..b3ae8faa 100644 --- a/lib/src/features/manga_book/domain/chapter_page/chapter_page_model.freezed.dart +++ b/lib/src/features/manga_book/domain/chapter_page/chapter_page_model.freezed.dart @@ -156,7 +156,7 @@ class _$ChapterMangaPairImpl implements _ChapterMangaPair { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChapterMangaPairImpl && @@ -318,7 +318,7 @@ class _$ChapterPageImpl implements _ChapterPage { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChapterPageImpl && diff --git a/lib/src/features/manga_book/domain/chapter_patch/chapter_put_model.freezed.dart b/lib/src/features/manga_book/domain/chapter_patch/chapter_put_model.freezed.dart index f9bfe1d2..3a0ecdd8 100644 --- a/lib/src/features/manga_book/domain/chapter_patch/chapter_put_model.freezed.dart +++ b/lib/src/features/manga_book/domain/chapter_patch/chapter_put_model.freezed.dart @@ -153,7 +153,7 @@ class _$ChapterPutImpl implements _ChapterPut { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChapterPutImpl && diff --git a/lib/src/features/manga_book/domain/downloads/downloads_model.freezed.dart b/lib/src/features/manga_book/domain/downloads/downloads_model.freezed.dart index 429f28ef..9daf3849 100644 --- a/lib/src/features/manga_book/domain/downloads/downloads_model.freezed.dart +++ b/lib/src/features/manga_book/domain/downloads/downloads_model.freezed.dart @@ -132,7 +132,7 @@ class _$DownloadsImpl implements _Downloads { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$DownloadsImpl && diff --git a/lib/src/features/manga_book/domain/downloads_queue/downloads_queue_model.freezed.dart b/lib/src/features/manga_book/domain/downloads_queue/downloads_queue_model.freezed.dart index 175360e0..b757f8bb 100644 --- a/lib/src/features/manga_book/domain/downloads_queue/downloads_queue_model.freezed.dart +++ b/lib/src/features/manga_book/domain/downloads_queue/downloads_queue_model.freezed.dart @@ -242,7 +242,7 @@ class _$DownloadsQueueImpl implements _DownloadsQueue { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$DownloadsQueueImpl && diff --git a/lib/src/features/manga_book/domain/manga/manga_model.freezed.dart b/lib/src/features/manga_book/domain/manga/manga_model.freezed.dart index 4b93f7e9..ba360523 100644 --- a/lib/src/features/manga_book/domain/manga/manga_model.freezed.dart +++ b/lib/src/features/manga_book/domain/manga/manga_model.freezed.dart @@ -557,7 +557,7 @@ class _$MangaImpl extends _Manga { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MangaImpl && @@ -963,7 +963,7 @@ class _$MangaMetaImpl implements _MangaMeta { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MangaMetaImpl && diff --git a/lib/src/features/manga_book/domain/update_status/update_status_model.freezed.dart b/lib/src/features/manga_book/domain/update_status/update_status_model.freezed.dart index 15a80aa0..6146b542 100644 --- a/lib/src/features/manga_book/domain/update_status/update_status_model.freezed.dart +++ b/lib/src/features/manga_book/domain/update_status/update_status_model.freezed.dart @@ -206,7 +206,7 @@ class _$UpdateStatusImpl extends _UpdateStatus { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$UpdateStatusImpl && diff --git a/lib/src/features/manga_book/presentation/downloads/downloads_screen.dart b/lib/src/features/manga_book/presentation/downloads/downloads_screen.dart index 4e20f992..c91b146b 100644 --- a/lib/src/features/manga_book/presentation/downloads/downloads_screen.dart +++ b/lib/src/features/manga_book/presentation/downloads/downloads_screen.dart @@ -5,10 +5,9 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import '../../../../constants/app_sizes.dart'; - import '../../../../utils/extensions/custom_extensions.dart'; import '../../../../utils/misc/toast/toast.dart'; import '../../../../widgets/emoticons.dart'; @@ -54,7 +53,7 @@ class DownloadsScreen extends ConsumerWidget { return ListView.builder( itemExtent: 104, itemBuilder: (context, index) { - if (index == downloadsCount) return KSizedBox.h104.size; + if (index == downloadsCount) return const Gap(104); final chapterId = downloadsChapterIds[index]; return DownloadProgressListTile( key: ValueKey("$chapterId"), diff --git a/lib/src/features/manga_book/presentation/manga_details/controller/manga_details_controller.dart b/lib/src/features/manga_book/presentation/manga_details/controller/manga_details_controller.dart index 232cabd1..48bbe4d9 100644 --- a/lib/src/features/manga_book/presentation/manga_details/controller/manga_details_controller.dart +++ b/lib/src/features/manga_book/presentation/manga_details/controller/manga_details_controller.dart @@ -246,9 +246,7 @@ class MangaChapterSort extends _$MangaChapterSort with SharedPreferenceEnumClientMixin { @override ChapterSort? build() => initialize( - ref, - key: DBKeys.chapterSort.name, - initial: DBKeys.chapterSort.initial, + DBKeys.chapterSort, enumList: ChapterSort.values, ); } @@ -257,44 +255,28 @@ class MangaChapterSort extends _$MangaChapterSort class MangaChapterSortDirection extends _$MangaChapterSortDirection with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.chapterSortDirection.name, - initial: DBKeys.chapterSortDirection.initial, - ); + bool? build() => initialize(DBKeys.chapterSortDirection); } @riverpod class MangaChapterFilterDownloaded extends _$MangaChapterFilterDownloaded with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.chapterFilterDownloaded.name, - initial: DBKeys.chapterFilterDownloaded.initial, - ); + bool? build() => initialize(DBKeys.chapterFilterDownloaded); } @riverpod class MangaChapterFilterUnread extends _$MangaChapterFilterUnread with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.chapterFilterUnread.name, - initial: DBKeys.chapterFilterUnread.initial, - ); + bool? build() => initialize(DBKeys.chapterFilterUnread); } @riverpod class MangaChapterFilterBookmarked extends _$MangaChapterFilterBookmarked with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.chapterFilterBookmarked.name, - initial: DBKeys.chapterFilterBookmarked.initial, - ); + bool? build() => initialize(DBKeys.chapterFilterBookmarked); } @riverpod diff --git a/lib/src/features/manga_book/presentation/manga_details/controller/manga_details_controller.g.dart b/lib/src/features/manga_book/presentation/manga_details/controller/manga_details_controller.g.dart index 1aae01e3..c1856ea0 100644 --- a/lib/src/features/manga_book/presentation/manga_details/controller/manga_details_controller.g.dart +++ b/lib/src/features/manga_book/presentation/manga_details/controller/manga_details_controller.g.dart @@ -1030,7 +1030,7 @@ class _MangaChapterFilterScanlatorProviderElement int get mangaId => (origin as MangaChapterFilterScanlatorProvider).mangaId; } -String _$mangaChapterSortHash() => r'c8c1ab8e5211e62f7690f359ffd74d9bb134dcdd'; +String _$mangaChapterSortHash() => r'65cfa4018101913a9afb73cfe0f1dc8e7e9051c6'; /// See also [MangaChapterSort]. @ProviderFor(MangaChapterSort) @@ -1047,7 +1047,7 @@ final mangaChapterSortProvider = typedef _$MangaChapterSort = AutoDisposeNotifier; String _$mangaChapterSortDirectionHash() => - r'2028754952ec76ed4fabae6acea36692526c6aef'; + r'178008eb77e4c802bde58a23b3b288b33fbbcbfd'; /// See also [MangaChapterSortDirection]. @ProviderFor(MangaChapterSortDirection) @@ -1064,7 +1064,7 @@ final mangaChapterSortDirectionProvider = typedef _$MangaChapterSortDirection = AutoDisposeNotifier; String _$mangaChapterFilterDownloadedHash() => - r'79ecc5ba5a1222c45b3fe90d4ab3af5d5ef45862'; + r'f22afc19cbdca59e0a9f73c875ef02640d414bc7'; /// See also [MangaChapterFilterDownloaded]. @ProviderFor(MangaChapterFilterDownloaded) @@ -1081,7 +1081,7 @@ final mangaChapterFilterDownloadedProvider = typedef _$MangaChapterFilterDownloaded = AutoDisposeNotifier; String _$mangaChapterFilterUnreadHash() => - r'3ee19d85422eb771c4c2ce3a49e32732c56b7e02'; + r'75a99006c8f2ed6c2b52da3f7c9ffdecef0ac4fe'; /// See also [MangaChapterFilterUnread]. @ProviderFor(MangaChapterFilterUnread) @@ -1098,7 +1098,7 @@ final mangaChapterFilterUnreadProvider = typedef _$MangaChapterFilterUnread = AutoDisposeNotifier; String _$mangaChapterFilterBookmarkedHash() => - r'ce62d26fc7f1be1807028b15499f370dc2872ad2'; + r'5d99f8a20682b1c278652ea51463fbfc5b0f676b'; /// See also [MangaChapterFilterBookmarked]. @ProviderFor(MangaChapterFilterBookmarked) diff --git a/lib/src/features/manga_book/presentation/manga_details/manga_details_screen.dart b/lib/src/features/manga_book/presentation/manga_details/manga_details_screen.dart index bd258f18..7c0b1479 100644 --- a/lib/src/features/manga_book/presentation/manga_details/manga_details_screen.dart +++ b/lib/src/features/manga_book/presentation/manga_details/manga_details_screen.dart @@ -11,7 +11,6 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../constants/app_sizes.dart'; - import '../../../../routes/router_config.dart'; import '../../../../utils/extensions/custom_extensions.dart'; import '../../../../utils/misc/toast/toast.dart'; @@ -85,12 +84,11 @@ class MangaDetailsScreen extends HookConsumerWidget { return; }, []); - return WillPopScope( - onWillPop: () async { - if (categoryId != null) { + return PopScope( + onPopInvoked: (didPop) async { + if (didPop && categoryId != null) { ref.invalidate(categoryMangaListProvider(categoryId!)); } - return true; }, child: manga.showUiWhenData( context, @@ -140,11 +138,20 @@ class MangaDetailsScreen extends HookConsumerWidget { : AppBar( title: Text(data?.title ?? context.l10n!.manga), actions: [ - if (context.isTablet) + if (context.isTablet) ...[ IconButton( onPressed: () => refresh(true), icon: const Icon(Icons.refresh_rounded), ), + IconButton( + onPressed: () => showDialog( + context: context, + builder: (context) => + EditMangaCategoryDialog(mangaId: mangaId), + ), + icon: const Icon(Icons.category_rounded), + ) + ], Builder( builder: (context) => IconButton( onPressed: () { @@ -165,29 +172,29 @@ class MangaDetailsScreen extends HookConsumerWidget { icon: const Icon(Icons.filter_list_rounded), ), ), - PopupMenuButton( - shape: RoundedRectangleBorder( - borderRadius: KBorderRadius.r16.radius, - ), - icon: const Icon(Icons.more_vert_rounded), - itemBuilder: (context) => [ - PopupMenuItem( - onTap: () => Future.microtask( - () => showDialog( - context: context, - builder: (context) => - EditMangaCategoryDialog(mangaId: mangaId), + if (!context.isTablet) + PopupMenuButton( + shape: RoundedRectangleBorder( + borderRadius: KBorderRadius.r16.radius, + ), + icon: const Icon(Icons.more_vert_rounded), + itemBuilder: (context) => [ + PopupMenuItem( + onTap: () => Future.microtask( + () => showDialog( + context: context, + builder: (context) => + EditMangaCategoryDialog(mangaId: mangaId), + ), ), + child: Text(context.l10n!.editCategory), ), - child: Text(context.l10n!.editCategory), - ), - if (!context.isTablet) PopupMenuItem( onTap: () => refresh(true), child: Text(context.l10n!.refresh), ), - ], - ) + ], + ) ], ), endDrawer: Drawer( diff --git a/lib/src/features/manga_book/presentation/manga_details/widgets/chapter_list_tile.dart b/lib/src/features/manga_book/presentation/manga_details/widgets/chapter_list_tile.dart index 93931df1..677e9457 100644 --- a/lib/src/features/manga_book/presentation/manga_details/widgets/chapter_list_tile.dart +++ b/lib/src/features/manga_book/presentation/manga_details/widgets/chapter_list_tile.dart @@ -6,8 +6,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; - -import '../../../../../constants/app_sizes.dart'; +import 'package:gap/gap.dart'; import '../../../../../routes/router_config.dart'; import '../../../../../utils/extensions/custom_extensions.dart'; @@ -46,7 +45,7 @@ class ChapterListTile extends StatelessWidget { color: chapter.read.ifNull() ? Colors.grey : context.iconColor, size: 20, ), - KSizedBox.w4.size, + const Gap(4), ], Expanded( child: Text( diff --git a/lib/src/features/manga_book/presentation/reader/reader_screen.dart b/lib/src/features/manga_book/presentation/reader/reader_screen.dart index 874df970..3ff1a554 100644 --- a/lib/src/features/manga_book/presentation/reader/reader_screen.dart +++ b/lib/src/features/manga_book/presentation/reader/reader_screen.dart @@ -96,11 +96,12 @@ class ReaderScreen extends HookConsumerWidget { ); }, []); - return WillPopScope( - onWillPop: () async { - ref.invalidate(chapterProviderWithIndex); - ref.invalidate(mangaChapterListProvider(mangaId: mangaId)); - return true; + return PopScope( + onPopInvoked: (didPop) async { + if (didPop) { + ref.invalidate(chapterProviderWithIndex); + ref.invalidate(mangaChapterListProvider(mangaId: mangaId)); + } }, child: ScrollConfiguration( behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false), diff --git a/lib/src/features/manga_book/presentation/reader/widgets/chapter_separator.dart b/lib/src/features/manga_book/presentation/reader/widgets/chapter_separator.dart index c6f7ca36..3e7af7df 100644 --- a/lib/src/features/manga_book/presentation/reader/widgets/chapter_separator.dart +++ b/lib/src/features/manga_book/presentation/reader/widgets/chapter_separator.dart @@ -5,6 +5,7 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../../constants/app_sizes.dart'; @@ -47,7 +48,7 @@ class ChapterSeparator extends ConsumerWidget { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - KSizedBox.h16.size, + const Gap(16), if (showPrevNextButtons && nextPrevChapterPair?.second != null && isPreviousChapterSeparator) @@ -97,7 +98,7 @@ class ChapterSeparator extends ConsumerWidget { ), ), ), - KSizedBox.h16.size, + const Gap(16), ], ), ), diff --git a/lib/src/features/manga_book/presentation/reader/widgets/reader_mode/continuous_reader_mode.dart b/lib/src/features/manga_book/presentation/reader/widgets/reader_mode/continuous_reader_mode.dart index 62c8c5b0..eae9696f 100644 --- a/lib/src/features/manga_book/presentation/reader/widgets/reader_mode/continuous_reader_mode.dart +++ b/lib/src/features/manga_book/presentation/reader/widgets/reader_mode/continuous_reader_mode.dart @@ -9,16 +9,16 @@ import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:scrollable_positioned_list/scrollable_positioned_list.dart'; import '../../../../../../constants/app_constants.dart'; -import '../../../../../../constants/app_sizes.dart'; import '../../../../../../constants/endpoints.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/misc/app_utils.dart'; import '../../../../../../widgets/server_image.dart'; +import '../../../../../settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_pinch_to_zoom.dart'; import '../../../../../settings/presentation/reader/widgets/reader_scroll_animation_tile/reader_scroll_animation_tile.dart'; import '../../../../domain/chapter/chapter_model.dart'; import '../../../../domain/manga/manga_model.dart'; @@ -81,6 +81,7 @@ class ContinuousReaderMode extends HookConsumerWidget { }, []); final isAnimationEnabled = ref.read(readerScrollAnimationProvider).ifNull(true); + final isPinchToZoomEnabled = ref.read(pinchToZoomProvider).ifNull(true); return ReaderWrapper( scrollDirection: scrollDirection, chapter: chapter, @@ -127,7 +128,9 @@ class ContinuousReaderMode extends HookConsumerWidget { ); }, child: AppUtils.wrapIf( - !kIsWeb && (Platform.isAndroid || Platform.isIOS) + !kIsWeb && + (Platform.isAndroid || Platform.isIOS) && + isPinchToZoomEnabled ? (child) => InteractiveViewer(maxScale: 5, child: child) : null, ScrollablePositionedList.separated( @@ -143,7 +146,7 @@ class ContinuousReaderMode extends HookConsumerWidget { ? context.height * 2 : context.width * 2, separatorBuilder: (BuildContext context, int index) => - showSeparator ? KSizedBox.h16.size : const SizedBox.shrink(), + showSeparator ? const Gap(16) : const SizedBox.shrink(), itemBuilder: (BuildContext context, int index) { final image = ServerImage( showReloadButton: true, diff --git a/lib/src/features/manga_book/presentation/reader/widgets/reader_wrapper.dart b/lib/src/features/manga_book/presentation/reader/widgets/reader_wrapper.dart index 59f726c2..48449da6 100644 --- a/lib/src/features/manga_book/presentation/reader/widgets/reader_wrapper.dart +++ b/lib/src/features/manga_book/presentation/reader/widgets/reader_wrapper.dart @@ -10,6 +10,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_android_volume_keydown/flutter_android_volume_keydown.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:gap/gap.dart'; import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; @@ -107,7 +108,7 @@ class ReaderWrapper extends HookConsumerWidget { value: mangaReaderMode, title: context.l10n!.readerMode, onChange: (enumValue) async { - if (context.mounted) context.pop(); + if (context.mounted) Navigator.pop(context); await AsyncValue.guard( () => ref.read(mangaBookRepositoryProvider).patchMangaMeta( mangaId: manga.id!, @@ -131,7 +132,7 @@ class ReaderWrapper extends HookConsumerWidget { title: context.l10n!.readerNavigationLayout, value: mangaReaderNavigationLayout, onChange: (enumValue) async { - if (context.mounted) context.pop(); + if (context.mounted) Navigator.pop(context); await AsyncValue.guard( () => ref.read(mangaBookRepositoryProvider).patchMangaMeta( mangaId: manga.id!, @@ -139,9 +140,7 @@ class ReaderWrapper extends HookConsumerWidget { value: enumValue.name, ), ); - ref.invalidate( - mangaWithIdProvider(mangaId: manga.id!), - ); + ref.invalidate(mangaWithIdProvider(mangaId: manga.id!)); }, ), ), @@ -224,6 +223,7 @@ class ReaderWrapper extends HookConsumerWidget { onTap: context.pop, ), ListTile( + style: ListTileStyle.drawer, leading: const Icon(Icons.app_settings_alt_outlined), title: Text(context.l10n!.readerMode), subtitle: Text(mangaReaderMode.toLocale(context)), @@ -233,6 +233,7 @@ class ReaderWrapper extends HookConsumerWidget { }, ), ListTile( + style: ListTileStyle.drawer, leading: const Icon(Icons.touch_app_rounded), title: Text(context.l10n!.readerNavigationLayout), subtitle: Text(mangaReaderNavigationLayout.toLocale(context)), @@ -322,7 +323,7 @@ class ReaderWrapper extends HookConsumerWidget { ) ], ), - KSizedBox.h8.size, + const Gap(8), Card( shape: RoundedRectangleBorder( borderRadius: BorderRadius.vertical( diff --git a/lib/src/features/manga_book/presentation/updates/widgets/chapter_manga_list_tile.dart b/lib/src/features/manga_book/presentation/updates/widgets/chapter_manga_list_tile.dart index f5c58863..f78f4c41 100644 --- a/lib/src/features/manga_book/presentation/updates/widgets/chapter_manga_list_tile.dart +++ b/lib/src/features/manga_book/presentation/updates/widgets/chapter_manga_list_tile.dart @@ -6,6 +6,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; import '../../../../../constants/app_sizes.dart'; import '../../../../../routes/router_config.dart'; @@ -42,7 +43,7 @@ class ChapterMangaListTile extends StatelessWidget { children: [ if ((pair.chapter?.bookmarked).ifNull()) ...[ const Icon(Icons.bookmark, size: 20), - KSizedBox.w4.size, + const Gap(4), ], Expanded( child: Text( diff --git a/lib/src/features/manga_book/widgets/update_status_fab.dart b/lib/src/features/manga_book/widgets/update_status_fab.dart index 72b8790d..d4a961bb 100644 --- a/lib/src/features/manga_book/widgets/update_status_fab.dart +++ b/lib/src/features/manga_book/widgets/update_status_fab.dart @@ -5,7 +5,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; - import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../routes/router_config.dart'; diff --git a/lib/src/features/quick_open/domain/quick_search_result.freezed.dart b/lib/src/features/quick_open/domain/quick_search_result.freezed.dart index bd979bdc..8135c5ec 100644 --- a/lib/src/features/quick_open/domain/quick_search_result.freezed.dart +++ b/lib/src/features/quick_open/domain/quick_search_result.freezed.dart @@ -190,7 +190,7 @@ class _$HelpTextQuickSearchResultImpl implements HelpTextQuickSearchResult { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$HelpTextQuickSearchResultImpl && @@ -397,7 +397,7 @@ class _$SourceQuickSearchResultImpl implements SourceQuickSearchResult { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SourceQuickSearchResultImpl && @@ -607,7 +607,7 @@ class _$SourceSearchQuickSearchResultImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SourceSearchQuickSearchResultImpl && @@ -813,7 +813,7 @@ class _$CategoryQuickSearchResultImpl implements CategoryQuickSearchResult { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CategoryQuickSearchResultImpl && @@ -1033,7 +1033,7 @@ class _$CategoryMangaQuickSearchResultImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CategoryMangaQuickSearchResultImpl && @@ -1278,7 +1278,7 @@ class _$CategoryMangaChapterQuickSearchResultImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CategoryMangaChapterQuickSearchResultImpl && @@ -1509,7 +1509,7 @@ class _$MangaQuickSearchResultImpl implements MangaQuickSearchResult { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MangaQuickSearchResultImpl && @@ -1750,7 +1750,7 @@ class _$ChapterQuickSearchResultImpl implements ChapterQuickSearchResult { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChapterQuickSearchResultImpl && @@ -1930,7 +1930,7 @@ class _$GlobalSearchQuickSearchResultImpl } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GlobalSearchQuickSearchResultImpl); diff --git a/lib/src/features/settings/domain/backup_missing/backup_missing.freezed.dart b/lib/src/features/settings/domain/backup_missing/backup_missing.freezed.dart index 17178273..f16553a5 100644 --- a/lib/src/features/settings/domain/backup_missing/backup_missing.freezed.dart +++ b/lib/src/features/settings/domain/backup_missing/backup_missing.freezed.dart @@ -174,7 +174,7 @@ class _$BackupMissingImpl extends _BackupMissing { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BackupMissingImpl && diff --git a/lib/src/features/settings/presentation/appearance/appearance_screen.dart b/lib/src/features/settings/presentation/appearance/appearance_screen.dart index ad8465bb..30905e8c 100644 --- a/lib/src/features/settings/presentation/appearance/appearance_screen.dart +++ b/lib/src/features/settings/presentation/appearance/appearance_screen.dart @@ -5,22 +5,28 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../utils/extensions/custom_extensions.dart'; -import '../../widgets/theme_mode_tile/theme_mode_tile.dart'; +import '../../widgets/app_theme_mode_tile/app_theme_mode_tile.dart'; +import 'widgets/app_theme_selector/app_theme_selector.dart'; import 'widgets/grid_cover_min_width.dart'; +import 'widgets/is_true_black/is_true_black_tile.dart'; -class AppearanceScreen extends StatelessWidget { +class AppearanceScreen extends ConsumerWidget { const AppearanceScreen({super.key}); @override - Widget build(BuildContext context) { + Widget build(context, ref) { + final themeMode = ref.watch(appThemeModeProvider); return Scaffold( appBar: AppBar(title: Text(context.l10n!.appearance)), body: ListView( - children: const [ - AppThemeTile(), - GridCoverMinWidth(), + children: [ + const AppThemeModeTile(), + if (themeMode != ThemeMode.light) const IsTrueBlackTile(), + const AppThemeSelector(), + const GridCoverMinWidth(), ], ), ); diff --git a/lib/src/features/settings/presentation/appearance/widgets/app_theme_selector/app_theme_selector.dart b/lib/src/features/settings/presentation/appearance/widgets/app_theme_selector/app_theme_selector.dart new file mode 100644 index 00000000..8a1152c9 --- /dev/null +++ b/lib/src/features/settings/presentation/appearance/widgets/app_theme_selector/app_theme_selector.dart @@ -0,0 +1,69 @@ +import 'package:flex_color_scheme/flex_color_scheme.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:riverpod_annotation/riverpod_annotation.dart'; + +import '../../../../../../constants/db_keys.dart'; +import '../../../../../../utils/extensions/custom_extensions.dart'; +import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; + +part 'app_theme_selector.g.dart'; + +@riverpod +class AppScheme extends _$AppScheme + with SharedPreferenceEnumClientMixin { + @override + FlexScheme? build() => initialize( + DBKeys.flexScheme, + enumList: FlexColor.schemes.keys.toList(), + ); +} + +class AppThemeSelector extends HookConsumerWidget { + const AppThemeSelector({super.key}); + + @override + Widget build(context, ref) { + final flexSchemaList = useMemoized(() => FlexColor.schemes.keys.toList()); + final selectedAppTheme = ref.watch(appSchemeProvider); + + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: SizedBox( + height: 148, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: flexSchemaList.length, + itemBuilder: (context, index) { + final flexSchemeColor = FlexColor.schemes[flexSchemaList[index]]; + if (flexSchemeColor == null) return const SizedBox.shrink(); + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 4), + child: Tooltip( + message: flexSchemeColor.name, + child: FlexThemeModeOptionButton( + height: 64, + width: 32, + optionButtonBorderRadius: 16, + flexSchemeColor: flexSchemeColor.dark, + borderRadius: 8, + hoverColor: context.isDarkMode + ? Colors.black.withAlpha(0x2F) + : Colors.white.withAlpha(0x3F), + focusColor: context.isDarkMode + ? Colors.black.withAlpha(0x4F) + : Colors.white.withAlpha(0x5F), + selected: selectedAppTheme == flexSchemaList[index], + onSelect: () => ref + .read(appSchemeProvider.notifier) + .update(flexSchemaList[index]), + ), + ), + ); + }, + ), + ), + ); + } +} diff --git a/lib/src/features/settings/presentation/appearance/widgets/app_theme_selector/app_theme_selector.g.dart b/lib/src/features/settings/presentation/appearance/widgets/app_theme_selector/app_theme_selector.g.dart new file mode 100644 index 00000000..e1a6f44c --- /dev/null +++ b/lib/src/features/settings/presentation/appearance/widgets/app_theme_selector/app_theme_selector.g.dart @@ -0,0 +1,25 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'app_theme_selector.dart'; + +// ************************************************************************** +// RiverpodGenerator +// ************************************************************************** + +String _$appSchemeHash() => r'90f59c7c113c6e65db90508719f04fa5c9d23ad6'; + +/// See also [AppScheme]. +@ProviderFor(AppScheme) +final appSchemeProvider = + AutoDisposeNotifierProvider.internal( + AppScheme.new, + name: r'appSchemeProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') ? null : _$appSchemeHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$AppScheme = AutoDisposeNotifier; +// ignore_for_file: type=lint +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/lib/src/features/settings/presentation/appearance/widgets/grid_cover_min_width.dart b/lib/src/features/settings/presentation/appearance/widgets/grid_cover_min_width.dart index 5851a173..fde5caaf 100644 --- a/lib/src/features/settings/presentation/appearance/widgets/grid_cover_min_width.dart +++ b/lib/src/features/settings/presentation/appearance/widgets/grid_cover_min_width.dart @@ -19,11 +19,7 @@ part 'grid_cover_min_width.g.dart'; class GridMinWidth extends _$GridMinWidth with SharedPreferenceClientMixin { @override - double? build() => initialize( - ref, - key: DBKeys.gridMangaCoverWidth.name, - initial: DBKeys.gridMangaCoverWidth.initial, - ); + double? build() => initialize(DBKeys.gridMangaCoverWidth); } class GridCoverMinWidth extends ConsumerWidget { diff --git a/lib/src/features/settings/presentation/appearance/widgets/grid_cover_min_width.g.dart b/lib/src/features/settings/presentation/appearance/widgets/grid_cover_min_width.g.dart index 422083c4..5d5780a2 100644 --- a/lib/src/features/settings/presentation/appearance/widgets/grid_cover_min_width.g.dart +++ b/lib/src/features/settings/presentation/appearance/widgets/grid_cover_min_width.g.dart @@ -6,7 +6,7 @@ part of 'grid_cover_min_width.dart'; // RiverpodGenerator // ************************************************************************** -String _$gridMinWidthHash() => r'8cd39a48857bc29905fc40604feaa224976d287c'; +String _$gridMinWidthHash() => r'ad72f8c6aa95e47acf6470e2766525ce64880193'; /// See also [GridMinWidth]. @ProviderFor(GridMinWidth) diff --git a/lib/src/features/settings/presentation/appearance/widgets/is_true_black/is_true_black_tile.dart b/lib/src/features/settings/presentation/appearance/widgets/is_true_black/is_true_black_tile.dart new file mode 100644 index 00000000..19b63ded --- /dev/null +++ b/lib/src/features/settings/presentation/appearance/widgets/is_true_black/is_true_black_tile.dart @@ -0,0 +1,35 @@ +// Copyright (c) 2022 Contributors to the Suwayomi project +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:riverpod_annotation/riverpod_annotation.dart'; + +import '../../../../../../constants/db_keys.dart'; +import '../../../../../../utils/extensions/custom_extensions.dart'; +import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; + +part 'is_true_black_tile.g.dart'; + +@riverpod +class IsTrueBlack extends _$IsTrueBlack with SharedPreferenceClientMixin { + @override + bool? build() => initialize(DBKeys.isTrueBlack); +} + +class IsTrueBlackTile extends HookConsumerWidget { + const IsTrueBlackTile({super.key}); + @override + Widget build(BuildContext context, WidgetRef ref) { + return SwitchListTile( + controlAffinity: ListTileControlAffinity.trailing, + secondary: const Icon(Icons.circle, color: Colors.black), + title: Text(context.l10n!.isTrueBlack), + onChanged: ref.read(isTrueBlackProvider.notifier).update, + value: ref.watch(isTrueBlackProvider).ifNull(), + ); + } +} diff --git a/lib/src/features/settings/presentation/appearance/widgets/is_true_black/is_true_black_tile.g.dart b/lib/src/features/settings/presentation/appearance/widgets/is_true_black/is_true_black_tile.g.dart new file mode 100644 index 00000000..bacbf725 --- /dev/null +++ b/lib/src/features/settings/presentation/appearance/widgets/is_true_black/is_true_black_tile.g.dart @@ -0,0 +1,25 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'is_true_black_tile.dart'; + +// ************************************************************************** +// RiverpodGenerator +// ************************************************************************** + +String _$isTrueBlackHash() => r'ffe195c45cef7942001bfe08409e4ad16deacd14'; + +/// See also [IsTrueBlack]. +@ProviderFor(IsTrueBlack) +final isTrueBlackProvider = + AutoDisposeNotifierProvider.internal( + IsTrueBlack.new, + name: r'isTrueBlackProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') ? null : _$isTrueBlackHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$IsTrueBlack = AutoDisposeNotifier; +// ignore_for_file: type=lint +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/lib/src/features/settings/presentation/browse/widgets/show_nsfw_switch/show_nsfw_switch.dart b/lib/src/features/settings/presentation/browse/widgets/show_nsfw_switch/show_nsfw_switch.dart index 79400a29..24f38b21 100644 --- a/lib/src/features/settings/presentation/browse/widgets/show_nsfw_switch/show_nsfw_switch.dart +++ b/lib/src/features/settings/presentation/browse/widgets/show_nsfw_switch/show_nsfw_switch.dart @@ -9,7 +9,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; @@ -18,11 +17,7 @@ part 'show_nsfw_switch.g.dart'; @riverpod class ShowNSFW extends _$ShowNSFW with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.showNSFW.name, - initial: DBKeys.showNSFW.initial, - ); + bool? build() => initialize(DBKeys.showNSFW); } class ShowNSFWTile extends ConsumerWidget { diff --git a/lib/src/features/settings/presentation/browse/widgets/show_nsfw_switch/show_nsfw_switch.g.dart b/lib/src/features/settings/presentation/browse/widgets/show_nsfw_switch/show_nsfw_switch.g.dart index 84b51e0e..c74b3134 100644 --- a/lib/src/features/settings/presentation/browse/widgets/show_nsfw_switch/show_nsfw_switch.g.dart +++ b/lib/src/features/settings/presentation/browse/widgets/show_nsfw_switch/show_nsfw_switch.g.dart @@ -6,7 +6,7 @@ part of 'show_nsfw_switch.dart'; // RiverpodGenerator // ************************************************************************** -String _$showNSFWHash() => r'a88757282270337527e28828b83e3a36189a424c'; +String _$showNSFWHash() => r'666d246997c11dc67d88f95a2264aa728fc307f4'; /// See also [ShowNSFW]. @ProviderFor(ShowNSFW) diff --git a/lib/src/features/settings/presentation/general/general_screen.dart b/lib/src/features/settings/presentation/general/general_screen.dart index 69c0318b..ec5fff05 100644 --- a/lib/src/features/settings/presentation/general/general_screen.dart +++ b/lib/src/features/settings/presentation/general/general_screen.dart @@ -7,7 +7,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; -import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../constants/language_list.dart'; @@ -37,7 +36,7 @@ class GeneralScreen extends ConsumerWidget { value: context.currentLocale, onChange: (locale) { ref.read(l10nProvider.notifier).update(locale); - context.pop(); + Navigator.pop(context); }, getOptionTitle: getLanguageNameFormLocale, getOptionSubtitle: getLanguageNameInEnFormLocale, diff --git a/lib/src/features/settings/presentation/more/more_screen.dart b/lib/src/features/settings/presentation/more/more_screen.dart index e857e654..aeb4f91d 100644 --- a/lib/src/features/settings/presentation/more/more_screen.dart +++ b/lib/src/features/settings/presentation/more/more_screen.dart @@ -9,13 +9,12 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../constants/gen/assets.gen.dart'; import '../../../../constants/urls.dart'; - import '../../../../routes/router_config.dart'; import '../../../../utils/extensions/custom_extensions.dart'; import '../../../../utils/launch_url_in_web.dart'; import '../../../../utils/misc/toast/toast.dart'; +import '../../widgets/app_theme_mode_tile/app_theme_mode_tile.dart'; import '../../widgets/server_url_tile/server_url_tile.dart'; -import '../../widgets/theme_mode_tile/theme_mode_tile.dart'; class MoreScreen extends ConsumerWidget { const MoreScreen({super.key}); @@ -39,7 +38,7 @@ class MoreScreen extends ConsumerWidget { leading: const Icon(Icons.label_rounded), onTap: () => const EditCategoriesRoute().push(context), ), - const AppThemeTile(), + const AppThemeModeTile(), ListTile( title: Text(context.l10n!.backup), leading: const Icon(Icons.settings_backup_restore_rounded), diff --git a/lib/src/features/settings/presentation/reader/reader_settings_screen.dart b/lib/src/features/settings/presentation/reader/reader_settings_screen.dart index efef24af..31cfc8ce 100644 --- a/lib/src/features/settings/presentation/reader/reader_settings_screen.dart +++ b/lib/src/features/settings/presentation/reader/reader_settings_screen.dart @@ -8,6 +8,7 @@ import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../utils/extensions/custom_extensions.dart'; @@ -17,6 +18,7 @@ import 'widgets/reader_magnifier_size_slider/reader_magnifier_size_slider.dart'; import 'widgets/reader_mode_tile/reader_mode_tile.dart'; import 'widgets/reader_navigation_layout_tile/reader_navigation_layout_tile.dart'; import 'widgets/reader_padding_slider/reader_padding_slider.dart'; +import 'widgets/reader_pinch_to_zoom/reader_pinch_to_zoom.dart'; import 'widgets/reader_scroll_animation_tile/reader_scroll_animation_tile.dart'; import 'widgets/reader_swipe_toggle_tile/reader_swipe_chapter_toggle_tile.dart'; import 'widgets/reader_volume_tap_invert_tile/reader_volume_tap_invert_tile.dart'; @@ -40,10 +42,15 @@ class ReaderSettingsScreen extends ConsumerWidget { const ReaderScrollAnimationTile(), const ReaderPaddingSlider(), const ReaderMagnifierSizeSlider(), - if (!kIsWeb && Platform.isAndroid) ...[ - const ReaderVolumeTapTile(), - if (isVolumeTapEnabled) const ReaderVolumeTapInvertTile(), - ] + if (!kIsWeb) ...[ + if (Platform.isAndroid || Platform.isIOS) const ReaderPinchToZoom(), + if (Platform.isAndroid) ...[ + const ReaderVolumeTapTile(), + if (isVolumeTapEnabled) const ReaderVolumeTapInvertTile(), + const ReaderPinchToZoom(), + ], + ], + const Gap(128), ], ), ); diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_initial_overlay_tile/reader_initial_overlay_tile.dart b/lib/src/features/settings/presentation/reader/widgets/reader_initial_overlay_tile/reader_initial_overlay_tile.dart index 022f6132..0875d9c9 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_initial_overlay_tile/reader_initial_overlay_tile.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_initial_overlay_tile/reader_initial_overlay_tile.dart @@ -9,7 +9,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; @@ -19,11 +18,7 @@ part 'reader_initial_overlay_tile.g.dart'; class ReaderInitialOverlay extends _$ReaderInitialOverlay with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.readerOverlay.name, - initial: DBKeys.readerOverlay.initial, - ); + bool? build() => initialize(DBKeys.readerOverlay); } class ReaderInitialOverlayTile extends HookConsumerWidget { diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_initial_overlay_tile/reader_initial_overlay_tile.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_initial_overlay_tile/reader_initial_overlay_tile.g.dart index 81454654..639bd930 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_initial_overlay_tile/reader_initial_overlay_tile.g.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_initial_overlay_tile/reader_initial_overlay_tile.g.dart @@ -7,7 +7,7 @@ part of 'reader_initial_overlay_tile.dart'; // ************************************************************************** String _$readerInitialOverlayHash() => - r'0cdf556eafc512165da2ba3b955544a187f03aad'; + r'fd033c1b69ab9437600a762c7bd8c759198fe4d7'; /// See also [ReaderInitialOverlay]. @ProviderFor(ReaderInitialOverlay) diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_invert_tap_tile/reader_invert_tap_tile.dart b/lib/src/features/settings/presentation/reader/widgets/reader_invert_tap_tile/reader_invert_tap_tile.dart index 94596c8b..fd09f8ff 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_invert_tap_tile/reader_invert_tap_tile.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_invert_tap_tile/reader_invert_tap_tile.dart @@ -9,7 +9,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; @@ -18,11 +17,7 @@ part 'reader_invert_tap_tile.g.dart'; @riverpod class InvertTap extends _$InvertTap with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.invertTap.name, - initial: DBKeys.invertTap.initial, - ); + bool? build() => initialize(DBKeys.invertTap); } class ReaderInvertTapTile extends HookConsumerWidget { diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_invert_tap_tile/reader_invert_tap_tile.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_invert_tap_tile/reader_invert_tap_tile.g.dart index 0b46aa58..ba1770a3 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_invert_tap_tile/reader_invert_tap_tile.g.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_invert_tap_tile/reader_invert_tap_tile.g.dart @@ -6,7 +6,7 @@ part of 'reader_invert_tap_tile.dart'; // RiverpodGenerator // ************************************************************************** -String _$invertTapHash() => r'8885890ec1184098ce4769b2488f02078502937b'; +String _$invertTapHash() => r'c4bde6eb87d0f7ede8eff109d63056af85a2fdc7'; /// See also [InvertTap]. @ProviderFor(InvertTap) diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_magnifier_size_slider/reader_magnifier_size_slider.dart b/lib/src/features/settings/presentation/reader/widgets/reader_magnifier_size_slider/reader_magnifier_size_slider.dart index f4125504..ee81bacb 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_magnifier_size_slider/reader_magnifier_size_slider.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_magnifier_size_slider/reader_magnifier_size_slider.dart @@ -13,7 +13,6 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/app_constants.dart'; import '../../../../../../constants/db_keys.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../widgets/slider_setting_tile/slider_setting_tile.dart'; @@ -24,11 +23,7 @@ part 'reader_magnifier_size_slider.g.dart'; class ReaderMagnifierSizeKey extends _$ReaderMagnifierSizeKey with SharedPreferenceClientMixin { @override - double? build() => initialize( - ref, - initial: DBKeys.readerMagnifierSize.initial, - key: DBKeys.readerMagnifierSize.name, - ); + double? build() => initialize(DBKeys.readerMagnifierSize); } class ReaderMagnifierSizeSlider extends ConsumerWidget { diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_magnifier_size_slider/reader_magnifier_size_slider.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_magnifier_size_slider/reader_magnifier_size_slider.g.dart index 3c757e4a..37040cb9 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_magnifier_size_slider/reader_magnifier_size_slider.g.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_magnifier_size_slider/reader_magnifier_size_slider.g.dart @@ -7,7 +7,7 @@ part of 'reader_magnifier_size_slider.dart'; // ************************************************************************** String _$readerMagnifierSizeKeyHash() => - r'c8e05f6d26e6853042d03b2fff6cc31f7a0950be'; + r'3f954620173149ee83f7bdab0b13bc78c06bd796'; /// See also [ReaderMagnifierSizeKey]. @ProviderFor(ReaderMagnifierSizeKey) diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_mode_tile/reader_mode_tile.dart b/lib/src/features/settings/presentation/reader/widgets/reader_mode_tile/reader_mode_tile.dart index b6356166..454133bd 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_mode_tile/reader_mode_tile.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_mode_tile/reader_mode_tile.dart @@ -5,13 +5,11 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; import '../../../../../../constants/enum.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../../../widgets/radio_list_popup.dart'; @@ -22,12 +20,8 @@ part 'reader_mode_tile.g.dart'; class ReaderModeKey extends _$ReaderModeKey with SharedPreferenceEnumClientMixin { @override - ReaderMode? build() => initialize( - ref, - initial: DBKeys.readerMode.initial, - key: DBKeys.readerMode.name, - enumList: ReaderMode.values, - ); + ReaderMode? build() => + initialize(DBKeys.readerMode, enumList: ReaderMode.values); } class ReaderModeTile extends ConsumerWidget { @@ -49,7 +43,7 @@ class ReaderModeTile extends ConsumerWidget { value: readerMode ?? ReaderMode.webtoon, onChange: (enumValue) async { ref.read(readerModeKeyProvider.notifier).update(enumValue); - if (context.mounted) context.pop(); + if (context.mounted) Navigator.pop(context); }, ), ), diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_mode_tile/reader_mode_tile.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_mode_tile/reader_mode_tile.g.dart index 7c38f7f1..b0b254f0 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_mode_tile/reader_mode_tile.g.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_mode_tile/reader_mode_tile.g.dart @@ -6,7 +6,7 @@ part of 'reader_mode_tile.dart'; // RiverpodGenerator // ************************************************************************** -String _$readerModeKeyHash() => r'ce3cb3f4277926e44291974f73e2ff82c91242e6'; +String _$readerModeKeyHash() => r'542fcae53ee45ad75064ee9e3a2889936d873c8d'; /// See also [ReaderModeKey]. @ProviderFor(ReaderModeKey) diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_navigation_layout_tile/reader_navigation_layout_tile.dart b/lib/src/features/settings/presentation/reader/widgets/reader_navigation_layout_tile/reader_navigation_layout_tile.dart index 9f0bd6c0..659e3488 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_navigation_layout_tile/reader_navigation_layout_tile.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_navigation_layout_tile/reader_navigation_layout_tile.dart @@ -5,13 +5,11 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; import '../../../../../../constants/enum.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../../../widgets/radio_list_popup.dart'; @@ -23,9 +21,7 @@ class ReaderNavigationLayoutKey extends _$ReaderNavigationLayoutKey with SharedPreferenceEnumClientMixin { @override ReaderNavigationLayout? build() => initialize( - ref, - initial: DBKeys.readerNavigationLayout.initial, - key: DBKeys.readerNavigationLayout.name, + DBKeys.readerNavigationLayout, enumList: ReaderNavigationLayout.values, ); } @@ -53,7 +49,7 @@ class ReaderNavigationLayoutTile extends ConsumerWidget { ref .read(readerNavigationLayoutKeyProvider.notifier) .update(enumValue); - if (context.mounted) context.pop(); + if (context.mounted) Navigator.pop(context); }, ), ), diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_navigation_layout_tile/reader_navigation_layout_tile.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_navigation_layout_tile/reader_navigation_layout_tile.g.dart index 876acafb..68b2a74d 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_navigation_layout_tile/reader_navigation_layout_tile.g.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_navigation_layout_tile/reader_navigation_layout_tile.g.dart @@ -7,7 +7,7 @@ part of 'reader_navigation_layout_tile.dart'; // ************************************************************************** String _$readerNavigationLayoutKeyHash() => - r'aa37cea42eb029b459e56aad6a1803fa139d7db0'; + r'a2c719fe589f9ee1ce5bfe71284508d4be6e8651'; /// See also [ReaderNavigationLayoutKey]. @ProviderFor(ReaderNavigationLayoutKey) diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_padding_slider/reader_padding_slider.dart b/lib/src/features/settings/presentation/reader/widgets/reader_padding_slider/reader_padding_slider.dart index 2946906f..d292e7fb 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_padding_slider/reader_padding_slider.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_padding_slider/reader_padding_slider.dart @@ -13,7 +13,6 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/app_constants.dart'; import '../../../../../../constants/db_keys.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../widgets/slider_setting_tile/slider_setting_tile.dart'; @@ -24,11 +23,7 @@ part 'reader_padding_slider.g.dart'; class ReaderPaddingKey extends _$ReaderPaddingKey with SharedPreferenceClientMixin { @override - double? build() => initialize( - ref, - initial: DBKeys.readerPadding.initial, - key: DBKeys.readerPadding.name, - ); + double? build() => initialize(DBKeys.readerPadding); } class ReaderPaddingSlider extends ConsumerWidget { diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_padding_slider/reader_padding_slider.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_padding_slider/reader_padding_slider.g.dart index 9e81cce2..6ca0a9f2 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_padding_slider/reader_padding_slider.g.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_padding_slider/reader_padding_slider.g.dart @@ -6,7 +6,7 @@ part of 'reader_padding_slider.dart'; // RiverpodGenerator // ************************************************************************** -String _$readerPaddingKeyHash() => r'733c2f49bded5354ed4bc6016d2951bb3626a23e'; +String _$readerPaddingKeyHash() => r'fefb063d72d62d247e541d810a418451cd91d6ce'; /// See also [ReaderPaddingKey]. @ProviderFor(ReaderPaddingKey) diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_invert_tap_tile.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_invert_tap_tile.g.dart new file mode 100644 index 00000000..0b46aa58 --- /dev/null +++ b/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_invert_tap_tile.g.dart @@ -0,0 +1,25 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'reader_invert_tap_tile.dart'; + +// ************************************************************************** +// RiverpodGenerator +// ************************************************************************** + +String _$invertTapHash() => r'8885890ec1184098ce4769b2488f02078502937b'; + +/// See also [InvertTap]. +@ProviderFor(InvertTap) +final invertTapProvider = + AutoDisposeNotifierProvider.internal( + InvertTap.new, + name: r'invertTapProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') ? null : _$invertTapHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$InvertTap = AutoDisposeNotifier; +// ignore_for_file: type=lint +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_pinch_to_zoom.dart b/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_pinch_to_zoom.dart new file mode 100644 index 00000000..9c2cd2f3 --- /dev/null +++ b/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_pinch_to_zoom.dart @@ -0,0 +1,34 @@ +// Copyright (c) 2022 Contributors to the Suwayomi project +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:riverpod_annotation/riverpod_annotation.dart'; + +import '../../../../../../constants/db_keys.dart'; +import '../../../../../../utils/extensions/custom_extensions.dart'; +import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; + +part 'reader_pinch_to_zoom.g.dart'; + +@riverpod +class PinchToZoom extends _$PinchToZoom with SharedPreferenceClientMixin { + @override + bool? build() => initialize(DBKeys.pinchToZoom); +} + +class ReaderPinchToZoom extends HookConsumerWidget { + const ReaderPinchToZoom({super.key}); + @override + Widget build(BuildContext context, WidgetRef ref) { + return SwitchListTile( + controlAffinity: ListTileControlAffinity.trailing, + secondary: const Icon(Icons.pinch_rounded), + title: Text(context.l10n!.pinchToZoom), + onChanged: ref.read(pinchToZoomProvider.notifier).update, + value: ref.watch(pinchToZoomProvider).ifNull(), + ); + } +} diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_pinch_to_zoom.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_pinch_to_zoom.g.dart new file mode 100644 index 00000000..89dc48ee --- /dev/null +++ b/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_pinch_to_zoom.g.dart @@ -0,0 +1,25 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'reader_pinch_to_zoom.dart'; + +// ************************************************************************** +// RiverpodGenerator +// ************************************************************************** + +String _$pinchToZoomHash() => r'b5acb6c92cb357b7cd32616171ddbe3daade93c5'; + +/// See also [PinchToZoom]. +@ProviderFor(PinchToZoom) +final pinchToZoomProvider = + AutoDisposeNotifierProvider.internal( + PinchToZoom.new, + name: r'pinchToZoomProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') ? null : _$pinchToZoomHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$PinchToZoom = AutoDisposeNotifier; +// ignore_for_file: type=lint +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_volume_tap_tile.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_volume_tap_tile.g.dart new file mode 100644 index 00000000..fb051143 --- /dev/null +++ b/lib/src/features/settings/presentation/reader/widgets/reader_pinch_to_zoom/reader_volume_tap_tile.g.dart @@ -0,0 +1,25 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'reader_volume_tap_tile.dart'; + +// ************************************************************************** +// RiverpodGenerator +// ************************************************************************** + +String _$volumeTapHash() => r'3a6607d4250354a14e96cd1f8a5eeaef1ac34090'; + +/// See also [VolumeTap]. +@ProviderFor(VolumeTap) +final volumeTapProvider = + AutoDisposeNotifierProvider.internal( + VolumeTap.new, + name: r'volumeTapProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') ? null : _$volumeTapHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$VolumeTap = AutoDisposeNotifier; +// ignore_for_file: type=lint +// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_scroll_animation_tile/reader_scroll_animation_tile.dart b/lib/src/features/settings/presentation/reader/widgets/reader_scroll_animation_tile/reader_scroll_animation_tile.dart index 36e845d3..c1bda741 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_scroll_animation_tile/reader_scroll_animation_tile.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_scroll_animation_tile/reader_scroll_animation_tile.dart @@ -9,7 +9,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; @@ -19,11 +18,7 @@ part 'reader_scroll_animation_tile.g.dart'; class ReaderScrollAnimation extends _$ReaderScrollAnimation with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.scrollAnimation.name, - initial: DBKeys.scrollAnimation.initial, - ); + bool? build() => initialize(DBKeys.scrollAnimation); } class ReaderScrollAnimationTile extends HookConsumerWidget { diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_scroll_animation_tile/reader_scroll_animation_tile.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_scroll_animation_tile/reader_scroll_animation_tile.g.dart index 7b5b7bdc..7fdae799 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_scroll_animation_tile/reader_scroll_animation_tile.g.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_scroll_animation_tile/reader_scroll_animation_tile.g.dart @@ -7,7 +7,7 @@ part of 'reader_scroll_animation_tile.dart'; // ************************************************************************** String _$readerScrollAnimationHash() => - r'5795593f5a067596e2bcbd198ae9bf79e584e4e8'; + r'141994b8a881442624c91141d3148cd8bdd8aad7'; /// See also [ReaderScrollAnimation]. @ProviderFor(ReaderScrollAnimation) diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_swipe_toggle_tile/reader_swipe_chapter_toggle_tile.dart b/lib/src/features/settings/presentation/reader/widgets/reader_swipe_toggle_tile/reader_swipe_chapter_toggle_tile.dart index 265d7019..75b19575 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_swipe_toggle_tile/reader_swipe_chapter_toggle_tile.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_swipe_toggle_tile/reader_swipe_chapter_toggle_tile.dart @@ -9,7 +9,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; @@ -19,11 +18,7 @@ part 'reader_swipe_chapter_toggle_tile.g.dart'; class SwipeChapterToggle extends _$SwipeChapterToggle with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.swipeToggle.name, - initial: DBKeys.swipeToggle.initial, - ); + bool? build() => initialize(DBKeys.swipeToggle); } class SwipeChapterToggleTile extends HookConsumerWidget { diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_swipe_toggle_tile/reader_swipe_chapter_toggle_tile.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_swipe_toggle_tile/reader_swipe_chapter_toggle_tile.g.dart index a03e44d8..d06363c6 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_swipe_toggle_tile/reader_swipe_chapter_toggle_tile.g.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_swipe_toggle_tile/reader_swipe_chapter_toggle_tile.g.dart @@ -7,7 +7,7 @@ part of 'reader_swipe_chapter_toggle_tile.dart'; // ************************************************************************** String _$swipeChapterToggleHash() => - r'5434750ad1b77a70b2b3647d8f0eeb69bb681003'; + r'9695f972659a8b2213796d23f5d84342d292340f'; /// See also [SwipeChapterToggle]. @ProviderFor(SwipeChapterToggle) diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_invert_tile/reader_volume_tap_invert_tile.dart b/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_invert_tile/reader_volume_tap_invert_tile.dart index 32686e32..d2e00afb 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_invert_tile/reader_volume_tap_invert_tile.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_invert_tile/reader_volume_tap_invert_tile.dart @@ -4,12 +4,12 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'dart:math' as math; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; @@ -19,11 +19,7 @@ part 'reader_volume_tap_invert_tile.g.dart'; class VolumeTapInvert extends _$VolumeTapInvert with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.volumeTapInvert.name, - initial: DBKeys.volumeTapInvert.initial, - ); + bool? build() => initialize(DBKeys.volumeTapInvert); } class ReaderVolumeTapInvertTile extends HookConsumerWidget { diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_invert_tile/reader_volume_tap_invert_tile.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_invert_tile/reader_volume_tap_invert_tile.g.dart index 6781b0de..d2a26868 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_invert_tile/reader_volume_tap_invert_tile.g.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_invert_tile/reader_volume_tap_invert_tile.g.dart @@ -6,7 +6,7 @@ part of 'reader_volume_tap_invert_tile.dart'; // RiverpodGenerator // ************************************************************************** -String _$volumeTapInvertHash() => r'1d598d8e98e6f885720edc3c3e4d72589efe3880'; +String _$volumeTapInvertHash() => r'2bcbb177dc5776d0fba12704a83f6973743342d6'; /// See also [VolumeTapInvert]. @ProviderFor(VolumeTapInvert) diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_tile/reader_volume_tap_tile.dart b/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_tile/reader_volume_tap_tile.dart index eb76bc89..892aca33 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_tile/reader_volume_tap_tile.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_tile/reader_volume_tap_tile.dart @@ -4,12 +4,12 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'dart:math' as math; + import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; @@ -18,11 +18,7 @@ part 'reader_volume_tap_tile.g.dart'; @riverpod class VolumeTap extends _$VolumeTap with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.volumeTap.name, - initial: DBKeys.volumeTap.initial, - ); + bool? build() => initialize(DBKeys.volumeTap); } class ReaderVolumeTapTile extends HookConsumerWidget { diff --git a/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_tile/reader_volume_tap_tile.g.dart b/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_tile/reader_volume_tap_tile.g.dart index 57697e89..fb051143 100644 --- a/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_tile/reader_volume_tap_tile.g.dart +++ b/lib/src/features/settings/presentation/reader/widgets/reader_volume_tap_tile/reader_volume_tap_tile.g.dart @@ -6,7 +6,7 @@ part of 'reader_volume_tap_tile.dart'; // RiverpodGenerator // ************************************************************************** -String _$volumeTapHash() => r'7b79b64e431952b2976ee0000cfe14857ada4c30'; +String _$volumeTapHash() => r'3a6607d4250354a14e96cd1f8a5eeaef1ac34090'; /// See also [VolumeTap]. @ProviderFor(VolumeTap) diff --git a/lib/src/features/settings/presentation/server/widget/auth_type_tile.dart b/lib/src/features/settings/presentation/server/widget/auth_type_tile.dart index ec0ac0be..adef0cdb 100644 --- a/lib/src/features/settings/presentation/server/widget/auth_type_tile.dart +++ b/lib/src/features/settings/presentation/server/widget/auth_type_tile.dart @@ -5,12 +5,10 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../../../constants/enum.dart'; import '../../../../../global_providers/global_providers.dart'; - import '../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../widgets/radio_list_popup.dart'; @@ -34,7 +32,7 @@ class AuthTypeTile extends ConsumerWidget { value: authType ?? AuthType.none, onChange: (enumValue) { ref.read(authTypeKeyProvider.notifier).update(enumValue); - context.pop(); + Navigator.pop(context); }, ), ), diff --git a/lib/src/features/settings/presentation/server/widget/credential_popup/credentials_popup.dart b/lib/src/features/settings/presentation/server/widget/credential_popup/credentials_popup.dart index 21a3263f..7d065e37 100644 --- a/lib/src/features/settings/presentation/server/widget/credential_popup/credentials_popup.dart +++ b/lib/src/features/settings/presentation/server/widget/credential_popup/credentials_popup.dart @@ -8,13 +8,11 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:go_router/go_router.dart'; +import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; -import '../../../../../../constants/app_sizes.dart'; import '../../../../../../constants/db_keys.dart'; - import '../../../../../../utils/extensions/custom_extensions.dart'; import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../../../widgets/pop_button.dart'; @@ -25,11 +23,7 @@ part 'credentials_popup.g.dart'; class Credentials extends _$Credentials with SharedPreferenceClientMixin { @override - String? build() => initialize( - ref, - key: DBKeys.basicCredentials.name, - initial: DBKeys.basicCredentials.initial, - ); + String? build() => initialize(DBKeys.basicCredentials); } final formKey = GlobalKey(); @@ -65,7 +59,7 @@ class CredentialsPopup extends HookConsumerWidget { border: const OutlineInputBorder(), ), ), - KSizedBox.h4.size, + const Gap(4), TextFormField( controller: password, validator: (value) => @@ -90,7 +84,7 @@ class CredentialsPopup extends HookConsumerWidget { password: password.text, ), ); - context.pop(); + Navigator.pop(context); } }, child: Text(context.l10n!.save), diff --git a/lib/src/features/settings/presentation/server/widget/credential_popup/credentials_popup.g.dart b/lib/src/features/settings/presentation/server/widget/credential_popup/credentials_popup.g.dart index 8bbdfda1..40f7b81d 100644 --- a/lib/src/features/settings/presentation/server/widget/credential_popup/credentials_popup.g.dart +++ b/lib/src/features/settings/presentation/server/widget/credential_popup/credentials_popup.g.dart @@ -6,7 +6,7 @@ part of 'credentials_popup.dart'; // RiverpodGenerator // ************************************************************************** -String _$credentialsHash() => r'e509b70ba4135d6ff261c22f96f600f70e1fb5e0'; +String _$credentialsHash() => r'6ccec3db0f5cd3f90ff51972bf267aab01d0f363'; /// See also [Credentials]. @ProviderFor(Credentials) diff --git a/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.dart b/lib/src/features/settings/widgets/app_theme_mode_tile/app_theme_mode_tile.dart similarity index 79% rename from lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.dart rename to lib/src/features/settings/widgets/app_theme_mode_tile/app_theme_mode_tile.dart index 0ce085be..c5a514e0 100644 --- a/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.dart +++ b/lib/src/features/settings/widgets/app_theme_mode_tile/app_theme_mode_tile.dart @@ -5,26 +5,22 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../constants/db_keys.dart'; - import '../../../../utils/extensions/custom_extensions.dart'; import '../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../widgets/radio_list_popup.dart'; -part 'theme_mode_tile.g.dart'; +part 'app_theme_mode_tile.g.dart'; @riverpod -class ThemeModeKey extends _$ThemeModeKey +class AppThemeMode extends _$AppThemeMode with SharedPreferenceEnumClientMixin { @override ThemeMode? build() => initialize( - ref, - initial: DBKeys.themeMode.initial, - key: DBKeys.themeMode.name, + DBKeys.themeMode, enumList: ThemeMode.values, ); } @@ -37,12 +33,12 @@ extension ThemeModeExtension on ThemeMode { }; } -class AppThemeTile extends ConsumerWidget { - const AppThemeTile({super.key}); +class AppThemeModeTile extends ConsumerWidget { + const AppThemeModeTile({super.key}); @override Widget build(BuildContext context, WidgetRef ref) { - final themeMode = ref.watch(themeModeKeyProvider); + final themeMode = ref.watch(appThemeModeProvider); return ListTile( leading: Icon( context.isDarkMode ? Icons.dark_mode_rounded : Icons.light_mode_rounded, @@ -57,8 +53,8 @@ class AppThemeTile extends ConsumerWidget { value: themeMode ?? ThemeMode.system, getOptionTitle: (value) => value.toLocale(context), onChange: (enumValue) async { - ref.read(themeModeKeyProvider.notifier).update(enumValue); - if (context.mounted) context.pop(); + ref.read(appThemeModeProvider.notifier).update(enumValue); + if (context.mounted) Navigator.pop(context); }, ), ), diff --git a/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.g.dart b/lib/src/features/settings/widgets/app_theme_mode_tile/app_theme_mode_tile.g.dart similarity index 50% rename from lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.g.dart rename to lib/src/features/settings/widgets/app_theme_mode_tile/app_theme_mode_tile.g.dart index 66732064..1492735b 100644 --- a/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.g.dart +++ b/lib/src/features/settings/widgets/app_theme_mode_tile/app_theme_mode_tile.g.dart @@ -1,25 +1,25 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'theme_mode_tile.dart'; +part of 'app_theme_mode_tile.dart'; // ************************************************************************** // RiverpodGenerator // ************************************************************************** -String _$themeModeKeyHash() => r'eff7effc4dc1153dda663177ba80ae17bcc913ad'; +String _$appThemeModeHash() => r'380ffe956e0fb3dd226139f0a8c3b2b39ed9472c'; -/// See also [ThemeModeKey]. -@ProviderFor(ThemeModeKey) -final themeModeKeyProvider = - AutoDisposeNotifierProvider.internal( - ThemeModeKey.new, - name: r'themeModeKeyProvider', +/// See also [AppThemeMode]. +@ProviderFor(AppThemeMode) +final appThemeModeProvider = + AutoDisposeNotifierProvider.internal( + AppThemeMode.new, + name: r'appThemeModeProvider', debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$themeModeKeyHash, + const bool.fromEnvironment('dart.vm.product') ? null : _$appThemeModeHash, dependencies: null, allTransitiveDependencies: null, ); -typedef _$ThemeModeKey = AutoDisposeNotifier; +typedef _$AppThemeMode = AutoDisposeNotifier; // ignore_for_file: type=lint // ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member diff --git a/lib/src/features/settings/widgets/server_port_tile/server_port_tile.dart b/lib/src/features/settings/widgets/server_port_tile/server_port_tile.dart index 42124021..3b249c56 100644 --- a/lib/src/features/settings/widgets/server_port_tile/server_port_tile.dart +++ b/lib/src/features/settings/widgets/server_port_tile/server_port_tile.dart @@ -8,7 +8,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; @@ -22,11 +21,7 @@ part 'server_port_tile.g.dart'; @riverpod class ServerPort extends _$ServerPort with SharedPreferenceClientMixin { @override - int? build() => initialize( - ref, - key: DBKeys.serverPort.name, - initial: DBKeys.serverPort.initial, - ); + int? build() => initialize(DBKeys.serverPort); } @riverpod @@ -34,8 +29,7 @@ class ServerPortToggle extends _$ServerPortToggle with SharedPreferenceClientMixin { @override bool? build() => initialize( - ref, - key: DBKeys.serverPortToggle.name, + DBKeys.serverPortToggle, initial: kIsWeb ? false : DBKeys.serverPortToggle.initial, ); } @@ -92,7 +86,7 @@ class ServerPortField extends HookConsumerWidget { controller: controller, onSubmitted: (value) { _update(int.tryParse(controller.text), ref); - context.pop(); + Navigator.pop(context); }, keyboardType: TextInputType.number, maxLength: 5, @@ -108,7 +102,7 @@ class ServerPortField extends HookConsumerWidget { ElevatedButton( onPressed: () { _update(int.tryParse(controller.text), ref); - context.pop(); + Navigator.pop(context); }, child: Text(context.l10n!.save), ), diff --git a/lib/src/features/settings/widgets/server_port_tile/server_port_tile.g.dart b/lib/src/features/settings/widgets/server_port_tile/server_port_tile.g.dart index e42ffcac..e33726ed 100644 --- a/lib/src/features/settings/widgets/server_port_tile/server_port_tile.g.dart +++ b/lib/src/features/settings/widgets/server_port_tile/server_port_tile.g.dart @@ -6,7 +6,7 @@ part of 'server_port_tile.dart'; // RiverpodGenerator // ************************************************************************** -String _$serverPortHash() => r'3cc6aeb1ff31120ea0f590de35389013914693bc'; +String _$serverPortHash() => r'604731733e9855577fdc9a40b98a917eca77d242'; /// See also [ServerPort]. @ProviderFor(ServerPort) @@ -21,7 +21,7 @@ final serverPortProvider = ); typedef _$ServerPort = AutoDisposeNotifier; -String _$serverPortToggleHash() => r'1cfe71a5d9ab5585525f5b1869a82c8e7ba41722'; +String _$serverPortToggleHash() => r'c7b68d8ce2c77e5af9ba26fc97a3feebfbe9e8cd'; /// See also [ServerPortToggle]. @ProviderFor(ServerPortToggle) diff --git a/lib/src/features/settings/widgets/server_url_tile/server_url_tile.dart b/lib/src/features/settings/widgets/server_url_tile/server_url_tile.dart index a6c9ecf6..3d4668e9 100644 --- a/lib/src/features/settings/widgets/server_url_tile/server_url_tile.dart +++ b/lib/src/features/settings/widgets/server_url_tile/server_url_tile.dart @@ -7,12 +7,10 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../constants/db_keys.dart'; - import '../../../../utils/extensions/custom_extensions.dart'; import '../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../widgets/pop_button.dart'; @@ -24,8 +22,7 @@ part 'server_url_tile.g.dart'; class ServerUrl extends _$ServerUrl with SharedPreferenceClientMixin { @override String? build() => initialize( - ref, - key: DBKeys.serverUrl.name, + DBKeys.serverUrl, initial: kIsWeb ? Uri.base.origin : DBKeys.serverUrl.initial, ); } @@ -71,7 +68,7 @@ class ServerUrlField extends HookConsumerWidget { controller: controller, onSubmitted: (value) { _update(controller.text, ref); - context.pop(); + Navigator.pop(context); }, decoration: InputDecoration( border: const OutlineInputBorder(), @@ -83,7 +80,7 @@ class ServerUrlField extends HookConsumerWidget { ElevatedButton( onPressed: () { _update(controller.text, ref); - context.pop(); + Navigator.pop(context); }, child: Text(context.l10n!.save), ), diff --git a/lib/src/features/settings/widgets/server_url_tile/server_url_tile.g.dart b/lib/src/features/settings/widgets/server_url_tile/server_url_tile.g.dart index 5b129bda..8dc6edfc 100644 --- a/lib/src/features/settings/widgets/server_url_tile/server_url_tile.g.dart +++ b/lib/src/features/settings/widgets/server_url_tile/server_url_tile.g.dart @@ -6,7 +6,7 @@ part of 'server_url_tile.dart'; // RiverpodGenerator // ************************************************************************** -String _$serverUrlHash() => r'8307ead7a1b89ef35ed2192ca4eff18050ca6163'; +String _$serverUrlHash() => r'5034a62624cb87c32618d2559c8c0416236882d7'; /// See also [ServerUrl]. @ProviderFor(ServerUrl) diff --git a/lib/src/global_providers/global_providers.dart b/lib/src/global_providers/global_providers.dart index bcdbb3b3..f51b87e9 100644 --- a/lib/src/global_providers/global_providers.dart +++ b/lib/src/global_providers/global_providers.dart @@ -41,9 +41,7 @@ class AuthTypeKey extends _$AuthTypeKey with SharedPreferenceEnumClientMixin { @override AuthType? build() => initialize( - ref, - initial: DBKeys.authType.initial, - key: DBKeys.authType.name, + DBKeys.authType, enumList: AuthType.values, ); } @@ -65,9 +63,7 @@ class L10n extends _$L10n with SharedPreferenceClientMixin { ); @override Locale? build() => initialize( - ref, - key: DBKeys.l10n.name, - initial: DBKeys.l10n.initial, + DBKeys.l10n, fromJson: fromJson, toJson: toJson, ); diff --git a/lib/src/global_providers/global_providers.g.dart b/lib/src/global_providers/global_providers.g.dart index bc9a2064..8f316dfd 100644 --- a/lib/src/global_providers/global_providers.g.dart +++ b/lib/src/global_providers/global_providers.g.dart @@ -214,7 +214,7 @@ class _RateLimitQueueProviderElement extends AutoDisposeProviderElement String? get query => (origin as RateLimitQueueProvider).query; } -String _$authTypeKeyHash() => r'8264b20583c2d0e3c9da5073ff1c13fda7e7fc34'; +String _$authTypeKeyHash() => r'357e6f44cc8ac94656f8491ed9f6d1775ac52ec6'; /// See also [AuthTypeKey]. @ProviderFor(AuthTypeKey) @@ -229,7 +229,7 @@ final authTypeKeyProvider = ); typedef _$AuthTypeKey = AutoDisposeNotifier; -String _$l10nHash() => r'6a874a9412c7619bba907eebafcb828e7de350cf'; +String _$l10nHash() => r'1d15ba851371130f70b37ec77cbdc62ac6d9a7b8'; /// See also [L10n]. @ProviderFor(L10n) diff --git a/lib/src/l10n/app_en.arb b/lib/src/l10n/app_en.arb index 41263e96..1af077d3 100644 --- a/lib/src/l10n/app_en.arb +++ b/lib/src/l10n/app_en.arb @@ -16,7 +16,7 @@ "description": "Popup title and Button text to change App Language" }, "@appTheme": { - "description": "Popup title and Button text to change App Theme" + "description": "Popup title and Button text to change App Theme Mode" }, "@appTitle": { "description": "Name of the app (Tachidesk Sorayomi in native script)" @@ -246,6 +246,9 @@ "@installingExtension": { "description": "Toast text to show that the extension is installing" }, + "@isTrueBlack": { + "description": "Switch title to enable {} black theme" + }, "@languages": { "description": "Popup title to filter extensions based on language" }, @@ -270,12 +273,12 @@ "@mangaSortDateAdded": { "description": "Radio button text for Manga sort Type - Date Added" }, - "@mangaSortUnread": { - "description": "Radio button text for Manga sort Type - Unread" - }, "@mangaSortLastRead": { "description": "Radio button text for Manga sort Type - Last Read" }, + "@mangaSortUnread": { + "description": "Radio button text for Manga sort Type - Unread" + }, "@mangaStatusCancelled": { "description": "Text to show Manga Status Cancelled in Manga details screen" }, @@ -315,22 +318,22 @@ "@nameCountDisplay": { "description": "Text pattern to display an name and count in a string", "placeholders": { - "name": { - "example": "Downloaded", - "type": "String" - }, "count": { "example": "22", "type": "int" + }, + "name": { + "example": "Downloaded", + "type": "String" } } }, - "@nextChapter": { - "description": "Text for Next Chapter button in Manga Reader Screen" - }, "@newUpdateAvailable": { "description": "Popup title to show that the App/Server has and update" }, + "@nextChapter": { + "description": "Text for Next Chapter button in Manga Reader Screen" + }, "@noCategoriesFound": { "description": "Hint text to add new Category when category list is empty" }, @@ -412,18 +415,12 @@ "@pending": { "description": "Pending status Manga Group title in Update Summary Screen" }, + "@pinchToZoom": { + "description": "Switch title to enable pinch to zoom in reader screen" + }, "@previousChapter": { "description": "Text for Previous Chapter button in Manga Reader Screen" }, - "@quickSearchContext": { - "description": "Quick Open Hint text for query X" - }, - "@quickSearchSource": { - "description": "Quick Open Hint text for Source S with prefill '@S'" - }, - "@quickSearchSourceManga": { - "description": "Quick Open Hint text for searching Manga M in Source S with prefill '@S/M'" - }, "@quickSearchCategory": { "description": "Quick Open Hint text for Category C with prefill '#C'" }, @@ -433,12 +430,24 @@ "@quickSearchCategoryMangaChapter": { "description": "Quick Open Hint text for searching Chapter name CN from Manga M in Source S with prefill '#C/M:CN'" }, + "@quickSearchContext": { + "description": "Quick Open Hint text for query X" + }, "@quickSearchShowAllCommandTip": { "description": "Quick Open Tip text for showing all commands by entering '?'" }, + "@quickSearchSource": { + "description": "Quick Open Hint text for Source S with prefill '@S'" + }, + "@quickSearchSourceManga": { + "description": "Quick Open Hint text for searching Manga M in Source S with prefill '@S/M'" + }, "@reader": { "description": "Screen title and Button text of Reader screen" }, + "@readerMagnifierSize": { + "description": "Slider title text for Reader Magnifier Size" + }, "@readerMode": { "description": "Popup title and Button text of Reader Mode popup" }, @@ -481,15 +490,6 @@ "@readerNavigationLayoutInvert": { "description": "Switch title to invert Tap to scroll in reader screen" }, - "@readerScrollAnimation": { - "description": "Switch title to Disable scroll animation in reader screen" - }, - "@readerSwipeChapterToggle": { - "description": "Switch title to toggle `swipe to change chapter` in reader screen" - }, - "@readerSwipeChapterToggleDescription": { - "description": "Switch tile description for, toggle `swipe to change chapter` in reader screen" - }, "@readerNavigationLayoutKindlish": { "description": "Radio button text for Reader Navigation Layout - Kindle-ish" }, @@ -499,26 +499,29 @@ "@readerNavigationLayoutRightAndLeft": { "description": "Radio button text for Reader Navigation Layout - Right And Left" }, - "@readerMagnifierSize": { - "description": "Slider title text for Reader Magnifier Size" + "@readerOverlay": { + "description": "Toggle subtile text for Initial Reader Overlay" + }, + "@readerPadding": { + "description": "Slider title text for Reader Padding" + }, + "@readerScrollAnimation": { + "description": "Switch title to Disable scroll animation in reader screen" + }, + "@readerSwipeChapterToggle": { + "description": "Switch title to toggle `swipe to change chapter` in reader screen" + }, + "@readerSwipeChapterToggleDescription": { + "description": "Switch tile description for, toggle `swipe to change chapter` in reader screen" }, "@readerVolumeTap": { "description": "Switch button text for Reader Page Navigation with Volume Tap" }, - "@readerVolumeTapSubtitle": { - "description": "Switch button Subtitle text for Reader Page Navigation with Volume Tap" - }, "@readerVolumeTapInvert": { "description": "Switch button text to invert Volume Tap " }, - "@readerPadding": { - "description": "Slider title text for Reader Padding" - }, - "@readerOverlay": { - "description": "Toggle tile text for Initial Reader Overlay" - }, - "@readerOverlay": { - "description": "Toggle subtile text for Initial Reader Overlay" + "@readerVolumeTapSubtitle": { + "description": "Switch button Subtitle text for Reader Page Navigation with Volume Tap" }, "@reddit": { "description": "Reddit app title" @@ -571,30 +574,30 @@ "@searchingForUpdates": { "description": "Toast Text for searching for updates of the App/Server" }, - "@selectUnread": { - "description": "Popup Text for selecting unread chapters" - }, "@selectInBetween": { "description": "Toast Text for selecting chapters in between first and last Chapters" }, "@selectNext10": { "description": "Toast Text for selecting next 10 chapters" }, + "@selectUnread": { + "description": "Popup Text for selecting unread chapters" + }, "@server": { "description": "Text title for the server in About screen" }, - "@serverUrl": { - "description": "Popup title and Button text to update Server Url" - }, "@serverPort": { "description": "Popup title and Button text to update Server Port" }, - "@serverUrlHintText": { - "description": "Text Filed hint text to update Server Url" - }, "@serverPortHintText": { "description": "Text Filed hint text to update Server Port" }, + "@serverUrl": { + "description": "Popup title and Button text to update Server Url" + }, + "@serverUrlHintText": { + "description": "Text Filed hint text to update Server Url" + }, "@serverVersion": { "description": "Text title for the current version of the Server in About screen" }, @@ -622,12 +625,6 @@ "@start": { "description": "Button text start reading the manga" }, - "@today": { - "description": "Today Text to show the release date of manga" - }, - "@yesterday": { - "description": "Yesterday Text to show the release date of manga" - }, "@themeModeDark": { "description": "Radio button text for App theme - Dark" }, @@ -637,6 +634,9 @@ "@themeModeSystem": { "description": "Radio button text for App theme - System" }, + "@today": { + "description": "Today Text to show the release date of manga" + }, "@uninstall": { "description": "Button text to Uninstall the extension" }, @@ -695,12 +695,15 @@ "@whatsNew": { "description": "Button text to open whats new page of app in web" }, + "@yesterday": { + "description": "Yesterday Text to show the release date of manga" + }, "about": "About", "addCategory": "Add Category", "addToLibrary": "Add to Library", "allScanlators": "All Scanlators", "appLanguage": "App Language", - "appTheme": "App Theme", + "appTheme": "App Theme Mode", "appTitle": "Tachidesk Sorayomi", "appearance": "Appearance", "authType": "Authentication Type", @@ -760,7 +763,7 @@ "extensions": "Extensions", "failed": "Failed", "filter": "Filter", - "findServer" : "Find", + "findServer": "Find", "finished": "Finished", "general": "General", "gitHub": "GitHub", @@ -771,6 +774,7 @@ "install": "Install", "installing": "Installing", "installingExtension": "Installing Extension", + "isTrueBlack": "True Black", "languages": "Languages", "latest": "Latest", "library": "Library", @@ -779,8 +783,8 @@ "mangaMissingSources": "Manga Missing Sources", "mangaSortAlphabetical": "Alphabetical", "mangaSortDateAdded": "Date Added", - "mangaSortUnread": "Unread", "mangaSortLastRead": "Last Read", + "mangaSortUnread": "Unread", "mangaStatusCancelled": "Cancelled", "mangaStatusCompleted": "Completed", "mangaStatusLicensed": "Licensed", @@ -817,15 +821,17 @@ "password": "Password", "pause": "Pause", "pending": "Pending", + "pinchToZoom": "Pinch to Zoom", "previousChapter": "Previous: {chapterTitle}", "quickSearchCategory": "Go to Category 'C'", - "quickSearchContext": "Search for query X (Results are based on screen context)", - "quickSearchSource": "Go to Source 'S'", - "quickSearchSourceManga": "Search for Manga 'M' in Source 'S'", "quickSearchCategoryManga": "Go to Manga 'M' in Category 'C'", "quickSearchCategoryMangaChapter": "Go to Chapter Name 'CN' from Manga 'M' in Category 'C'", + "quickSearchContext": "Search for query X (Results are based on screen context)", "quickSearchShowAllCommandTip": "Tip: Enter '?' to see all commands", + "quickSearchSource": "Go to Source 'S'", + "quickSearchSourceManga": "Search for Manga 'M' in Source 'S'", "reader": "Reader", + "readerMagnifierSize": "Magnifier Size", "readerMode": "Reading Mode", "readerModeContinuousHorizontalLTR": "Continuous Horizontal (LTR)", "readerModeContinuousHorizontalRTL": "Continuous Horizontal (RTL)", @@ -840,19 +846,18 @@ "readerNavigationLayoutDisabled": "Disabled", "readerNavigationLayoutEdge": "Edge", "readerNavigationLayoutInvert": "Invert tapping", - "readerScrollAnimation": "Scroll animation", - "readerSwipeChapterToggle": "Swipe toggle", - "readerSwipeChapterToggleDescription": "Swipe to change chapter in reader", "readerNavigationLayoutKindlish": "Kindle-ish", "readerNavigationLayoutLShaped": "L Shaped", "readerNavigationLayoutRightAndLeft": "Right And Left", "readerOverlay": "Reader initial overlay", "readerOverlaySubtitle": "Shows title and quick settings when opening a chapter", "readerPadding": "Reader Padding", - "readerMagnifierSize": "Magnifier Size", + "readerScrollAnimation": "Scroll animation", + "readerSwipeChapterToggle": "Swipe toggle", + "readerSwipeChapterToggleDescription": "Swipe to change chapter in reader", "readerVolumeTap": "Volume Keys", - "readerVolumeTapSubtitle": "Navigate with Volume Keys", "readerVolumeTapInvert": "Invert Volume Keys", + "readerVolumeTapSubtitle": "Navigate with Volume Keys", "reddit": "Reddit", "refresh": "Refresh", "reload": "Reload", @@ -870,14 +875,14 @@ "scanlators": "Scanlators", "search": "Search", "searchingForUpdates": "Searching for updates", + "selectInBetween": "Select in between", "selectNext10": "Select next 10", "selectUnread": "Select Unread", - "selectInBetween": "Select in between", "server": "Server", - "serverUrl": "Server URL", - "serverUrlHintText": "Server url", "serverPort": "Server Port", "serverPortHintText": "Server port", + "serverUrl": "Server URL", + "serverUrlHintText": "Server url", "serverVersion": "Server version", "settings": "Settings", "sort": "Sort", @@ -891,7 +896,6 @@ "themeModeLight": "Light", "themeModeSystem": "System", "today": "Today", - "yesterday" : "Yesterday", "uninstall": "Uninstall", "uninstalling": "Uninstalling", "unknownAuthor": "Unknown Author", @@ -907,5 +911,6 @@ "versionAvailable": "Version {version} available for {app}!!", "webUI": "Open in WEB", "webView": "Web View", - "whatsNew": "What's New?" + "whatsNew": "What's New?", + "yesterday": "Yesterday" } diff --git a/lib/src/routes/router_config.dart b/lib/src/routes/router_config.dart index 55739eff..25c0c269 100644 --- a/lib/src/routes/router_config.dart +++ b/lib/src/routes/router_config.dart @@ -4,7 +4,9 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. +import 'package:flex_color_scheme/flex_color_scheme.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:go_router/go_router.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; @@ -125,7 +127,15 @@ class QuickSearchRoute extends ShellRouteData { @override Widget builder(context, state, navigator) => - SearchStackScreen(child: navigator); + AnnotatedRegion( + value: FlexColorScheme.themedSystemNavigationBar( + context, + systemNavBarStyle: FlexSystemNavBarStyle.background, + useDivider: false, + opacity: 0.60, + ), + child: SearchStackScreen(child: navigator), + ); } // Shell Routes diff --git a/lib/src/sorayomi.dart b/lib/src/sorayomi.dart index 1cf5c391..d9b4827a 100644 --- a/lib/src/sorayomi.dart +++ b/lib/src/sorayomi.dart @@ -4,12 +4,15 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. +import 'package:flex_color_scheme/flex_color_scheme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; +import 'package:fluttertoast/fluttertoast.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'constants/app_themes/color_schemas/default_theme.dart'; -import 'features/settings/widgets/theme_mode_tile/theme_mode_tile.dart'; +import 'features/settings/presentation/appearance/widgets/app_theme_selector/app_theme_selector.dart'; +import 'features/settings/presentation/appearance/widgets/is_true_black/is_true_black_tile.dart'; +import 'features/settings/widgets/app_theme_mode_tile/app_theme_mode_tile.dart'; import 'global_providers/global_providers.dart'; import 'routes/router_config.dart'; import 'utils/extensions/custom_extensions.dart'; @@ -20,13 +23,29 @@ class Sorayomi extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final routes = ref.watch(routerConfigProvider); - final themeMode = ref.watch(themeModeKeyProvider); + final themeMode = ref.watch(appThemeModeProvider); final appLocale = ref.watch(l10nProvider); + final appScheme = ref.watch(appSchemeProvider); + final isTrueBlack = ref.watch(isTrueBlackProvider); return MaterialApp.router( + builder: FToastBuilder(), onGenerateTitle: (context) => context.l10n!.appTitle, debugShowCheckedModeBanner: false, - theme: defaultTheme.light, - darkTheme: defaultTheme.dark, + theme: FlexThemeData.light( + scheme: appScheme, + useMaterial3: true, + useMaterial3ErrorColors: true, + ).copyWith( + tabBarTheme: const TabBarTheme(tabAlignment: TabAlignment.center), + ), + darkTheme: FlexThemeData.dark( + scheme: appScheme, + useMaterial3: true, + useMaterial3ErrorColors: true, + darkIsTrueBlack: isTrueBlack.ifNull(), + ).copyWith( + tabBarTheme: const TabBarTheme(tabAlignment: TabAlignment.center), + ), themeMode: themeMode ?? ThemeMode.system, localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, diff --git a/lib/src/utils/extensions/custom_extensions/context_extensions.dart b/lib/src/utils/extensions/custom_extensions/context_extensions.dart index 8955f4f3..f252089b 100644 --- a/lib/src/utils/extensions/custom_extensions/context_extensions.dart +++ b/lib/src/utils/extensions/custom_extensions/context_extensions.dart @@ -143,7 +143,7 @@ extension ContextExtensions on BuildContext { double get devicePixelRatio => MediaQuery.of(this).devicePixelRatio; /// similar to [MediaQuery.of(this).textScaleFactor] - double get textScaleFactor => MediaQuery.of(this).textScaleFactor; + TextScaler get textScaleFactor => MediaQuery.of(this).textScaler; /// get the shortestSide from screen double get mediaQueryShortestSide => mediaQuerySize.shortestSide; diff --git a/lib/src/utils/misc/toast/toast.dart b/lib/src/utils/misc/toast/toast.dart index d92e89ff..f576a286 100644 --- a/lib/src/utils/misc/toast/toast.dart +++ b/lib/src/utils/misc/toast/toast.dart @@ -5,8 +5,8 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; - import 'package:fluttertoast/fluttertoast.dart'; +import 'package:gap/gap.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../constants/app_sizes.dart'; @@ -79,7 +79,7 @@ class ToastWidget extends StatelessWidget { ? Row( children: [ icon!, - KSizedBox.w16.size, + const Gap(16), textWidget, ], ) diff --git a/lib/src/utils/mixin/shared_preferences_client_mixin.dart b/lib/src/utils/mixin/shared_preferences_client_mixin.dart index 5487b492..8b631727 100644 --- a/lib/src/utils/mixin/shared_preferences_client_mixin.dart +++ b/lib/src/utils/mixin/shared_preferences_client_mixin.dart @@ -9,6 +9,7 @@ import 'dart:convert'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import '../../constants/db_keys.dart'; import '../../global_providers/global_providers.dart'; import '../extensions/custom_extensions.dart'; @@ -29,17 +30,17 @@ mixin SharedPreferenceClientMixin { T? get state; late final dynamic Function(T)? _toJson; late final T? Function(dynamic)? _fromJson; + AutoDisposeNotifierProviderRef get ref; T? initialize( - AutoDisposeNotifierProviderRef ref, { - required key, + DBKeys key, { T? initial, dynamic Function(T)? toJson, T? Function(dynamic)? fromJson, }) { _client = ref.watch(sharedPreferencesProvider); - _key = key; - _initial = initial; + _key = key.name; + _initial = initial ?? key.initial; _toJson = toJson; _fromJson = fromJson; _persistenceRefreshLogic(ref); @@ -100,16 +101,12 @@ mixin SharedPreferenceEnumClientMixin { T? _initial; late List _enumList; set state(T? newState); + AutoDisposeNotifierProviderRef get ref; - T? initialize( - AutoDisposeNotifierProviderRef ref, { - required key, - required List enumList, - T? initial, - }) { + T? initialize(DBKeys key, {required List enumList}) { _client = ref.watch(sharedPreferencesProvider); - _key = key; - _initial = initial; + _key = key.name; + _initial = key.initial; _enumList = enumList; _persistenceRefreshLogic(ref); return _get; diff --git a/lib/src/widgets/emoticons.dart b/lib/src/widgets/emoticons.dart index 8c592618..50900175 100644 --- a/lib/src/widgets/emoticons.dart +++ b/lib/src/widgets/emoticons.dart @@ -5,8 +5,8 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. import 'package:flutter/material.dart'; - import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:gap/gap.dart'; import '../constants/app_sizes.dart'; import '../utils/extensions/custom_extensions.dart'; @@ -48,7 +48,7 @@ class Emoticons extends HookWidget { textAlign: TextAlign.center, style: context.textTheme.displayMedium, ), - KSizedBox.h16.size, + const Gap(16), if (text.isNotBlank) Text( text!, diff --git a/lib/src/widgets/manga_cover/providers/manga_cover_providers.dart b/lib/src/widgets/manga_cover/providers/manga_cover_providers.dart index 8fe6b12d..18b4c5e7 100644 --- a/lib/src/widgets/manga_cover/providers/manga_cover_providers.dart +++ b/lib/src/widgets/manga_cover/providers/manga_cover_providers.dart @@ -15,21 +15,13 @@ part 'manga_cover_providers.g.dart'; class DownloadedBadge extends _$DownloadedBadge with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.downloadedBadge.name, - initial: DBKeys.downloadedBadge.initial, - ); + bool? build() => initialize(DBKeys.downloadedBadge); } @riverpod class UnreadBadge extends _$UnreadBadge with SharedPreferenceClientMixin { @override - bool? build() => initialize( - ref, - key: DBKeys.unreadBadge.name, - initial: DBKeys.unreadBadge.initial, - ); + bool? build() => initialize(DBKeys.unreadBadge); } // @riverpod diff --git a/lib/src/widgets/manga_cover/providers/manga_cover_providers.g.dart b/lib/src/widgets/manga_cover/providers/manga_cover_providers.g.dart index 8f11482c..c546e7f5 100644 --- a/lib/src/widgets/manga_cover/providers/manga_cover_providers.g.dart +++ b/lib/src/widgets/manga_cover/providers/manga_cover_providers.g.dart @@ -6,7 +6,7 @@ part of 'manga_cover_providers.dart'; // RiverpodGenerator // ************************************************************************** -String _$downloadedBadgeHash() => r'afa3d2e9bd56dcb3bcb89c5811f653ea2b1bb934'; +String _$downloadedBadgeHash() => r'c85ad3fe5957c545c2af94e393a463c7ed15a6b3'; /// See also [DownloadedBadge]. @ProviderFor(DownloadedBadge) @@ -22,7 +22,7 @@ final downloadedBadgeProvider = ); typedef _$DownloadedBadge = AutoDisposeNotifier; -String _$unreadBadgeHash() => r'cdb245781af0083f949d8584063609220b41c790'; +String _$unreadBadgeHash() => r'e69869b4f8a68affd21a3bffccbb7d0577a83043'; /// See also [UnreadBadge]. @ProviderFor(UnreadBadge) diff --git a/lib/src/widgets/manga_cover/widgets/manga_chips.dart b/lib/src/widgets/manga_cover/widgets/manga_chips.dart index e7cc601d..78741d8c 100644 --- a/lib/src/widgets/manga_cover/widgets/manga_chips.dart +++ b/lib/src/widgets/manga_cover/widgets/manga_chips.dart @@ -9,7 +9,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../../../constants/app_sizes.dart'; import '../../../features/manga_book/domain/manga/manga_model.dart'; - import '../../../utils/extensions/custom_extensions.dart'; import '../providers/manga_cover_providers.dart'; @@ -43,8 +42,8 @@ class MangaChipsRow extends ConsumerWidget { if (manga.unreadCount.isGreaterThan(0) && unreadBadge) MangaChip( text: context.l10n!.nameCountDisplay( - context.l10n!.unread, manga.unreadCount.getValueOnNullOrNegative(), + context.l10n!.unread, ), color: context.theme.colorScheme.primary, textColor: context.theme.colorScheme.onPrimary, @@ -52,8 +51,8 @@ class MangaChipsRow extends ConsumerWidget { if (manga.downloadCount.isGreaterThan(0) && downloadedBadge) MangaChip( text: context.l10n!.nameCountDisplay( - context.l10n!.downloaded, manga.downloadCount.getValueOnNullOrNegative(), + context.l10n!.downloaded, ), color: context.theme.colorScheme.tertiary, textColor: context.theme.colorScheme.onTertiary, diff --git a/lib/src/widgets/server_image.dart b/lib/src/widgets/server_image.dart index bfe94498..4a494e4a 100644 --- a/lib/src/widgets/server_image.dart +++ b/lib/src/widgets/server_image.dart @@ -9,6 +9,7 @@ import 'package:cached_network_image_platform_interface/cached_network_image_pla import 'package:flutter/material.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import '../constants/app_sizes.dart'; @@ -93,7 +94,7 @@ class ServerImage extends HookConsumerWidget { Icons.broken_image_rounded, color: Colors.grey, ), - KSizedBox.h32.size, + const Gap(32), TextButton( onPressed: () { key.value = (UniqueKey()); diff --git a/lib/src/widgets/text_field_popup.dart b/lib/src/widgets/text_field_popup.dart index dce5cdec..ab05d073 100644 --- a/lib/src/widgets/text_field_popup.dart +++ b/lib/src/widgets/text_field_popup.dart @@ -6,7 +6,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:go_router/go_router.dart'; import '../constants/app_sizes.dart'; import '../utils/extensions/custom_extensions.dart'; @@ -48,7 +47,7 @@ class TextFieldPopup extends HookWidget { autofocus: true, onSubmitted: (value) { onChange(value); - context.pop(); + Navigator.pop(context); }, controller: textEditingController, decoration: InputDecoration( diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 82b4bbcf..749bbfda 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -53,11 +53,11 @@ SPEC CHECKSUMS: FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a network_info_plus: f4fbc7877ab7b3294500d9441dfa53cd54972d05 package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce - path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 - shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 + path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c + shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95 PODFILE CHECKSUM: dac0ddf03d136db544afc27b87cc6c08492e67b9 -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.3 diff --git a/pubspec.lock b/pubspec.lock index b7ec48a0..3a34205f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -25,14 +25,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.11.3" + ansicolor: + dependency: transitive + description: + name: ansicolor + sha256: "8bf17a8ff6ea17499e40a2d2542c2f481cd7615760c6d34065cb22bfd22e6880" + url: "https://pub.dev" + source: hosted + version: "2.0.2" archive: dependency: transitive description: name: archive - sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b" + sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" url: "https://pub.dev" source: hosted - version: "3.4.9" + version: "3.4.10" args: dependency: transitive description: @@ -85,18 +93,18 @@ packages: dependency: transitive description: name: build_resolvers - sha256: "64e12b0521812d1684b1917bc80945625391cb9bdd4312536b1d69dcb6133ed8" + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.8" build_runner_core: dependency: transitive description: @@ -117,34 +125,34 @@ packages: dependency: transitive description: name: built_value - sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e" + sha256: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309 url: "https://pub.dev" source: hosted - version: "8.7.0" + version: "8.8.1" cached_network_image: dependency: "direct main" description: name: cached_network_image - sha256: f98972704692ba679db144261172a8e20feb145636c617af0eb4022132a6797f + sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.3.1" cached_network_image_platform_interface: dependency: "direct main" description: name: cached_network_image_platform_interface - sha256: "56aa42a7a01e3c9db8456d9f3f999931f1e05535b5a424271e9a38cabf066613" + sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" cached_network_image_web: dependency: transitive description: name: cached_network_image_web - sha256: "759b9a9f8f6ccbb66c185df805fac107f05730b1dab9c64626d1008cca532257" + sha256: "42a835caa27c220d1294311ac409a43361088625a4f23c820b006dd9bffb3316" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" characters: dependency: transitive description: @@ -173,10 +181,10 @@ packages: dependency: transitive description: name: cli_util - sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "0.4.1" clock: dependency: transitive description: @@ -189,18 +197,18 @@ packages: dependency: transitive description: name: code_builder - sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "4.10.0" collection: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" color: dependency: transitive description: @@ -245,26 +253,26 @@ packages: dependency: transitive description: name: custom_lint - sha256: f9a828b696930cf8307f9a3617b2b65c9b370e484dc845d69100cadb77506778 + sha256: dfb893ff17c83cf08676c6b64df11d3e53d80590978d7c1fb242afff3ba6dedb url: "https://pub.dev" source: hosted - version: "0.5.6" + version: "0.5.8" custom_lint_core: dependency: transitive description: name: custom_lint_core - sha256: e20a67737adcf0cf2465e734dd624af535add11f9edd1f2d444909b5b0749650 + sha256: "2b235be098d157e244f18ea905a15a18c16a205e30553888fac6544bbf52f03f" url: "https://pub.dev" source: hosted - version: "0.5.6" + version: "0.5.8" dart_style: dependency: transitive description: name: dart_style - sha256: abd7625e16f51f554ea244d090292945ec4d4be7bfbaf2ec8cccea568919d334 + sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.4" dartx: dependency: transitive description: @@ -285,26 +293,26 @@ packages: dependency: "direct main" description: name: dio - sha256: "417e2a6f9d83ab396ec38ff4ea5da6c254da71e4db765ad737a42af6930140b7" + sha256: "797e1e341c3dd2f69f2dad42564a6feff3bfb87187d05abb93b9609e6f1645c3" url: "https://pub.dev" source: hosted - version: "5.3.3" + version: "5.4.0" dio_cache_interceptor: dependency: "direct main" description: name: dio_cache_interceptor - sha256: "7c0cb435963f08aa751ae8769b360d462f01160adc1d2d5b80e3b8c450b386e3" + sha256: fb7905c0d12075d8786a6b63bffd64ae062d053f682cfaf28d145a2686507308 url: "https://pub.dev" source: hosted - version: "3.4.4" + version: "3.5.0" dio_cache_interceptor_hive_store: dependency: "direct main" description: name: dio_cache_interceptor_hive_store - sha256: "7a376b1db0a153e16ad51ce0cf1d2549ca14a2ddf462523c362fac9e077c5f14" + sha256: "449b36541216cb20543228081125ad2995eb9712ec35bd030d85663ea1761895" url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" fake_async: dependency: transitive description: @@ -345,6 +353,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + flex_color_scheme: + dependency: "direct main" + description: + name: flex_color_scheme + sha256: "32914024a4f404d90ff449f58d279191675b28e7c08824046baf06826e99d984" + url: "https://pub.dev" + source: hosted + version: "7.3.1" + flex_seed_scheme: + dependency: transitive + description: + name: flex_seed_scheme + sha256: "29c12aba221eb8a368a119685371381f8035011d18de5ba277ad11d7dfb8657f" + url: "https://pub.dev" + source: hosted + version: "1.4.0" flutter: dependency: "direct main" description: flutter @@ -370,26 +394,26 @@ packages: dependency: transitive description: name: flutter_gen_core - sha256: "8b4ff1d45d125e576e26ea99d15e0419bb3c45b53696e022880866b78bb6b830" + sha256: "3a6c3dbc1c0e260088e9c7ed1ba905436844e8c01a44799f6281edada9e45308" url: "https://pub.dev" source: hosted - version: "5.3.2" + version: "5.4.0" flutter_gen_runner: dependency: "direct dev" description: name: flutter_gen_runner - sha256: fd197f8c657e79313d53d3934de602ebe604ba722a84c88ae3a43cd90428c67a + sha256: "24889d5140b03997f7148066a9c5fab8b606dff36093434c782d7a7fb22c6fb6" url: "https://pub.dev" source: hosted - version: "5.3.2" + version: "5.4.0" flutter_hooks: dependency: "direct main" description: name: flutter_hooks - sha256: "7c8db779c2d1010aa7f9ea3fbefe8f86524fcb87b69e8b0af31e1a4b55422dec" + sha256: "09f64db63fee3b2ab8b9038a1346be7d8986977fae3fec601275bf32455ccfc0" url: "https://pub.dev" source: hosted - version: "0.20.3" + version: "0.20.4" flutter_launcher_icons: dependency: "direct dev" description: @@ -415,18 +439,18 @@ packages: dependency: "direct main" description: name: flutter_markdown - sha256: "35108526a233cc0755664d445f8a6b4b61e6f8fe993b3658b80b4a26827fc196" + sha256: "30088ce826b5b9cfbf9e8bece34c716c8a59fa54461dcae1e4ac01a94639e762" url: "https://pub.dev" source: hosted - version: "0.6.18+2" + version: "0.6.18+3" flutter_native_splash: dependency: "direct dev" description: name: flutter_native_splash - sha256: d93394f22f73e810bda59e11ebe83329c5511d6460b6b7509c4e1f3c92d6d625 + sha256: "9cdb5d9665dab5d098dc50feab74301c2c228cd02ca25c9b546ab572cebcd6af" url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.3.9" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -439,10 +463,10 @@ packages: dependency: transitive description: name: flutter_riverpod - sha256: "49b55e8a467229eedb801bd0864baa7f891c39cc00f790189ba8479e9ad0fa06" + sha256: da9591d1f8d5881628ccd5c25c40e74fc3eef50ba45e40c3905a06e1712412d5 url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.9" flutter_staggered_grid_view: dependency: transitive description: @@ -481,10 +505,10 @@ packages: dependency: "direct dev" description: name: freezed - sha256: "21bf2825311de65501d22e563e3d7605dff57fb5e6da982db785ae5372ff018a" + sha256: "6c5031daae12c7072b3a87eff98983076434b4889ef2a44384d0cae3f82372ba" url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "2.4.6" freezed_annotation: dependency: "direct main" description: @@ -501,6 +525,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.0" + gap: + dependency: "direct main" + description: + name: gap + sha256: f19387d4e32f849394758b91377f9153a1b41d79513ef7668c088c77dbc6955d + url: "https://pub.dev" + source: hosted + version: "3.0.1" glob: dependency: transitive description: @@ -513,18 +545,18 @@ packages: dependency: "direct main" description: name: go_router - sha256: c247a4f76071c3b97bb5ae8912968870d5565644801c5e09f3bc961b4d874895 + sha256: "3b40e751eaaa855179b416974d59d29669e750d2e50fcdb2b37f1cb0ca8c803a" url: "https://pub.dev" source: hosted - version: "12.1.1" + version: "13.0.1" go_router_builder: dependency: "direct dev" description: name: go_router_builder - sha256: a4820cf40c647d674aa9305cdac2eaa6d03a795bb8f6b30c0469939417f7c4d8 + sha256: f84449079eb1f09f59344fbbb8cdc6a6349d8973a83746a57953bd4130d852b6 url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.4.1" graphs: dependency: transitive description: @@ -545,10 +577,10 @@ packages: dependency: "direct main" description: name: hooks_riverpod - sha256: "4fee3c75360e353128149df23ed93414477082bb130f9e23723b1a79a54bc6d0" + sha256: c12a456e03ef9be65b0be66963596650ad7a3220e96c7e7b0a048562ea32d6ae url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.9" html: dependency: transitive description: @@ -561,10 +593,10 @@ packages: dependency: transitive description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.2" http_multi_server: dependency: transitive description: @@ -585,10 +617,10 @@ packages: dependency: transitive description: name: image - sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271" + sha256: "004a2e90ce080f8627b5a04aecb4cdfac87d2c3f3b520aa291260be5a32c033d" url: "https://pub.dev" source: hosted - version: "4.1.3" + version: "4.1.4" infinite_scroll_pagination: dependency: "direct main" description: @@ -681,10 +713,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" mime: dependency: transitive description: @@ -737,10 +769,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" + sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "5.0.1" package_info_plus_platform_interface: dependency: transitive description: @@ -761,26 +793,26 @@ packages: dependency: "direct main" description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 + sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.2" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" path_provider_linux: dependency: transitive description: @@ -793,10 +825,10 @@ packages: dependency: transitive description: name: path_provider_platform_interface - sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" path_provider_windows: dependency: transitive description: @@ -809,74 +841,82 @@ packages: dependency: "direct main" description: name: permission_handler - sha256: "284a66179cabdf942f838543e10413246f06424d960c92ba95c84439154fcac8" + sha256: "860c6b871c94c78e202dc69546d4d8fd84bd59faeb36f8fb9888668a53ff4f78" url: "https://pub.dev" source: hosted - version: "11.0.1" + version: "11.1.0" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: f9fddd3b46109bd69ff3f9efa5006d2d309b7aec0f3c1c5637a60a2d5659e76e + sha256: "8da85e83a19152019275ad91f64498c238aa38309133dc582c447c544405b0ec" url: "https://pub.dev" source: hosted - version: "11.1.0" + version: "12.0.2" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" + sha256: "1a816084338ada8d574b1cb48390e6e8b19305d5120fe3a37c98825bacc78306" + url: "https://pub.dev" + source: hosted + version: "9.2.0" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "11b762a8c123dced6461933a88ea1edbbe036078c3f9f41b08886e678e7864df" url: "https://pub.dev" source: hosted - version: "9.1.4" + version: "0.1.0+2" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" + sha256: d87349312f7eaf6ce0adaf668daf700ac5b06af84338bd8b8574dfbd93ffe1a1 url: "https://pub.dev" source: hosted - version: "3.12.0" + version: "4.0.2" permission_handler_windows: dependency: transitive description: name: permission_handler_windows - sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 + sha256: "1e8640c1e39121128da6b816d236e714d2cf17fac5a105dd6acdd3403a628004" url: "https://pub.dev" source: hosted - version: "0.1.3" + version: "0.2.0" petitparser: dependency: transitive description: name: petitparser - sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "6.0.2" platform: dependency: transitive description: name: platform - sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.1.8" pointycastle: dependency: transitive description: name: pointycastle - sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" url: "https://pub.dev" source: hosted - version: "3.7.3" + version: "3.7.4" pool: dependency: transitive description: @@ -913,34 +953,34 @@ packages: dependency: transitive description: name: riverpod - sha256: "01fa385aa5d6db42fd602d8c400c28ae1c83d1fd6fbae1cbf0f4c78bac58d4b2" + sha256: "942999ee48b899f8a46a860f1e13cee36f2f77609eb54c5b7a669bb20d550b11" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.9" riverpod_analyzer_utils: dependency: transitive description: name: riverpod_analyzer_utils - sha256: "22a089135785f27e601075023f93c6622c43ef28c3ba1bef303cfbc314028e64" + sha256: d4dabc35358413bf4611fcb6abb46308a67c4ef4cd5e69fd3367b11925c59f57 url: "https://pub.dev" source: hosted - version: "0.4.3" + version: "0.5.0" riverpod_annotation: dependency: "direct main" description: name: riverpod_annotation - sha256: "670dc172c835a1638fe942552449f99adb40ea3faa2d4988081db3c2bd1a4891" + sha256: b70e95fbd5ca7ce42f5148092022971bb2e9843b6ab71e97d479e8ab52e98979 url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.3" riverpod_generator: dependency: "direct dev" description: name: riverpod_generator - sha256: f7c897ffac15f8b845b99ef88a1c8923df74ac8a2a96cd53eb9ecd5459baac27 + sha256: ff8f064f1d7ef3cc6af481bba8e9a3fcdb4d34df34fac1b39bbc003167065be0 url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "2.3.9" rxdart: dependency: transitive description: @@ -977,10 +1017,10 @@ packages: dependency: transitive description: name: shared_preferences_foundation - sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" + sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.3.5" shared_preferences_linux: dependency: transitive description: @@ -993,18 +1033,18 @@ packages: dependency: transitive description: name: shared_preferences_platform_interface - sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a + sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf + sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.2" shared_preferences_windows: dependency: transitive description: @@ -1054,10 +1094,10 @@ packages: dependency: transitive description: name: source_gen - sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" source_helper: dependency: transitive description: @@ -1102,10 +1142,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" state_notifier: dependency: transitive description: @@ -1118,10 +1158,10 @@ packages: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -1142,10 +1182,10 @@ packages: dependency: transitive description: name: synchronized - sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" + sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.0+1" term_glyph: dependency: transitive description: @@ -1158,10 +1198,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" time: dependency: transitive description: @@ -1198,34 +1238,34 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba + sha256: d25bb0ca00432a5e1ee40e69c36c85863addf7cc45e433769d61bed3fe81fd96 url: "https://pub.dev" source: hosted - version: "6.2.1" + version: "6.2.3" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" + sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.2.2" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: bba3373219b7abb6b5e0d071b0fe66dfbe005d07517a68e38d4fc3638f35c6d3 + sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" url: "https://pub.dev" source: hosted - version: "6.2.1" + version: "6.2.4" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd" + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" url_launcher_macos: dependency: transitive description: @@ -1238,34 +1278,34 @@ packages: dependency: transitive description: name: url_launcher_platform_interface - sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" + sha256: a932c3a8082e118f80a475ce692fde89dc20fddb24c57360b96bc56f7035de1f url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.1" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" + sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc" + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" uuid: dependency: transitive description: name: uuid - sha256: df5a4d8f22ee4ccd77f8839ac7cb274ebc11ef9adcce8b92be14b797fe889921 + sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "4.3.3" vector_math: dependency: transitive description: @@ -1286,10 +1326,10 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.3.0" web_socket_channel: dependency: "direct main" description: @@ -1302,26 +1342,26 @@ packages: dependency: transitive description: name: win32 - sha256: "7c99c0e1e2fa190b48d25c81ca5e42036d5cac81430ef249027d97b0935c553f" + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.2.0" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" xml: dependency: transitive description: name: xml - sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.5.0" yaml: dependency: transitive description: @@ -1331,5 +1371,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.0 <4.0.0" - flutter: ">=3.13.0" + dart: ">=3.2.0 <4.0.0" + flutter: ">=3.16.0" diff --git a/pubspec.yaml b/pubspec.yaml index 30ff8980..8b4cccb2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,12 +9,13 @@ environment: dependencies: cached_network_image: ^3.2.2 - cached_network_image_platform_interface: ^3.0.0 + cached_network_image_platform_interface: ^4.0.0 cupertino_icons: ^1.0.5 dio: ^5.0.0 dio_cache_interceptor: ^3.4.0 dio_cache_interceptor_hive_store: ^3.2.1 file_picker: ^6.0.0 + flex_color_scheme: ^7.3.1 flutter: sdk: flutter flutter_android_volume_keydown: ^1.0.0 @@ -26,13 +27,14 @@ dependencies: fluttertoast: ^8.1.1 font_awesome_flutter: ^10.2.1 freezed_annotation: ^2.2.0 - go_router: ^12.0.0 + gap: ^3.0.1 + go_router: ^13.0.1 hooks_riverpod: ^2.1.1 infinite_scroll_pagination: ^4.0.0 intl: ^0.18.0 json_annotation: ^4.8.1 network_info_plus: ^4.0.0 - package_info_plus: ^4.0.0 + package_info_plus: ^5.0.1 path: ^1.8.3 path_provider: ^2.0.11 permission_handler: ^11.0.0 From 269cdae1cb192319462087ae3ceee21246314e9a Mon Sep 17 00:00:00 2001 From: Fordas Date: Thu, 11 Jan 2024 13:03:40 +0000 Subject: [PATCH 2/4] Translated using Weblate (Spanish) Currently translated at 100.0% (213 of 213 strings) Translation: Suwayomi/Tachidesk-Sorayomi Translate-URL: https://hosted.weblate.org/projects/suwayomi/tachidesk-sorayomi/es/ --- lib/src/l10n/app_es.arb | 58 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/lib/src/l10n/app_es.arb b/lib/src/l10n/app_es.arb index 497b940a..dff1580a 100644 --- a/lib/src/l10n/app_es.arb +++ b/lib/src/l10n/app_es.arb @@ -1,10 +1,10 @@ { "@@locale": "es", - "about": "Información", + "about": "Acerca de", "@about": {}, "addCategory": "Añadir categoría", "@addCategory": {}, - "addToLibrary": "Añadir a biblioteca", + "addToLibrary": "Añadir a la biblioteca", "@addToLibrary": {}, "appLanguage": "Idioma de la aplicación", "@appLanguage": {}, @@ -20,7 +20,7 @@ "@authTypeBasic": {}, "authTypeNone": "Ninguna", "@authTypeNone": {}, - "backup": "Copia de seguridad y restauracion", + "backup": "Copia de seguridad y restauración", "@backup": {}, "badges": "Insignias", "@badges": {}, @@ -40,7 +40,7 @@ "@categoryUpdate": {}, "channel": "Canal", "@channel": {}, - "chapterNumber": "Capitulo {number}", + "chapterNumber": "Capítulo {number}", "@chapterNumber": {}, "chapterSortFetchedDate": "Por fecha de búsqueda", "@chapterSortFetchedDate": {}, @@ -62,7 +62,7 @@ "@copyMsg": {}, "create": "Crear", "@create": {}, - "createBackupDescription": "Copia de seguridad de biblioteca como copia de seguridad de tachidesk", + "createBackupDescription": "Copia de seguridad de biblioteca como copia de seguridad de Tachidesk", "@createBackupDescription": {}, "createBackupTitle": "Crear copia de seguridad", "@createBackupTitle": {}, @@ -70,7 +70,7 @@ "@credentials": {}, "current": "Actual", "@current": {}, - "defaultCategory": "Categoría por defecto al añadir un nuevo manga a la biblioteca", + "defaultCategory": "Categoría predeterminada al añadir un nuevo manga a la biblioteca", "@defaultCategory": {}, "delete": "Eliminar", "@delete": {}, @@ -86,7 +86,7 @@ "@displayMode": {}, "displayModeDescriptiveList": "Lista descriptiva", "@displayModeDescriptiveList": {}, - "displayModeGrid": "Cuadricula", + "displayModeGrid": "Cuadrícula", "@displayModeGrid": {}, "displayModeList": "Lista", "@displayModeList": {}, @@ -102,9 +102,9 @@ "@emptyCategory": {}, "errorExtension": "No se encontró la extensión seleccionada", "@errorExtension": {}, - "errorFilePick": "Archivo no seleccionado!", + "errorFilePick": "¡Archivo no seleccionado!", "@errorFilePick": {}, - "errorFilePickUnknownExtension": "Por favor, selecciona un archivo con la extensión {extensionName}", + "errorFilePickUnknownExtension": "¡Por favor, selecciona un archivo con la extensión {extensionName}", "@errorFilePickUnknownExtension": {}, "errorLaunchURL": "¡Error al abrir!\nCopiando \"{url}\" al portapapeles", "@errorLaunchURL": {}, @@ -112,7 +112,7 @@ "@errorPassword": {}, "errorSomethingWentWrong": "¡Algo salió mal!", "@errorSomethingWentWrong": {}, - "errorUserName": "Tu nombre no puede estar en blanco", + "errorUserName": "El nombre de usuario no puede estar en blanco", "@errorUserName": {}, "extensionInstalled": "¡La extensión ha sido instalada!", "@extensionInstalled": {}, @@ -166,7 +166,7 @@ "@mangaStatusCancelled": {}, "mangaStatusCompleted": "Completado", "@mangaStatusCompleted": {}, - "mangaStatusLicensed": "Con Licencia", + "mangaStatusLicensed": "Con licencia", "@mangaStatusLicensed": {}, "mangaStatusOnHiatus": "En receso", "@mangaStatusOnHiatus": {}, @@ -180,7 +180,7 @@ "@missingExtension": {}, "missingTrackers": "Rastreadores faltantes", "@missingTrackers": {}, - "more": "Mas", + "more": "Más", "@more": {}, "moveToBottom": "Mover al fondo", "@moveToBottom": {}, @@ -190,25 +190,25 @@ "@nameCountDisplay": {}, "newUpdateAvailable": "Nueva actualización disponible", "@newUpdateAvailable": {}, - "noCategoriesFound": "No tienes ninguna categoría.\n(Tip:Presiona el botón plus para crear uno y organizar tu biblioteca)", + "noCategoriesFound": "No tienes ninguna categoría.\n(Tip: Pulsa el botón Más para crear uno y organizar tu biblioteca)", "@noCategoriesFound": {}, "noCategoriesFoundAlt": "No tienes ninguna categoría.\nCrea uno en ajustes para organizar tu biblioteca", "@noCategoriesFoundAlt": {}, - "noCategoryMangaFound": "No hay ningún manga en esta categoría.\n(Tip: ¡Mira tus búsquedas y filtros!)", + "noCategoryMangaFound": "No hay ningún manga en esta categoría.\n(Tip: ¡Comprueba tus búsquedas y filtros!)", "@noCategoryMangaFound": {}, - "noChaptersFound": "No se encontraron los capítulos", + "noChaptersFound": "No se encontraron capítulos", "@noChaptersFound": {}, "noDownloads": "No hay descargas", "@noDownloads": {}, - "noMangaFound": "No se encontraron los mangas", + "noMangaFound": "No se encontraron mangas", "@noMangaFound": {}, - "noOfChapters": "{count} capitulos", + "noOfChapters": "{count} capítulos", "@noOfChapters": {}, "noResultFound": "Sin resultados", "@noResultFound": {}, "noSourcesFound": "No se encontraron fuentes", "@noSourcesFound": {}, - "noUpdatesAvailable": "Estas usando la última versión", + "noUpdatesAvailable": "Estás usando la última versión", "@noUpdatesAvailable": {}, "noUpdatesFound": "Sin actualizaciones", "@noUpdatesFound": {}, @@ -216,7 +216,7 @@ "@nsfw": {}, "nsfw18": "18+", "@nsfw18": {}, - "nsfwInfo": "Esto no evita que extensiones no oficiales o posiblemente marcadas incorrectamente muestren contenido para adultos (18+) en la aplicación", + "nsfwInfo": "Esto no evita que extensiones no oficiales o marcadas potencialmente de forma incorrecta muestren contenido para adultos (18+) en la aplicación", "@nsfwInfo": {}, "numSelected": "{num} seleccionado", "@numSelected": {}, @@ -234,19 +234,19 @@ "@reader": {}, "readerMode": "Modo de lectura", "@readerMode": {}, - "readerModeContinuousHorizontalLTR": "Horizontal Continuo (IZQ-DER)", + "readerModeContinuousHorizontalLTR": "Horizontal continuo (IZQ-DER)", "@readerModeContinuousHorizontalLTR": {}, - "readerModeContinuousHorizontalRTL": "Horizontal Continuo (DER-IZQ)", + "readerModeContinuousHorizontalRTL": "Horizontal continuo (DER-IZQ)", "@readerModeContinuousHorizontalRTL": {}, - "readerModeContinuousVertical": "Vertical Continuo", + "readerModeContinuousVertical": "Vertical continuo", "@readerModeContinuousVertical": {}, "readerModeDefaultReader": "Predeterminado", "@readerModeDefaultReader": {}, - "readerModeSingleHorizontalLTR": "Horizontal Individual (IZQ-DER)", + "readerModeSingleHorizontalLTR": "Horizontal individual (IZQ-DER)", "@readerModeSingleHorizontalLTR": {}, - "readerModeSingleHorizontalRTL": "Horizontal Individual (DER-IZQ)", + "readerModeSingleHorizontalRTL": "Horizontal individual (DER-IZQ)", "@readerModeSingleHorizontalRTL": {}, - "readerModeSingleVertical": "Horizontal Individual", + "readerModeSingleVertical": "Horizontal individual", "@readerModeSingleVertical": {}, "readerModeWebtoon": "Webtoon", "@readerModeWebtoon": {}, @@ -298,7 +298,7 @@ "@serverUrl": {}, "serverUrlHintText": "Dirección Url del servidor", "@serverUrlHintText": {}, - "serverVersion": "Version del servidor", + "serverVersion": "Versión del servidor", "@serverVersion": {}, "settings": "Ajustes", "@settings": {}, @@ -348,7 +348,7 @@ "@updating": {}, "userName": "Nombre de usuario", "@userName": {}, - "versionAvailable": "La versión {version} está disponible para {app}!!", + "versionAvailable": "¡¡La versión {version} está disponible para {app}!!", "@versionAvailable": {}, "webUI": "Abrir en el navegador", "@webUI": {}, @@ -424,7 +424,7 @@ "@quickSearchCategory": { "description": "Quick Open Hint text for Category C with prefill '#C'" }, - "quickSearchContext": "Busca la consulta X (los resultados se basan en el contexto de la pantalla)", + "quickSearchContext": "Busca la consulta X (los resultados se basan en el contexto en pantalla)", "@quickSearchContext": { "description": "Quick Open Hint text for query X" }, @@ -474,7 +474,7 @@ }, "readerOverlaySubtitle": "Muestra el título y los ajustes rápidos al abrir un capítulo", "@readerOverlaySubtitle": {}, - "quickSearchShowAllCommandTip": "Consejo: Introduzca '?' para ver todos los comandos", + "quickSearchShowAllCommandTip": "Consejo: Introduce '?' para ver todos los comandos", "@quickSearchShowAllCommandTip": { "description": "Quick Open Tip text for showing all commands by entering '?'" }, From b3e4e4e9334700d1262a0046c1b79154c53d6533 Mon Sep 17 00:00:00 2001 From: Zereef Date: Sat, 13 Jan 2024 01:48:45 +0000 Subject: [PATCH 3/4] Translated using Weblate (Portuguese (Portugal)) Currently translated at 99.5% (212 of 213 strings) Translation: Suwayomi/Tachidesk-Sorayomi Translate-URL: https://hosted.weblate.org/projects/suwayomi/tachidesk-sorayomi/pt_PT/ --- lib/src/l10n/app_pt_PT.arb | 88 ++++++++++++++++++++++++++++++++++---- 1 file changed, 79 insertions(+), 9 deletions(-) diff --git a/lib/src/l10n/app_pt_PT.arb b/lib/src/l10n/app_pt_PT.arb index 95e406a6..ecd0b058 100644 --- a/lib/src/l10n/app_pt_PT.arb +++ b/lib/src/l10n/app_pt_PT.arb @@ -360,11 +360,11 @@ "@mangaGridSize": { "description": "Popup title and Button text to change Manga Grid size" }, - "serverPort": "", + "serverPort": "Porta do Servidor", "@serverPort": { "description": "Popup title and Button text to update Server Port" }, - "serverPortHintText": "", + "serverPortHintText": "Porta do Servidor", "@serverPortHintText": { "description": "Text Filed hint text to update Server Port" }, @@ -372,11 +372,11 @@ "@allScanlators": { "description": "Text for all Scanlators in manga description screen chapter filter" }, - "quickSearchSourceManga": "", + "quickSearchSourceManga": "Procurar por manga 'M' na Fonte 'S'", "@quickSearchSourceManga": { "description": "Quick Open Hint text for searching Manga M in Source S with prefill '@S/M'" }, - "readerScrollAnimation": "", + "readerScrollAnimation": "Animação do Scroll", "@readerScrollAnimation": { "description": "Switch title to Disable scroll animation in reader screen" }, @@ -384,7 +384,7 @@ "@quickSearchContext": { "description": "Quick Open Hint text for query X" }, - "quickSearchCategoryMangaChapter": "", + "quickSearchCategoryMangaChapter": "Ir para o Nome do Capitulo 'CN' Do Manga 'M' na Categoria 'C'", "@quickSearchCategoryMangaChapter": { "description": "Quick Open Hint text for searching Chapter name CN from Manga M in Source S with prefill '#C/M:CN'" }, @@ -392,15 +392,15 @@ "@quickSearchCategory": { "description": "Quick Open Hint text for Category C with prefill '#C'" }, - "quickSearchCategoryManga": "", + "quickSearchCategoryManga": "Ir para o Manga 'M' na Categoria 'C'", "@quickSearchCategoryManga": { "description": "Quick Open Hint text for searching Manga M in Category C with prefill '#C/M'" }, - "scanlators": "", + "scanlators": "Scanlators", "@scanlators": { "description": "Title text for Scanlators" }, - "quickSearchSource": "", + "quickSearchSource": "Ir para a Fonte 'S'", "@quickSearchSource": { "description": "Quick Open Hint text for Source S with prefill '@S'" }, @@ -412,7 +412,7 @@ "@noServerFound": { "description": "Text to show that no Server found in locale network" }, - "readerMagnifierSize": "", + "readerMagnifierSize": "Tamanho da lupa", "@readerMagnifierSize": { "description": "Slider title text for Reader Magnifier Size" }, @@ -435,5 +435,75 @@ "daysAgo": "{days} dias atrás", "@daysAgo": { "description": "Days ago text to show the release date of manga" + }, + "nextChapter": "Próximo: {chapterTitle}", + "@nextChapter": { + "description": "Text for Next Chapter button in Manga Reader Screen" + }, + "previousChapter": "Anterior: {chapterTitle}", + "@previousChapter": { + "description": "Text for Previous Chapter button in Manga Reader Screen" + }, + "readerSwipeChapterToggleDescription": "Deslizar para mudar Capitulo no leitor", + "@readerSwipeChapterToggleDescription": { + "description": "Switch tile description for, toggle `swipe to change chapter` in reader screen" + }, + "quickSearchShowAllCommandTip": "Dica: Digite \"?\" Para ver todos os comandos", + "@quickSearchShowAllCommandTip": { + "description": "Quick Open Tip text for showing all commands by entering '?'" + }, + "readerSwipeChapterToggle": "Alternar deslize", + "@readerSwipeChapterToggle": { + "description": "Switch title to toggle `swipe to change chapter` in reader screen" + }, + "readerOverlay": "Overlay inicial do Leitor", + "@readerOverlay": { + "description": "Toggle subtile text for Initial Reader Overlay" + }, + "readerOverlaySubtitle": "Mostrar título e definições rápidas ao abrir o capítulo", + "@readerOverlaySubtitle": {}, + "reload": "recarregar", + "@reload": { + "description": "Reload button text" + }, + "selectUnread": "Selecionar os não lidos", + "@selectUnread": { + "description": "Popup Text for selecting unread chapters" + }, + "selectInBetween": "Selecionar no Meio", + "@selectInBetween": { + "description": "Toast Text for selecting chapters in between first and last Chapters" + }, + "today": "Hoje", + "@today": { + "description": "Today Text to show the release date of manga" + }, + "yesterday": "Ontem", + "@yesterday": { + "description": "Yesterday Text to show the release date of manga" + }, + "removeFromLibrary": "Remover da Biblioteca?", + "@removeFromLibrary": { + "description": "Remove From Library Popup text" + }, + "readerVolumeTap": "Teclas de volume", + "@readerVolumeTap": { + "description": "Switch button text for Reader Page Navigation with Volume Tap" + }, + "readerVolumeTapSubtitle": "Navegar com teclas de volume", + "@readerVolumeTapSubtitle": { + "description": "Switch button Subtitle text for Reader Page Navigation with Volume Tap" + }, + "readerVolumeTapInvert": "Inverter teclas de volume", + "@readerVolumeTapInvert": { + "description": "Switch button text to invert Volume Tap " + }, + "remove": "Remover", + "@remove": { + "description": "Remove Button text" + }, + "selectNext10": "Selecionar os Proximos 10", + "@selectNext10": { + "description": "Toast Text for selecting next 10 chapters" } } From 4965f3ced333870196f28c757819b4a8b619a7be Mon Sep 17 00:00:00 2001 From: Emanuel Ferraz Date: Sun, 14 Jan 2024 17:04:11 +0000 Subject: [PATCH 4/4] Support swiping from first chapter to manga page --- .../presentation/reader/widgets/reader_wrapper.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/src/features/manga_book/presentation/reader/widgets/reader_wrapper.dart b/lib/src/features/manga_book/presentation/reader/widgets/reader_wrapper.dart index 48449da6..bfd0c61c 100644 --- a/lib/src/features/manga_book/presentation/reader/widgets/reader_wrapper.dart +++ b/lib/src/features/manga_book/presentation/reader/widgets/reader_wrapper.dart @@ -423,6 +423,7 @@ class ReaderWrapper extends HookConsumerWidget { toggleVisibility: () => visibility.value = !visibility.value, scrollDirection: scrollDirection, + mangaId: manga.id!, mangaReaderPadding: mangaReaderPadding.value, mangaReaderMagnifierSize: mangaReaderMagnifierSize.value, onNext: onNext, @@ -448,6 +449,7 @@ class ReaderView extends HookWidget { super.key, required this.toggleVisibility, required this.scrollDirection, + required this.mangaId, required this.mangaReaderPadding, required this.mangaReaderMagnifierSize, required this.onNext, @@ -461,6 +463,7 @@ class ReaderView extends HookWidget { final VoidCallback toggleVisibility; final Axis scrollDirection; + final int mangaId; final double mangaReaderPadding; final double mangaReaderMagnifierSize; final VoidCallback onNext; @@ -482,19 +485,19 @@ class ReaderView extends HookWidget { ); nextChapter() => prevNextChapterPair?.first != null ? ReaderRoute( - mangaId: prevNextChapterPair!.first!.mangaId!, + mangaId: mangaId, chapterIndex: prevNextChapterPair!.first!.index!, transVertical: scrollDirection != Axis.vertical, ).pushReplacement(context) : null; prevChapter() => prevNextChapterPair?.second != null ? ReaderRoute( - mangaId: prevNextChapterPair!.second!.mangaId!, + mangaId: mangaId, chapterIndex: prevNextChapterPair!.second!.index!, toPrev: true, transVertical: scrollDirection != Axis.vertical, ).pushReplacement(context) - : null; + : MangaRoute(mangaId: mangaId).pushReplacement(context); return Stack( children: [ GestureDetector(