diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 1dce0b14..be8650b9 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -1,6 +1,6 @@ #!/usr/bin/env bash -printf "\e[33;1m%s\e[0m\n" 'Pre-Commit' +printf "\e[33;1m%s\e[0m\n" 'Started Sorayomi Pre-Commit hook' # Undo the stash of the files pop_stash_files () { @@ -104,4 +104,5 @@ printf '%s\n' "${avar}" # printf "\e[33;1m%s\e[0m\n" 'Finished running Unit Tests' # printf '%s\n' "${avar}" +printf "\e[33;1m%s\e[0m\n" 'Finished running Sorayomi Pre-hook' pop_stash_files \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 875c8e44..54456ac0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -10,8 +10,8 @@ import 'package:package_info_plus/package_info_plus.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'src/features/about/presentation/about/controllers/about_controller.dart'; +import 'src/global_providers/global_providers.dart'; import 'src/sorayomi.dart'; -import 'src/utils/storage/local/shared_preferences_client.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); diff --git a/lib/src/features/about/presentation/about/about_screen.dart b/lib/src/features/about/presentation/about/about_screen.dart index fca0f4b4..187c90a8 100644 --- a/lib/src/features/about/presentation/about/about_screen.dart +++ b/lib/src/features/about/presentation/about/about_screen.dart @@ -130,11 +130,11 @@ class AboutScreen extends HookConsumerWidget { const Divider(), ClipboardListTile( title: context.l10n!.client, - subtitle: packageInfo.appName, + value: packageInfo.appName, ), ClipboardListTile( title: context.l10n!.clientVersion, - subtitle: "v${packageInfo.version}", + value: "v${packageInfo.version}", ), ListTile( title: Text(context.l10n!.whatsNew), @@ -156,20 +156,20 @@ class AboutScreen extends HookConsumerWidget { const Divider(), ClipboardListTile( title: context.l10n!.server, - subtitle: about.name, + value: about.name, ), ClipboardListTile( title: context.l10n!.channel, - subtitle: about.buildType, + value: about.buildType, ), if (serverVer.isNotBlank) ClipboardListTile( title: context.l10n!.serverVersion, - subtitle: serverVer, + value: serverVer, ), ClipboardListTile( title: context.l10n!.buildTime, - subtitle: (about.buildTime).isNull + value: (about.buildTime).isNull ? null : DateTime.fromMillisecondsSinceEpoch( (about.buildTime ?? 0) * 1000, diff --git a/lib/src/features/about/presentation/about/widget/clipboard_list_tile.dart b/lib/src/features/about/presentation/about/widget/clipboard_list_tile.dart index 77ec059f..335ca56a 100644 --- a/lib/src/features/about/presentation/about/widget/clipboard_list_tile.dart +++ b/lib/src/features/about/presentation/about/widget/clipboard_list_tile.dart @@ -15,18 +15,18 @@ class ClipboardListTile extends ConsumerWidget { const ClipboardListTile({ super.key, required this.title, - required this.subtitle, + required this.value, }); final String title; - final String? subtitle; + final String? value; @override Widget build(BuildContext context, WidgetRef ref) { return ListTile( title: Text(title), - subtitle: subtitle.isNotBlank ? Text(subtitle!) : null, - onTap: subtitle.isNotBlank + subtitle: value.isNotBlank ? Text(value!) : null, + onTap: value.isNotBlank ? () { - final msg = "$title: $subtitle"; + final msg = "$title: $value"; Clipboard.setData( ClipboardData(text: msg), ); 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 b5a8e234..89e2f80a 100644 --- a/lib/src/features/browse_center/presentation/browse/browse_screen.dart +++ b/lib/src/features/browse_center/presentation/browse/browse_screen.dart @@ -87,7 +87,7 @@ class BrowseScreen extends HookConsumerWidget { initialText: ref.read(extensionQueryProvider), onChanged: (val) => ref .read(extensionQueryProvider.notifier) - .state = val, + .update(val), onClose: () => showSearch.value = false, ), ), 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 b2bcd9c9..e3fbc141 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 @@ -9,7 +9,8 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../constants/db_keys.dart'; import '../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../utils/mixin/shared_preferences_client_mixin.dart'; +import '../../../../../utils/mixin/state_provider_mixin.dart'; import '../../../../settings/presentation/browse/widgets/show_nsfw_switch/show_nsfw_switch.dart'; import '../../../data/extension_repository/extension_repository.dart'; import '../../../domain/extension/extension_model.dart'; @@ -72,7 +73,7 @@ List extensionFilterLangList(ExtensionFilterLangListRef ref) { @riverpod class ExtensionLanguageFilter extends _$ExtensionLanguageFilter - with SharedPreferenceClient> { + with SharedPreferenceClientMixin> { @override List? build() => initialize( ref, @@ -113,7 +114,7 @@ AsyncValue>> extensionMapFilteredAndQueried( } @riverpod -class ExtensionQuery extends _$ExtensionQuery { +class ExtensionQuery extends _$ExtensionQuery with StateProviderMixin { @override String? build() => null; } 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 fe3c88e9..85bd94e2 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 @@ -6,39 +6,6 @@ part of 'extension_controller.dart'; // RiverpodGenerator // ************************************************************************** -String _$extensionLanguageFilterHash() => - r'0f6c82b2c72cc893e82f869b65ac91cb8e7a14e9'; - -/// See also [ExtensionLanguageFilter]. -@ProviderFor(ExtensionLanguageFilter) -final extensionLanguageFilterProvider = AutoDisposeNotifierProvider< - ExtensionLanguageFilter, List?>.internal( - ExtensionLanguageFilter.new, - name: r'extensionLanguageFilterProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$extensionLanguageFilterHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef _$ExtensionLanguageFilter = AutoDisposeNotifier?>; -String _$extensionQueryHash() => r'fbf22cd295f0065c5d9f0c591f87ff58272b7810'; - -/// See also [ExtensionQuery]. -@ProviderFor(ExtensionQuery) -final extensionQueryProvider = - AutoDisposeNotifierProvider.internal( - ExtensionQuery.new, - name: r'extensionQueryProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$extensionQueryHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef _$ExtensionQuery = AutoDisposeNotifier; String _$extensionHash() => r'7f4a60c97e38a62db718b504d572bd031b5b845d'; /// See also [extension]. @@ -122,4 +89,37 @@ final extensionMapFilteredAndQueriedProvider = typedef ExtensionMapFilteredAndQueriedRef = AutoDisposeProviderRef>>>; +String _$extensionLanguageFilterHash() => + r'88d38cadc3c1d8ac110d8f0e6150bae813c204f4'; + +/// See also [ExtensionLanguageFilter]. +@ProviderFor(ExtensionLanguageFilter) +final extensionLanguageFilterProvider = AutoDisposeNotifierProvider< + ExtensionLanguageFilter, List?>.internal( + ExtensionLanguageFilter.new, + name: r'extensionLanguageFilterProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$extensionLanguageFilterHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$ExtensionLanguageFilter = AutoDisposeNotifier?>; +String _$extensionQueryHash() => r'342455d95d1f785523fc35799015958a9be4c3e4'; + +/// See also [ExtensionQuery]. +@ProviderFor(ExtensionQuery) +final extensionQueryProvider = + AutoDisposeNotifierProvider.internal( + ExtensionQuery.new, + name: r'extensionQueryProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$extensionQueryHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$ExtensionQuery = AutoDisposeNotifier; // ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions 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 4f9a9081..34ce9a53 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 @@ -9,7 +9,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../constants/db_keys.dart'; import '../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../data/source_repository/source_repository.dart'; import '../../../domain/source/source_model.dart'; @@ -67,7 +67,7 @@ AsyncValue>?> sourceMapFiltered( @riverpod class SourceLanguageFilter extends _$SourceLanguageFilter - with SharedPreferenceClient> { + with SharedPreferenceClientMixin> { @override List? build() => initialize( ref, @@ -78,7 +78,7 @@ class SourceLanguageFilter extends _$SourceLanguageFilter @riverpod class SourceLastUsed extends _$SourceLastUsed - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override String? build() => initialize( ref, 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 029346e5..1d73a18d 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 @@ -6,39 +6,6 @@ part of 'source_controller.dart'; // RiverpodGenerator // ************************************************************************** -String _$sourceLanguageFilterHash() => - r'85534834566ef4108261b5fd629aa9129a6937b7'; - -/// See also [SourceLanguageFilter]. -@ProviderFor(SourceLanguageFilter) -final sourceLanguageFilterProvider = - AutoDisposeNotifierProvider?>.internal( - SourceLanguageFilter.new, - name: r'sourceLanguageFilterProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$sourceLanguageFilterHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef _$SourceLanguageFilter = AutoDisposeNotifier?>; -String _$sourceLastUsedHash() => r'b8f039f84d5b077393b2646530f97db5085f2e05'; - -/// See also [SourceLastUsed]. -@ProviderFor(SourceLastUsed) -final sourceLastUsedProvider = - AutoDisposeNotifierProvider.internal( - SourceLastUsed.new, - name: r'sourceLastUsedProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$sourceLastUsedHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef _$SourceLastUsed = AutoDisposeNotifier; String _$sourceListHash() => r'80d37bd602ce3e229ac64c39743cee84d94fd1f9'; /// See also [sourceList]. @@ -102,4 +69,37 @@ final sourceMapFilteredProvider = typedef SourceMapFilteredRef = AutoDisposeProviderRef>?>>; +String _$sourceLanguageFilterHash() => + r'a5a8701a5d14b4c784744131113eb56cf1979dbc'; + +/// See also [SourceLanguageFilter]. +@ProviderFor(SourceLanguageFilter) +final sourceLanguageFilterProvider = + AutoDisposeNotifierProvider?>.internal( + SourceLanguageFilter.new, + name: r'sourceLanguageFilterProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$sourceLanguageFilterHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$SourceLanguageFilter = AutoDisposeNotifier?>; +String _$sourceLastUsedHash() => r'afe764b063f80d11ed033dd6386ad8133b2c0fcd'; + +/// See also [SourceLastUsed]. +@ProviderFor(SourceLastUsed) +final sourceLastUsedProvider = + AutoDisposeNotifierProvider.internal( + SourceLastUsed.new, + name: r'sourceLastUsedProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$sourceLastUsedHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$SourceLastUsed = AutoDisposeNotifier; // ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions 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 f7260e5c..fd795ffb 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 @@ -11,7 +11,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../constants/db_keys.dart'; import '../../../../../constants/enum.dart'; import '../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../data/source_repository/source_repository.dart'; import '../../../domain/filter/filter_model.dart'; import '../../../domain/source/source_model.dart'; @@ -75,7 +75,7 @@ class SourceMangaFilterList extends _$SourceMangaFilterList { @riverpod class SourceDisplayMode extends _$SourceDisplayMode - with SharedPreferenceEnumClient { + with SharedPreferenceEnumClientMixin { @override DisplayMode? build() => initialize( ref, 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 e4701bf9..31b0c87f 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 @@ -6,8 +6,7 @@ part of 'source_manga_controller.dart'; // RiverpodGenerator // ************************************************************************** -String _$sourceMangaFilterListHash() => - r'531b3942c3a4430a0439d920a49f5d9a1b0cf8fe'; +String _$sourceHash() => r'02ebbe306c0a96174aa221c8e90e9f2c96f398ee'; /// Copied from Dart SDK class _SystemHash { @@ -30,131 +29,6 @@ class _SystemHash { } } -abstract class _$SourceMangaFilterList - extends BuildlessAutoDisposeNotifier?>> { - late final String sourceId; - late final List? filter; - - AsyncValue?> build( - String sourceId, { - List? filter, - }); -} - -/// See also [SourceMangaFilterList]. -@ProviderFor(SourceMangaFilterList) -const sourceMangaFilterListProvider = SourceMangaFilterListFamily(); - -/// See also [SourceMangaFilterList]. -class SourceMangaFilterListFamily extends Family?>> { - /// See also [SourceMangaFilterList]. - const SourceMangaFilterListFamily(); - - /// See also [SourceMangaFilterList]. - SourceMangaFilterListProvider call( - String sourceId, { - List? filter, - }) { - return SourceMangaFilterListProvider( - sourceId, - filter: filter, - ); - } - - @override - SourceMangaFilterListProvider getProviderOverride( - covariant SourceMangaFilterListProvider provider, - ) { - return call( - provider.sourceId, - filter: provider.filter, - ); - } - - static const Iterable? _dependencies = null; - - @override - Iterable? get dependencies => _dependencies; - - static const Iterable? _allTransitiveDependencies = null; - - @override - Iterable? get allTransitiveDependencies => - _allTransitiveDependencies; - - @override - String? get name => r'sourceMangaFilterListProvider'; -} - -/// See also [SourceMangaFilterList]. -class SourceMangaFilterListProvider extends AutoDisposeNotifierProviderImpl< - SourceMangaFilterList, AsyncValue?>> { - /// See also [SourceMangaFilterList]. - SourceMangaFilterListProvider( - this.sourceId, { - this.filter, - }) : super.internal( - () => SourceMangaFilterList() - ..sourceId = sourceId - ..filter = filter, - from: sourceMangaFilterListProvider, - name: r'sourceMangaFilterListProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') - ? null - : _$sourceMangaFilterListHash, - dependencies: SourceMangaFilterListFamily._dependencies, - allTransitiveDependencies: - SourceMangaFilterListFamily._allTransitiveDependencies, - ); - - final String sourceId; - final List? filter; - - @override - bool operator ==(Object other) { - return other is SourceMangaFilterListProvider && - other.sourceId == sourceId && - other.filter == filter; - } - - @override - int get hashCode { - var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, sourceId.hashCode); - hash = _SystemHash.combine(hash, filter.hashCode); - - return _SystemHash.finish(hash); - } - - @override - AsyncValue?> runNotifierBuild( - covariant SourceMangaFilterList notifier, - ) { - return notifier.build( - sourceId, - filter: filter, - ); - } -} - -String _$sourceDisplayModeHash() => r'6c61e478095507fe31213a1d671f0f6e20229131'; - -/// See also [SourceDisplayMode]. -@ProviderFor(SourceDisplayMode) -final sourceDisplayModeProvider = - AutoDisposeNotifierProvider.internal( - SourceDisplayMode.new, - name: r'sourceDisplayModeProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$sourceDisplayModeHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef _$SourceDisplayMode = AutoDisposeNotifier; -String _$sourceHash() => r'02ebbe306c0a96174aa221c8e90e9f2c96f398ee'; typedef SourceRef = AutoDisposeFutureProviderRef; /// See also [source]. @@ -321,4 +195,132 @@ class BaseSourceMangaFilterListProvider return _SystemHash.finish(hash); } } + +String _$sourceMangaFilterListHash() => + r'531b3942c3a4430a0439d920a49f5d9a1b0cf8fe'; + +abstract class _$SourceMangaFilterList + extends BuildlessAutoDisposeNotifier?>> { + late final String sourceId; + late final List? filter; + + AsyncValue?> build( + String sourceId, { + List? filter, + }); +} + +/// See also [SourceMangaFilterList]. +@ProviderFor(SourceMangaFilterList) +const sourceMangaFilterListProvider = SourceMangaFilterListFamily(); + +/// See also [SourceMangaFilterList]. +class SourceMangaFilterListFamily extends Family?>> { + /// See also [SourceMangaFilterList]. + const SourceMangaFilterListFamily(); + + /// See also [SourceMangaFilterList]. + SourceMangaFilterListProvider call( + String sourceId, { + List? filter, + }) { + return SourceMangaFilterListProvider( + sourceId, + filter: filter, + ); + } + + @override + SourceMangaFilterListProvider getProviderOverride( + covariant SourceMangaFilterListProvider provider, + ) { + return call( + provider.sourceId, + filter: provider.filter, + ); + } + + static const Iterable? _dependencies = null; + + @override + Iterable? get dependencies => _dependencies; + + static const Iterable? _allTransitiveDependencies = null; + + @override + Iterable? get allTransitiveDependencies => + _allTransitiveDependencies; + + @override + String? get name => r'sourceMangaFilterListProvider'; +} + +/// See also [SourceMangaFilterList]. +class SourceMangaFilterListProvider extends AutoDisposeNotifierProviderImpl< + SourceMangaFilterList, AsyncValue?>> { + /// See also [SourceMangaFilterList]. + SourceMangaFilterListProvider( + this.sourceId, { + this.filter, + }) : super.internal( + () => SourceMangaFilterList() + ..sourceId = sourceId + ..filter = filter, + from: sourceMangaFilterListProvider, + name: r'sourceMangaFilterListProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') + ? null + : _$sourceMangaFilterListHash, + dependencies: SourceMangaFilterListFamily._dependencies, + allTransitiveDependencies: + SourceMangaFilterListFamily._allTransitiveDependencies, + ); + + final String sourceId; + final List? filter; + + @override + bool operator ==(Object other) { + return other is SourceMangaFilterListProvider && + other.sourceId == sourceId && + other.filter == filter; + } + + @override + int get hashCode { + var hash = _SystemHash.combine(0, runtimeType.hashCode); + hash = _SystemHash.combine(hash, sourceId.hashCode); + hash = _SystemHash.combine(hash, filter.hashCode); + + return _SystemHash.finish(hash); + } + + @override + AsyncValue?> runNotifierBuild( + covariant SourceMangaFilterList notifier, + ) { + return notifier.build( + sourceId, + filter: filter, + ); + } +} + +String _$sourceDisplayModeHash() => r'363b2f9b0683cd1abea761e244ae9362260f4c5e'; + +/// See also [SourceDisplayMode]. +@ProviderFor(SourceDisplayMode) +final sourceDisplayModeProvider = + AutoDisposeNotifierProvider.internal( + SourceDisplayMode.new, + name: r'sourceDisplayModeProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$sourceDisplayModeHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$SourceDisplayMode = AutoDisposeNotifier; // ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions diff --git a/lib/src/features/library/presentation/category/edit_category_screen.dart b/lib/src/features/library/presentation/category/edit_category_screen.dart index 9be253d7..876eb603 100644 --- a/lib/src/features/library/presentation/category/edit_category_screen.dart +++ b/lib/src/features/library/presentation/category/edit_category_screen.dart @@ -53,10 +53,10 @@ class EditCategoryScreen extends HookConsumerWidget { child: ListView.builder( itemCount: data!.length, itemBuilder: (context, index) { - if (index == 0) { + final category = data[index]; + if (category.id == 0) { return const SizedBox.shrink(); } else { - final category = data[index]; return CategoryTile( key: ValueKey(category.id), minOrderIndex: 1, diff --git a/lib/src/features/library/presentation/category/widgets/category_create_fab.dart b/lib/src/features/library/presentation/category/widgets/category_create_fab.dart index d7a83772..d97af7a3 100644 --- a/lib/src/features/library/presentation/category/widgets/category_create_fab.dart +++ b/lib/src/features/library/presentation/category/widgets/category_create_fab.dart @@ -43,7 +43,7 @@ class CategoryCreateFab extends HookConsumerWidget { isExtended: context.isTablet && !isLoading.value, label: Text(context.l10n!.addCategory), icon: isLoading.value - ? MiniCircularProgressIndicator(color: context.theme.iconTheme.color) + ? MiniCircularProgressIndicator(color: context.iconColor) : const Icon(Icons.add_rounded), ); } 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 b31cb67f..0ac60dba 100644 --- a/lib/src/features/library/presentation/library/controller/library_controller.dart +++ b/lib/src/features/library/presentation/library/controller/library_controller.dart @@ -10,7 +10,8 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../constants/db_keys.dart'; import '../../../../../constants/enum.dart'; import '../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../utils/mixin/shared_preferences_client_mixin.dart'; +import '../../../../../utils/mixin/state_provider_mixin.dart'; import '../../../../manga_book/domain/manga/manga_model.dart'; import '../../../data/category/category_repository.dart'; @@ -105,14 +106,14 @@ class CategoryMangaListWithQueryAndFilter } @riverpod -class LibraryQuery extends _$LibraryQuery { +class LibraryQuery extends _$LibraryQuery with StateProviderMixin { @override String? build() => null; } @riverpod class LibraryMangaFilterDownloaded extends _$LibraryMangaFilterDownloaded - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, @@ -123,7 +124,7 @@ class LibraryMangaFilterDownloaded extends _$LibraryMangaFilterDownloaded @riverpod class LibraryMangaFilterUnread extends _$LibraryMangaFilterUnread - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, @@ -134,7 +135,7 @@ class LibraryMangaFilterUnread extends _$LibraryMangaFilterUnread @riverpod class LibraryMangaFilterCompleted extends _$LibraryMangaFilterCompleted - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, @@ -145,7 +146,7 @@ class LibraryMangaFilterCompleted extends _$LibraryMangaFilterCompleted @riverpod class LibraryMangaSort extends _$LibraryMangaSort - with SharedPreferenceEnumClient { + with SharedPreferenceEnumClientMixin { @override MangaSort? build() => initialize( ref, @@ -157,7 +158,7 @@ class LibraryMangaSort extends _$LibraryMangaSort @riverpod class LibraryMangaSortDirection extends _$LibraryMangaSortDirection - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, @@ -168,7 +169,7 @@ class LibraryMangaSortDirection extends _$LibraryMangaSortDirection @riverpod class LibraryDisplayMode extends _$LibraryDisplayMode - with SharedPreferenceEnumClient { + with SharedPreferenceEnumClientMixin { @override DisplayMode? build() => initialize( ref, 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 9392d555..4fd201aa 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 @@ -6,8 +6,7 @@ part of 'library_controller.dart'; // RiverpodGenerator // ************************************************************************** -String _$categoryMangaListWithQueryAndFilterHash() => - r'c7c4c6d4717fa47e57d0ada372d733ab30caa986'; +String _$categoryMangaListHash() => r'9da0d48991ecde48dd144171ef5091fd2f597ef7'; /// Copied from Dart SDK class _SystemHash { @@ -30,6 +29,91 @@ class _SystemHash { } } +typedef CategoryMangaListRef = AutoDisposeFutureProviderRef?>; + +/// See also [categoryMangaList]. +@ProviderFor(categoryMangaList) +const categoryMangaListProvider = CategoryMangaListFamily(); + +/// See also [categoryMangaList]. +class CategoryMangaListFamily extends Family?>> { + /// See also [categoryMangaList]. + const CategoryMangaListFamily(); + + /// See also [categoryMangaList]. + CategoryMangaListProvider call( + int categoryId, + ) { + return CategoryMangaListProvider( + categoryId, + ); + } + + @override + CategoryMangaListProvider getProviderOverride( + covariant CategoryMangaListProvider provider, + ) { + return call( + provider.categoryId, + ); + } + + static const Iterable? _dependencies = null; + + @override + Iterable? get dependencies => _dependencies; + + static const Iterable? _allTransitiveDependencies = null; + + @override + Iterable? get allTransitiveDependencies => + _allTransitiveDependencies; + + @override + String? get name => r'categoryMangaListProvider'; +} + +/// See also [categoryMangaList]. +class CategoryMangaListProvider + extends AutoDisposeFutureProvider?> { + /// See also [categoryMangaList]. + CategoryMangaListProvider( + this.categoryId, + ) : super.internal( + (ref) => categoryMangaList( + ref, + categoryId, + ), + from: categoryMangaListProvider, + name: r'categoryMangaListProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') + ? null + : _$categoryMangaListHash, + dependencies: CategoryMangaListFamily._dependencies, + allTransitiveDependencies: + CategoryMangaListFamily._allTransitiveDependencies, + ); + + final int categoryId; + + @override + bool operator ==(Object other) { + return other is CategoryMangaListProvider && other.categoryId == categoryId; + } + + @override + int get hashCode { + var hash = _SystemHash.combine(0, runtimeType.hashCode); + hash = _SystemHash.combine(hash, categoryId.hashCode); + + return _SystemHash.finish(hash); + } +} + +String _$categoryMangaListWithQueryAndFilterHash() => + r'c7c4c6d4717fa47e57d0ada372d733ab30caa986'; + abstract class _$CategoryMangaListWithQueryAndFilter extends BuildlessAutoDisposeNotifier?>> { late final int categoryId; @@ -129,7 +213,7 @@ class CategoryMangaListWithQueryAndFilterProvider } } -String _$libraryQueryHash() => r'84087050ef9f75c04375c648a971b67e3b0b28ba'; +String _$libraryQueryHash() => r'e9f6238da1c3475448f4839b567e65833e7e151e'; /// See also [LibraryQuery]. @ProviderFor(LibraryQuery) @@ -145,7 +229,7 @@ final libraryQueryProvider = typedef _$LibraryQuery = AutoDisposeNotifier; String _$libraryMangaFilterDownloadedHash() => - r'173f948640462772ba13cd4efb03b750a4b50f50'; + r'4b5c2ca8b1f0321d704f8676676f62eb3eb21888'; /// See also [LibraryMangaFilterDownloaded]. @ProviderFor(LibraryMangaFilterDownloaded) @@ -162,7 +246,7 @@ final libraryMangaFilterDownloadedProvider = typedef _$LibraryMangaFilterDownloaded = AutoDisposeNotifier; String _$libraryMangaFilterUnreadHash() => - r'6c168a40a9e5599d8f2cb02915ff1546b5f3c531'; + r'26994046eb38ff69b5ea7efc5b1878e59308eddb'; /// See also [LibraryMangaFilterUnread]. @ProviderFor(LibraryMangaFilterUnread) @@ -179,7 +263,7 @@ final libraryMangaFilterUnreadProvider = typedef _$LibraryMangaFilterUnread = AutoDisposeNotifier; String _$libraryMangaFilterCompletedHash() => - r'1d959032909f57d964b60cf6f86efd4e2b4960e9'; + r'286c538b222f4212f1c1b1d25c6205db9e1ef092'; /// See also [LibraryMangaFilterCompleted]. @ProviderFor(LibraryMangaFilterCompleted) @@ -195,7 +279,7 @@ final libraryMangaFilterCompletedProvider = ); typedef _$LibraryMangaFilterCompleted = AutoDisposeNotifier; -String _$libraryMangaSortHash() => r'88a025259f3957cb221cd1237c6e118d546eec64'; +String _$libraryMangaSortHash() => r'0442be97843a0ef97ead6592820af33162ecc11e'; /// See also [LibraryMangaSort]. @ProviderFor(LibraryMangaSort) @@ -212,7 +296,7 @@ final libraryMangaSortProvider = typedef _$LibraryMangaSort = AutoDisposeNotifier; String _$libraryMangaSortDirectionHash() => - r'e75ba9131a09c697f6bc6488347051de72249cb2'; + r'70819ff0294ca866e94d229cce3bf75d7ed614a0'; /// See also [LibraryMangaSortDirection]. @ProviderFor(LibraryMangaSortDirection) @@ -229,7 +313,7 @@ final libraryMangaSortDirectionProvider = typedef _$LibraryMangaSortDirection = AutoDisposeNotifier; String _$libraryDisplayModeHash() => - r'c7adbf4cb2db2c67b7d10e75bb14404e05551ab4'; + r'59e6744684315ec99998bb19f91c6c85c6659161'; /// See also [LibraryDisplayMode]. @ProviderFor(LibraryDisplayMode) @@ -245,86 +329,4 @@ final libraryDisplayModeProvider = ); typedef _$LibraryDisplayMode = AutoDisposeNotifier; -String _$categoryMangaListHash() => r'9da0d48991ecde48dd144171ef5091fd2f597ef7'; -typedef CategoryMangaListRef = AutoDisposeFutureProviderRef?>; - -/// See also [categoryMangaList]. -@ProviderFor(categoryMangaList) -const categoryMangaListProvider = CategoryMangaListFamily(); - -/// See also [categoryMangaList]. -class CategoryMangaListFamily extends Family?>> { - /// See also [categoryMangaList]. - const CategoryMangaListFamily(); - - /// See also [categoryMangaList]. - CategoryMangaListProvider call( - int categoryId, - ) { - return CategoryMangaListProvider( - categoryId, - ); - } - - @override - CategoryMangaListProvider getProviderOverride( - covariant CategoryMangaListProvider provider, - ) { - return call( - provider.categoryId, - ); - } - - static const Iterable? _dependencies = null; - - @override - Iterable? get dependencies => _dependencies; - - static const Iterable? _allTransitiveDependencies = null; - - @override - Iterable? get allTransitiveDependencies => - _allTransitiveDependencies; - - @override - String? get name => r'categoryMangaListProvider'; -} - -/// See also [categoryMangaList]. -class CategoryMangaListProvider - extends AutoDisposeFutureProvider?> { - /// See also [categoryMangaList]. - CategoryMangaListProvider( - this.categoryId, - ) : super.internal( - (ref) => categoryMangaList( - ref, - categoryId, - ), - from: categoryMangaListProvider, - name: r'categoryMangaListProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') - ? null - : _$categoryMangaListHash, - dependencies: CategoryMangaListFamily._dependencies, - allTransitiveDependencies: - CategoryMangaListFamily._allTransitiveDependencies, - ); - - final int categoryId; - - @override - bool operator ==(Object other) { - return other is CategoryMangaListProvider && other.categoryId == categoryId; - } - - @override - int get hashCode { - var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, categoryId.hashCode); - - return _SystemHash.finish(hash); - } -} // ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions diff --git a/lib/src/features/library/presentation/library/library_screen.dart b/lib/src/features/library/presentation/library/library_screen.dart index d16946db..cf02705e 100644 --- a/lib/src/features/library/presentation/library/library_screen.dart +++ b/lib/src/features/library/presentation/library/library_screen.dart @@ -71,7 +71,7 @@ class LibraryScreen extends HookConsumerWidget { initialText: ref.read(libraryQueryProvider), onChanged: (val) => ref .read(libraryQueryProvider.notifier) - .state = val, + .update(val), onClose: () => showSearch.value = false, ), ), diff --git a/lib/src/features/manga_book/data/downloads/downloads_repository.dart b/lib/src/features/manga_book/data/downloads/downloads_repository.dart index e65d931c..fe07fdc3 100644 --- a/lib/src/features/manga_book/data/downloads/downloads_repository.dart +++ b/lib/src/features/manga_book/data/downloads/downloads_repository.dart @@ -8,7 +8,6 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'package:web_socket_channel/web_socket_channel.dart'; @@ -67,12 +66,15 @@ class DownloadsRepository { DownloadsRepository downloadsRepository(DownloadsRepositoryRef ref) => DownloadsRepository(ref.watch(dioClientKeyProvider)); -//TODO SUPPORT FOR RIVERPOD STREAM GENERATOR https://github.com/rrousselGit/riverpod/issues/1663 -final downloadsSocketProvider = StreamProvider.autoDispose((ref) { - final pair = ref.watch(downloadsRepositoryProvider).socketDownloads(); - ref.onDispose(pair.second); - return pair.first; -}); +@riverpod +class DownloadsSocket extends _$DownloadsSocket { + @override + Stream build() { + final pair = ref.watch(downloadsRepositoryProvider).socketDownloads(); + ref.onDispose(pair.second); + return pair.first; + } +} @riverpod Map downloadsMap(DownloadsMapRef ref) { diff --git a/lib/src/features/manga_book/data/downloads/downloads_repository.g.dart b/lib/src/features/manga_book/data/downloads/downloads_repository.g.dart index c33ce68f..27eebd43 100644 --- a/lib/src/features/manga_book/data/downloads/downloads_repository.g.dart +++ b/lib/src/features/manga_book/data/downloads/downloads_repository.g.dart @@ -141,4 +141,21 @@ class DownloadsFromIdProvider extends AutoDisposeProvider { return _SystemHash.finish(hash); } } + +String _$downloadsSocketHash() => r'060ac98c0d410b18eb986a5a01c44a2f55c4a4b6'; + +/// See also [DownloadsSocket]. +@ProviderFor(DownloadsSocket) +final downloadsSocketProvider = + AutoDisposeStreamNotifierProvider.internal( + DownloadsSocket.new, + name: r'downloadsSocketProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$downloadsSocketHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$DownloadsSocket = AutoDisposeStreamNotifier; // ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions diff --git a/lib/src/features/manga_book/data/updates/updates_repository.dart b/lib/src/features/manga_book/data/updates/updates_repository.dart index 6a4d69ca..0de7394d 100644 --- a/lib/src/features/manga_book/data/updates/updates_repository.dart +++ b/lib/src/features/manga_book/data/updates/updates_repository.dart @@ -8,7 +8,6 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/foundation.dart'; -import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'package:web_socket_channel/web_socket_channel.dart'; @@ -97,9 +96,12 @@ Future updateSummary(UpdateSummaryRef ref) async { return result; } -//TODO SUPPORT FOR RIVERPOD STREAM GENERATOR https://github.com/rrousselGit/riverpod/issues/1663 -final updatesSocketProvider = StreamProvider.autoDispose((ref) { - final pair = ref.watch(updatesRepositoryProvider).socketUpdates(); - ref.onDispose(pair.second); - return pair.first; -}); +@riverpod +class UpdatesSocket extends _$UpdatesSocket { + @override + Stream build() { + final pair = ref.watch(updatesRepositoryProvider).socketUpdates(); + ref.onDispose(pair.second); + return pair.first; + } +} diff --git a/lib/src/features/manga_book/data/updates/updates_repository.g.dart b/lib/src/features/manga_book/data/updates/updates_repository.g.dart index da44fc6e..e3ad868c 100644 --- a/lib/src/features/manga_book/data/updates/updates_repository.g.dart +++ b/lib/src/features/manga_book/data/updates/updates_repository.g.dart @@ -37,4 +37,20 @@ final updateSummaryProvider = AutoDisposeFutureProvider.internal( ); typedef UpdateSummaryRef = AutoDisposeFutureProviderRef; +String _$updatesSocketHash() => r'cbc582dbaabc756f7d19ecf268e370d616fd8221'; + +/// See also [UpdatesSocket]. +@ProviderFor(UpdatesSocket) +final updatesSocketProvider = + AutoDisposeStreamNotifierProvider.internal( + UpdatesSocket.new, + name: r'updatesSocketProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$updatesSocketHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef _$UpdatesSocket = AutoDisposeStreamNotifier; // ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions 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 c8cd8c0f..fb75940e 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 @@ -11,7 +11,7 @@ import '../../../../../constants/db_keys.dart'; import '../../../../../constants/enum.dart'; import '../../../../../utils/classes/pair/pair_model.dart'; import '../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../library/domain/category/category_model.dart'; import '../../../data/manga_book_repository.dart'; import '../../../domain/chapter/chapter_model.dart'; @@ -189,7 +189,7 @@ Pair? getPreviousAndNextChapters( @riverpod class MangaChapterSort extends _$MangaChapterSort - with SharedPreferenceEnumClient { + with SharedPreferenceEnumClientMixin { @override ChapterSort? build() => initialize( ref, @@ -201,7 +201,7 @@ class MangaChapterSort extends _$MangaChapterSort @riverpod class MangaChapterSortDirection extends _$MangaChapterSortDirection - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, @@ -212,7 +212,7 @@ class MangaChapterSortDirection extends _$MangaChapterSortDirection @riverpod class MangaChapterFilterDownloaded extends _$MangaChapterFilterDownloaded - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, @@ -223,7 +223,7 @@ class MangaChapterFilterDownloaded extends _$MangaChapterFilterDownloaded @riverpod class MangaChapterFilterUnread extends _$MangaChapterFilterUnread - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, @@ -234,7 +234,7 @@ class MangaChapterFilterUnread extends _$MangaChapterFilterUnread @riverpod class MangaChapterFilterBookmarked extends _$MangaChapterFilterBookmarked - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, 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 e9e63b5e..5b3bb09e 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 @@ -6,7 +6,8 @@ part of 'manga_details_controller.dart'; // RiverpodGenerator // ************************************************************************** -String _$mangaWithIdHash() => r'34066d958171e4089e173a5124751043e0aad8ec'; +String _$mangaChapterListWithFilterHash() => + r'c38f5462d03c80c543f83d2f6910fd7ecc0e1436'; /// Copied from Dart SDK class _SystemHash { @@ -29,35 +30,31 @@ class _SystemHash { } } -abstract class _$MangaWithId extends BuildlessAutoDisposeAsyncNotifier { - late final String mangaId; - - Future build({ - required String mangaId, - }); -} +typedef MangaChapterListWithFilterRef + = AutoDisposeProviderRef?>>; -/// See also [MangaWithId]. -@ProviderFor(MangaWithId) -const mangaWithIdProvider = MangaWithIdFamily(); +/// See also [mangaChapterListWithFilter]. +@ProviderFor(mangaChapterListWithFilter) +const mangaChapterListWithFilterProvider = MangaChapterListWithFilterFamily(); -/// See also [MangaWithId]. -class MangaWithIdFamily extends Family> { - /// See also [MangaWithId]. - const MangaWithIdFamily(); +/// See also [mangaChapterListWithFilter]. +class MangaChapterListWithFilterFamily + extends Family?>> { + /// See also [mangaChapterListWithFilter]. + const MangaChapterListWithFilterFamily(); - /// See also [MangaWithId]. - MangaWithIdProvider call({ + /// See also [mangaChapterListWithFilter]. + MangaChapterListWithFilterProvider call({ required String mangaId, }) { - return MangaWithIdProvider( + return MangaChapterListWithFilterProvider( mangaId: mangaId, ); } @override - MangaWithIdProvider getProviderOverride( - covariant MangaWithIdProvider provider, + MangaChapterListWithFilterProvider getProviderOverride( + covariant MangaChapterListWithFilterProvider provider, ) { return call( mangaId: provider.mangaId, @@ -76,33 +73,37 @@ class MangaWithIdFamily extends Family> { _allTransitiveDependencies; @override - String? get name => r'mangaWithIdProvider'; + String? get name => r'mangaChapterListWithFilterProvider'; } -/// See also [MangaWithId]. -class MangaWithIdProvider - extends AutoDisposeAsyncNotifierProviderImpl { - /// See also [MangaWithId]. - MangaWithIdProvider({ +/// See also [mangaChapterListWithFilter]. +class MangaChapterListWithFilterProvider + extends AutoDisposeProvider?>> { + /// See also [mangaChapterListWithFilter]. + MangaChapterListWithFilterProvider({ required this.mangaId, }) : super.internal( - () => MangaWithId()..mangaId = mangaId, - from: mangaWithIdProvider, - name: r'mangaWithIdProvider', + (ref) => mangaChapterListWithFilter( + ref, + mangaId: mangaId, + ), + from: mangaChapterListWithFilterProvider, + name: r'mangaChapterListWithFilterProvider', debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null - : _$mangaWithIdHash, - dependencies: MangaWithIdFamily._dependencies, + : _$mangaChapterListWithFilterHash, + dependencies: MangaChapterListWithFilterFamily._dependencies, allTransitiveDependencies: - MangaWithIdFamily._allTransitiveDependencies, + MangaChapterListWithFilterFamily._allTransitiveDependencies, ); final String mangaId; @override bool operator ==(Object other) { - return other is MangaWithIdProvider && other.mangaId == mangaId; + return other is MangaChapterListWithFilterProvider && + other.mangaId == mangaId; } @override @@ -112,52 +113,127 @@ class MangaWithIdProvider return _SystemHash.finish(hash); } +} + +String _$firstUnreadInFilteredChapterListHash() => + r'60d7452267e74bafdc290890223cc3a641e06305'; +typedef FirstUnreadInFilteredChapterListRef = AutoDisposeProviderRef; + +/// See also [firstUnreadInFilteredChapterList]. +@ProviderFor(firstUnreadInFilteredChapterList) +const firstUnreadInFilteredChapterListProvider = + FirstUnreadInFilteredChapterListFamily(); + +/// See also [firstUnreadInFilteredChapterList]. +class FirstUnreadInFilteredChapterListFamily extends Family { + /// See also [firstUnreadInFilteredChapterList]. + const FirstUnreadInFilteredChapterListFamily(); + + /// See also [firstUnreadInFilteredChapterList]. + FirstUnreadInFilteredChapterListProvider call({ + required String mangaId, + }) { + return FirstUnreadInFilteredChapterListProvider( + mangaId: mangaId, + ); + } @override - Future runNotifierBuild( - covariant MangaWithId notifier, + FirstUnreadInFilteredChapterListProvider getProviderOverride( + covariant FirstUnreadInFilteredChapterListProvider provider, ) { - return notifier.build( - mangaId: mangaId, + return call( + mangaId: provider.mangaId, ); } + + static const Iterable? _dependencies = null; + + @override + Iterable? get dependencies => _dependencies; + + static const Iterable? _allTransitiveDependencies = null; + + @override + Iterable? get allTransitiveDependencies => + _allTransitiveDependencies; + + @override + String? get name => r'firstUnreadInFilteredChapterListProvider'; } -String _$mangaChapterListHash() => r'e29cf9a87f5f09029b63f16b0074a4f7466d8b92'; +/// See also [firstUnreadInFilteredChapterList]. +class FirstUnreadInFilteredChapterListProvider + extends AutoDisposeProvider { + /// See also [firstUnreadInFilteredChapterList]. + FirstUnreadInFilteredChapterListProvider({ + required this.mangaId, + }) : super.internal( + (ref) => firstUnreadInFilteredChapterList( + ref, + mangaId: mangaId, + ), + from: firstUnreadInFilteredChapterListProvider, + name: r'firstUnreadInFilteredChapterListProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') + ? null + : _$firstUnreadInFilteredChapterListHash, + dependencies: FirstUnreadInFilteredChapterListFamily._dependencies, + allTransitiveDependencies: + FirstUnreadInFilteredChapterListFamily._allTransitiveDependencies, + ); -abstract class _$MangaChapterList - extends BuildlessAutoDisposeAsyncNotifier?> { - late final String mangaId; + final String mangaId; - Future?> build({ - required String mangaId, - }); + @override + bool operator ==(Object other) { + return other is FirstUnreadInFilteredChapterListProvider && + other.mangaId == mangaId; + } + + @override + int get hashCode { + var hash = _SystemHash.combine(0, runtimeType.hashCode); + hash = _SystemHash.combine(hash, mangaId.hashCode); + + return _SystemHash.finish(hash); + } } -/// See also [MangaChapterList]. -@ProviderFor(MangaChapterList) -const mangaChapterListProvider = MangaChapterListFamily(); +String _$getPreviousAndNextChaptersHash() => + r'c96d69daa0b66402a78052eb11af57f223c3e465'; +typedef GetPreviousAndNextChaptersRef + = AutoDisposeProviderRef?>; -/// See also [MangaChapterList]. -class MangaChapterListFamily extends Family?>> { - /// See also [MangaChapterList]. - const MangaChapterListFamily(); +/// See also [getPreviousAndNextChapters]. +@ProviderFor(getPreviousAndNextChapters) +const getPreviousAndNextChaptersProvider = GetPreviousAndNextChaptersFamily(); - /// See also [MangaChapterList]. - MangaChapterListProvider call({ +/// See also [getPreviousAndNextChapters]. +class GetPreviousAndNextChaptersFamily + extends Family?> { + /// See also [getPreviousAndNextChapters]. + const GetPreviousAndNextChaptersFamily(); + + /// See also [getPreviousAndNextChapters]. + GetPreviousAndNextChaptersProvider call({ required String mangaId, + required String chapterIndex, }) { - return MangaChapterListProvider( + return GetPreviousAndNextChaptersProvider( mangaId: mangaId, + chapterIndex: chapterIndex, ); } @override - MangaChapterListProvider getProviderOverride( - covariant MangaChapterListProvider provider, + GetPreviousAndNextChaptersProvider getProviderOverride( + covariant GetPreviousAndNextChaptersProvider provider, ) { return call( mangaId: provider.mangaId, + chapterIndex: provider.chapterIndex, ); } @@ -173,173 +249,87 @@ class MangaChapterListFamily extends Family?>> { _allTransitiveDependencies; @override - String? get name => r'mangaChapterListProvider'; + String? get name => r'getPreviousAndNextChaptersProvider'; } -/// See also [MangaChapterList]. -class MangaChapterListProvider extends AutoDisposeAsyncNotifierProviderImpl< - MangaChapterList, List?> { - /// See also [MangaChapterList]. - MangaChapterListProvider({ +/// See also [getPreviousAndNextChapters]. +class GetPreviousAndNextChaptersProvider + extends AutoDisposeProvider?> { + /// See also [getPreviousAndNextChapters]. + GetPreviousAndNextChaptersProvider({ required this.mangaId, + required this.chapterIndex, }) : super.internal( - () => MangaChapterList()..mangaId = mangaId, - from: mangaChapterListProvider, - name: r'mangaChapterListProvider', + (ref) => getPreviousAndNextChapters( + ref, + mangaId: mangaId, + chapterIndex: chapterIndex, + ), + from: getPreviousAndNextChaptersProvider, + name: r'getPreviousAndNextChaptersProvider', debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null - : _$mangaChapterListHash, - dependencies: MangaChapterListFamily._dependencies, + : _$getPreviousAndNextChaptersHash, + dependencies: GetPreviousAndNextChaptersFamily._dependencies, allTransitiveDependencies: - MangaChapterListFamily._allTransitiveDependencies, + GetPreviousAndNextChaptersFamily._allTransitiveDependencies, ); final String mangaId; + final String chapterIndex; @override bool operator ==(Object other) { - return other is MangaChapterListProvider && other.mangaId == mangaId; + return other is GetPreviousAndNextChaptersProvider && + other.mangaId == mangaId && + other.chapterIndex == chapterIndex; } @override int get hashCode { var hash = _SystemHash.combine(0, runtimeType.hashCode); hash = _SystemHash.combine(hash, mangaId.hashCode); + hash = _SystemHash.combine(hash, chapterIndex.hashCode); return _SystemHash.finish(hash); } - - @override - Future?> runNotifierBuild( - covariant MangaChapterList notifier, - ) { - return notifier.build( - mangaId: mangaId, - ); - } } -String _$mangaChapterSortHash() => r'5dc6e9a235babc683a798127f62e403aa6051eca'; +String _$mangaWithIdHash() => r'34066d958171e4089e173a5124751043e0aad8ec'; -/// See also [MangaChapterSort]. -@ProviderFor(MangaChapterSort) -final mangaChapterSortProvider = - AutoDisposeNotifierProvider.internal( - MangaChapterSort.new, - name: r'mangaChapterSortProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$mangaChapterSortHash, - dependencies: null, - allTransitiveDependencies: null, -); +abstract class _$MangaWithId extends BuildlessAutoDisposeAsyncNotifier { + late final String mangaId; -typedef _$MangaChapterSort = AutoDisposeNotifier; -String _$mangaChapterSortDirectionHash() => - r'eadfe69e90a84123236e2d0420964f1d65e8f357'; + Future build({ + required String mangaId, + }); +} -/// See also [MangaChapterSortDirection]. -@ProviderFor(MangaChapterSortDirection) -final mangaChapterSortDirectionProvider = - AutoDisposeNotifierProvider.internal( - MangaChapterSortDirection.new, - name: r'mangaChapterSortDirectionProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$mangaChapterSortDirectionHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef _$MangaChapterSortDirection = AutoDisposeNotifier; -String _$mangaChapterFilterDownloadedHash() => - r'e6f5e69389b85837139df8fbf0fec44468e622be'; - -/// See also [MangaChapterFilterDownloaded]. -@ProviderFor(MangaChapterFilterDownloaded) -final mangaChapterFilterDownloadedProvider = - AutoDisposeNotifierProvider.internal( - MangaChapterFilterDownloaded.new, - name: r'mangaChapterFilterDownloadedProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$mangaChapterFilterDownloadedHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef _$MangaChapterFilterDownloaded = AutoDisposeNotifier; -String _$mangaChapterFilterUnreadHash() => - r'd95df0b4352bc44c6eaf9a7c54783f2faa5b32f4'; - -/// See also [MangaChapterFilterUnread]. -@ProviderFor(MangaChapterFilterUnread) -final mangaChapterFilterUnreadProvider = - AutoDisposeNotifierProvider.internal( - MangaChapterFilterUnread.new, - name: r'mangaChapterFilterUnreadProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$mangaChapterFilterUnreadHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef _$MangaChapterFilterUnread = AutoDisposeNotifier; -String _$mangaChapterFilterBookmarkedHash() => - r'7e6335c2796527a3772dca1d79589b4fd883ae1c'; - -/// See also [MangaChapterFilterBookmarked]. -@ProviderFor(MangaChapterFilterBookmarked) -final mangaChapterFilterBookmarkedProvider = - AutoDisposeNotifierProvider.internal( - MangaChapterFilterBookmarked.new, - name: r'mangaChapterFilterBookmarkedProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$mangaChapterFilterBookmarkedHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef _$MangaChapterFilterBookmarked = AutoDisposeNotifier; -String _$mangaCategoryListHash() => r'b8c64815b0fcdb2ee1f21818161e654b477affb0'; - -abstract class _$MangaCategoryList - extends BuildlessAutoDisposeAsyncNotifier?> { - late final String mangaId; - - FutureOr?> build( - String mangaId, - ); -} - -/// See also [MangaCategoryList]. -@ProviderFor(MangaCategoryList) -const mangaCategoryListProvider = MangaCategoryListFamily(); +/// See also [MangaWithId]. +@ProviderFor(MangaWithId) +const mangaWithIdProvider = MangaWithIdFamily(); -/// See also [MangaCategoryList]. -class MangaCategoryListFamily - extends Family?>> { - /// See also [MangaCategoryList]. - const MangaCategoryListFamily(); +/// See also [MangaWithId]. +class MangaWithIdFamily extends Family> { + /// See also [MangaWithId]. + const MangaWithIdFamily(); - /// See also [MangaCategoryList]. - MangaCategoryListProvider call( - String mangaId, - ) { - return MangaCategoryListProvider( - mangaId, + /// See also [MangaWithId]. + MangaWithIdProvider call({ + required String mangaId, + }) { + return MangaWithIdProvider( + mangaId: mangaId, ); } @override - MangaCategoryListProvider getProviderOverride( - covariant MangaCategoryListProvider provider, + MangaWithIdProvider getProviderOverride( + covariant MangaWithIdProvider provider, ) { return call( - provider.mangaId, + mangaId: provider.mangaId, ); } @@ -355,33 +345,33 @@ class MangaCategoryListFamily _allTransitiveDependencies; @override - String? get name => r'mangaCategoryListProvider'; + String? get name => r'mangaWithIdProvider'; } -/// See also [MangaCategoryList]. -class MangaCategoryListProvider extends AutoDisposeAsyncNotifierProviderImpl< - MangaCategoryList, Map?> { - /// See also [MangaCategoryList]. - MangaCategoryListProvider( - this.mangaId, - ) : super.internal( - () => MangaCategoryList()..mangaId = mangaId, - from: mangaCategoryListProvider, - name: r'mangaCategoryListProvider', +/// See also [MangaWithId]. +class MangaWithIdProvider + extends AutoDisposeAsyncNotifierProviderImpl { + /// See also [MangaWithId]. + MangaWithIdProvider({ + required this.mangaId, + }) : super.internal( + () => MangaWithId()..mangaId = mangaId, + from: mangaWithIdProvider, + name: r'mangaWithIdProvider', debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null - : _$mangaCategoryListHash, - dependencies: MangaCategoryListFamily._dependencies, + : _$mangaWithIdHash, + dependencies: MangaWithIdFamily._dependencies, allTransitiveDependencies: - MangaCategoryListFamily._allTransitiveDependencies, + MangaWithIdFamily._allTransitiveDependencies, ); final String mangaId; @override bool operator ==(Object other) { - return other is MangaCategoryListProvider && other.mangaId == mangaId; + return other is MangaWithIdProvider && other.mangaId == mangaId; } @override @@ -393,42 +383,47 @@ class MangaCategoryListProvider extends AutoDisposeAsyncNotifierProviderImpl< } @override - FutureOr?> runNotifierBuild( - covariant MangaCategoryList notifier, + Future runNotifierBuild( + covariant MangaWithId notifier, ) { return notifier.build( - mangaId, + mangaId: mangaId, ); } } -String _$mangaChapterListWithFilterHash() => - r'c38f5462d03c80c543f83d2f6910fd7ecc0e1436'; -typedef MangaChapterListWithFilterRef - = AutoDisposeProviderRef?>>; +String _$mangaChapterListHash() => r'e29cf9a87f5f09029b63f16b0074a4f7466d8b92'; -/// See also [mangaChapterListWithFilter]. -@ProviderFor(mangaChapterListWithFilter) -const mangaChapterListWithFilterProvider = MangaChapterListWithFilterFamily(); +abstract class _$MangaChapterList + extends BuildlessAutoDisposeAsyncNotifier?> { + late final String mangaId; -/// See also [mangaChapterListWithFilter]. -class MangaChapterListWithFilterFamily - extends Family?>> { - /// See also [mangaChapterListWithFilter]. - const MangaChapterListWithFilterFamily(); + Future?> build({ + required String mangaId, + }); +} - /// See also [mangaChapterListWithFilter]. - MangaChapterListWithFilterProvider call({ +/// See also [MangaChapterList]. +@ProviderFor(MangaChapterList) +const mangaChapterListProvider = MangaChapterListFamily(); + +/// See also [MangaChapterList]. +class MangaChapterListFamily extends Family?>> { + /// See also [MangaChapterList]. + const MangaChapterListFamily(); + + /// See also [MangaChapterList]. + MangaChapterListProvider call({ required String mangaId, }) { - return MangaChapterListWithFilterProvider( + return MangaChapterListProvider( mangaId: mangaId, ); } @override - MangaChapterListWithFilterProvider getProviderOverride( - covariant MangaChapterListWithFilterProvider provider, + MangaChapterListProvider getProviderOverride( + covariant MangaChapterListProvider provider, ) { return call( mangaId: provider.mangaId, @@ -447,37 +442,33 @@ class MangaChapterListWithFilterFamily _allTransitiveDependencies; @override - String? get name => r'mangaChapterListWithFilterProvider'; + String? get name => r'mangaChapterListProvider'; } -/// See also [mangaChapterListWithFilter]. -class MangaChapterListWithFilterProvider - extends AutoDisposeProvider?>> { - /// See also [mangaChapterListWithFilter]. - MangaChapterListWithFilterProvider({ +/// See also [MangaChapterList]. +class MangaChapterListProvider extends AutoDisposeAsyncNotifierProviderImpl< + MangaChapterList, List?> { + /// See also [MangaChapterList]. + MangaChapterListProvider({ required this.mangaId, }) : super.internal( - (ref) => mangaChapterListWithFilter( - ref, - mangaId: mangaId, - ), - from: mangaChapterListWithFilterProvider, - name: r'mangaChapterListWithFilterProvider', + () => MangaChapterList()..mangaId = mangaId, + from: mangaChapterListProvider, + name: r'mangaChapterListProvider', debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null - : _$mangaChapterListWithFilterHash, - dependencies: MangaChapterListWithFilterFamily._dependencies, + : _$mangaChapterListHash, + dependencies: MangaChapterListFamily._dependencies, allTransitiveDependencies: - MangaChapterListWithFilterFamily._allTransitiveDependencies, + MangaChapterListFamily._allTransitiveDependencies, ); final String mangaId; @override bool operator ==(Object other) { - return other is MangaChapterListWithFilterProvider && - other.mangaId == mangaId; + return other is MangaChapterListProvider && other.mangaId == mangaId; } @override @@ -487,127 +478,137 @@ class MangaChapterListWithFilterProvider return _SystemHash.finish(hash); } -} - -String _$firstUnreadInFilteredChapterListHash() => - r'60d7452267e74bafdc290890223cc3a641e06305'; -typedef FirstUnreadInFilteredChapterListRef = AutoDisposeProviderRef; - -/// See also [firstUnreadInFilteredChapterList]. -@ProviderFor(firstUnreadInFilteredChapterList) -const firstUnreadInFilteredChapterListProvider = - FirstUnreadInFilteredChapterListFamily(); - -/// See also [firstUnreadInFilteredChapterList]. -class FirstUnreadInFilteredChapterListFamily extends Family { - /// See also [firstUnreadInFilteredChapterList]. - const FirstUnreadInFilteredChapterListFamily(); - - /// See also [firstUnreadInFilteredChapterList]. - FirstUnreadInFilteredChapterListProvider call({ - required String mangaId, - }) { - return FirstUnreadInFilteredChapterListProvider( - mangaId: mangaId, - ); - } @override - FirstUnreadInFilteredChapterListProvider getProviderOverride( - covariant FirstUnreadInFilteredChapterListProvider provider, + Future?> runNotifierBuild( + covariant MangaChapterList notifier, ) { - return call( - mangaId: provider.mangaId, + return notifier.build( + mangaId: mangaId, ); } +} - static const Iterable? _dependencies = null; +String _$mangaChapterSortHash() => r'c8c1ab8e5211e62f7690f359ffd74d9bb134dcdd'; - @override - Iterable? get dependencies => _dependencies; +/// See also [MangaChapterSort]. +@ProviderFor(MangaChapterSort) +final mangaChapterSortProvider = + AutoDisposeNotifierProvider.internal( + MangaChapterSort.new, + name: r'mangaChapterSortProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$mangaChapterSortHash, + dependencies: null, + allTransitiveDependencies: null, +); - static const Iterable? _allTransitiveDependencies = null; +typedef _$MangaChapterSort = AutoDisposeNotifier; +String _$mangaChapterSortDirectionHash() => + r'2028754952ec76ed4fabae6acea36692526c6aef'; - @override - Iterable? get allTransitiveDependencies => - _allTransitiveDependencies; +/// See also [MangaChapterSortDirection]. +@ProviderFor(MangaChapterSortDirection) +final mangaChapterSortDirectionProvider = + AutoDisposeNotifierProvider.internal( + MangaChapterSortDirection.new, + name: r'mangaChapterSortDirectionProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$mangaChapterSortDirectionHash, + dependencies: null, + allTransitiveDependencies: null, +); - @override - String? get name => r'firstUnreadInFilteredChapterListProvider'; -} +typedef _$MangaChapterSortDirection = AutoDisposeNotifier; +String _$mangaChapterFilterDownloadedHash() => + r'79ecc5ba5a1222c45b3fe90d4ab3af5d5ef45862'; -/// See also [firstUnreadInFilteredChapterList]. -class FirstUnreadInFilteredChapterListProvider - extends AutoDisposeProvider { - /// See also [firstUnreadInFilteredChapterList]. - FirstUnreadInFilteredChapterListProvider({ - required this.mangaId, - }) : super.internal( - (ref) => firstUnreadInFilteredChapterList( - ref, - mangaId: mangaId, - ), - from: firstUnreadInFilteredChapterListProvider, - name: r'firstUnreadInFilteredChapterListProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') - ? null - : _$firstUnreadInFilteredChapterListHash, - dependencies: FirstUnreadInFilteredChapterListFamily._dependencies, - allTransitiveDependencies: - FirstUnreadInFilteredChapterListFamily._allTransitiveDependencies, - ); +/// See also [MangaChapterFilterDownloaded]. +@ProviderFor(MangaChapterFilterDownloaded) +final mangaChapterFilterDownloadedProvider = + AutoDisposeNotifierProvider.internal( + MangaChapterFilterDownloaded.new, + name: r'mangaChapterFilterDownloadedProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$mangaChapterFilterDownloadedHash, + dependencies: null, + allTransitiveDependencies: null, +); - final String mangaId; +typedef _$MangaChapterFilterDownloaded = AutoDisposeNotifier; +String _$mangaChapterFilterUnreadHash() => + r'3ee19d85422eb771c4c2ce3a49e32732c56b7e02'; - @override - bool operator ==(Object other) { - return other is FirstUnreadInFilteredChapterListProvider && - other.mangaId == mangaId; - } +/// See also [MangaChapterFilterUnread]. +@ProviderFor(MangaChapterFilterUnread) +final mangaChapterFilterUnreadProvider = + AutoDisposeNotifierProvider.internal( + MangaChapterFilterUnread.new, + name: r'mangaChapterFilterUnreadProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$mangaChapterFilterUnreadHash, + dependencies: null, + allTransitiveDependencies: null, +); - @override - int get hashCode { - var hash = _SystemHash.combine(0, runtimeType.hashCode); - hash = _SystemHash.combine(hash, mangaId.hashCode); +typedef _$MangaChapterFilterUnread = AutoDisposeNotifier; +String _$mangaChapterFilterBookmarkedHash() => + r'ce62d26fc7f1be1807028b15499f370dc2872ad2'; - return _SystemHash.finish(hash); - } -} +/// See also [MangaChapterFilterBookmarked]. +@ProviderFor(MangaChapterFilterBookmarked) +final mangaChapterFilterBookmarkedProvider = + AutoDisposeNotifierProvider.internal( + MangaChapterFilterBookmarked.new, + name: r'mangaChapterFilterBookmarkedProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$mangaChapterFilterBookmarkedHash, + dependencies: null, + allTransitiveDependencies: null, +); -String _$getPreviousAndNextChaptersHash() => - r'c96d69daa0b66402a78052eb11af57f223c3e465'; -typedef GetPreviousAndNextChaptersRef - = AutoDisposeProviderRef?>; +typedef _$MangaChapterFilterBookmarked = AutoDisposeNotifier; +String _$mangaCategoryListHash() => r'b8c64815b0fcdb2ee1f21818161e654b477affb0'; -/// See also [getPreviousAndNextChapters]. -@ProviderFor(getPreviousAndNextChapters) -const getPreviousAndNextChaptersProvider = GetPreviousAndNextChaptersFamily(); +abstract class _$MangaCategoryList + extends BuildlessAutoDisposeAsyncNotifier?> { + late final String mangaId; -/// See also [getPreviousAndNextChapters]. -class GetPreviousAndNextChaptersFamily - extends Family?> { - /// See also [getPreviousAndNextChapters]. - const GetPreviousAndNextChaptersFamily(); + FutureOr?> build( + String mangaId, + ); +} - /// See also [getPreviousAndNextChapters]. - GetPreviousAndNextChaptersProvider call({ - required String mangaId, - required String chapterIndex, - }) { - return GetPreviousAndNextChaptersProvider( - mangaId: mangaId, - chapterIndex: chapterIndex, +/// See also [MangaCategoryList]. +@ProviderFor(MangaCategoryList) +const mangaCategoryListProvider = MangaCategoryListFamily(); + +/// See also [MangaCategoryList]. +class MangaCategoryListFamily + extends Family?>> { + /// See also [MangaCategoryList]. + const MangaCategoryListFamily(); + + /// See also [MangaCategoryList]. + MangaCategoryListProvider call( + String mangaId, + ) { + return MangaCategoryListProvider( + mangaId, ); } @override - GetPreviousAndNextChaptersProvider getProviderOverride( - covariant GetPreviousAndNextChaptersProvider provider, + MangaCategoryListProvider getProviderOverride( + covariant MangaCategoryListProvider provider, ) { return call( - mangaId: provider.mangaId, - chapterIndex: provider.chapterIndex, + provider.mangaId, ); } @@ -623,50 +624,50 @@ class GetPreviousAndNextChaptersFamily _allTransitiveDependencies; @override - String? get name => r'getPreviousAndNextChaptersProvider'; + String? get name => r'mangaCategoryListProvider'; } -/// See also [getPreviousAndNextChapters]. -class GetPreviousAndNextChaptersProvider - extends AutoDisposeProvider?> { - /// See also [getPreviousAndNextChapters]. - GetPreviousAndNextChaptersProvider({ - required this.mangaId, - required this.chapterIndex, - }) : super.internal( - (ref) => getPreviousAndNextChapters( - ref, - mangaId: mangaId, - chapterIndex: chapterIndex, - ), - from: getPreviousAndNextChaptersProvider, - name: r'getPreviousAndNextChaptersProvider', +/// See also [MangaCategoryList]. +class MangaCategoryListProvider extends AutoDisposeAsyncNotifierProviderImpl< + MangaCategoryList, Map?> { + /// See also [MangaCategoryList]. + MangaCategoryListProvider( + this.mangaId, + ) : super.internal( + () => MangaCategoryList()..mangaId = mangaId, + from: mangaCategoryListProvider, + name: r'mangaCategoryListProvider', debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') ? null - : _$getPreviousAndNextChaptersHash, - dependencies: GetPreviousAndNextChaptersFamily._dependencies, + : _$mangaCategoryListHash, + dependencies: MangaCategoryListFamily._dependencies, allTransitiveDependencies: - GetPreviousAndNextChaptersFamily._allTransitiveDependencies, + MangaCategoryListFamily._allTransitiveDependencies, ); final String mangaId; - final String chapterIndex; @override bool operator ==(Object other) { - return other is GetPreviousAndNextChaptersProvider && - other.mangaId == mangaId && - other.chapterIndex == chapterIndex; + return other is MangaCategoryListProvider && other.mangaId == mangaId; } @override int get hashCode { var hash = _SystemHash.combine(0, runtimeType.hashCode); hash = _SystemHash.combine(hash, mangaId.hashCode); - hash = _SystemHash.combine(hash, chapterIndex.hashCode); return _SystemHash.finish(hash); } + + @override + FutureOr?> runNotifierBuild( + covariant MangaCategoryList notifier, + ) { + return notifier.build( + mangaId, + ); + } } // ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions diff --git a/lib/src/features/manga_book/presentation/manga_details/widgets/edit_manga_category_dialog.dart b/lib/src/features/manga_book/presentation/manga_details/widgets/edit_manga_category_dialog.dart index 3063b4f4..5276e8c3 100644 --- a/lib/src/features/manga_book/presentation/manga_details/widgets/edit_manga_category_dialog.dart +++ b/lib/src/features/manga_book/presentation/manga_details/widgets/edit_manga_category_dialog.dart @@ -47,7 +47,7 @@ class EditMangaCategoryDialog extends HookConsumerWidget { content: categoryList.showUiWhenData( context, (data) => ConstrainedBox( - constraints: BoxConstraints(maxHeight: context.height * .4), + constraints: BoxConstraints(maxHeight: context.height * .7), child: data.isBlank ? Padding( padding: KEdgeInsets.h16.size, @@ -59,31 +59,34 @@ class EditMangaCategoryDialog extends HookConsumerWidget { (selectedCategoryList) => Column( children: [ for (int index = 1; index < data!.length; index++) - AsyncCheckboxListTile( - onChanged: (value) async { - await AsyncValue.guard( - () => value.ifNull() - ? ref - .read(mangaBookRepositoryProvider) - .addMangaToCategory( - mangaId, - "${data[index].id!}", - ) - : ref - .read(mangaBookRepositoryProvider) - .removeMangaFromCategory( - mangaId, - "${data[index].id!}", - ), - ); - await ref.read(provider.notifier).refresh(); - }, - value: selectedCategoryList?.containsKey( - "${data[index].id}", - ) ?? - false, - title: Text(data[index].name ?? ""), - ), + if (data[index].id == 0) + const SizedBox.shrink() + else + AsyncCheckboxListTile( + onChanged: (value) async { + await AsyncValue.guard( + () => value.ifNull() + ? ref + .read(mangaBookRepositoryProvider) + .addMangaToCategory( + mangaId, + "${data[index].id!}", + ) + : ref + .read(mangaBookRepositoryProvider) + .removeMangaFromCategory( + mangaId, + "${data[index].id!}", + ), + ); + await ref.read(provider.notifier).refresh(); + }, + value: selectedCategoryList?.containsKey( + "${data[index].id}", + ) ?? + false, + title: Text(data[index].name ?? ""), + ), ], ), ), 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 196d6a9f..58693929 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 @@ -10,12 +10,13 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../constants/db_keys.dart'; import '../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../utils/mixin/shared_preferences_client_mixin.dart'; part 'grid_cover_min_width.g.dart'; @riverpod -class GridMinWidth extends _$GridMinWidth with SharedPreferenceClient { +class GridMinWidth extends _$GridMinWidth + with SharedPreferenceClientMixin { @override double? build() => initialize( ref, 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 46a5f1b8..5210600c 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'eb51b6d551a9104455cf76fafe9a3d291a5cf2c3'; +String _$gridMinWidthHash() => r'8cd39a48857bc29905fc40604feaa224976d287c'; /// See also [GridMinWidth]. @ProviderFor(GridMinWidth) diff --git a/lib/src/features/settings/presentation/backup/widgets/backup_missing_dialog.dart b/lib/src/features/settings/presentation/backup/widgets/backup_missing_dialog.dart index 3b3a61d7..69461272 100644 --- a/lib/src/features/settings/presentation/backup/widgets/backup_missing_dialog.dart +++ b/lib/src/features/settings/presentation/backup/widgets/backup_missing_dialog.dart @@ -19,46 +19,48 @@ class BackupMissingDialog extends StatelessWidget { @override Widget build(BuildContext context) { return AlertDialog( - content: Column( - mainAxisSize: MainAxisSize.min, - children: [ - if (backupMissing.missingSources.isNotBlank) ...[ - Text( - context.l10n!.missingExtension, - style: context.textTheme.titleMedium, - ), - ...?backupMissing.missingSources?.map( - (e) => ListTile( - leading: const Icon(Icons.extension_rounded), - title: Text(e), + content: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + if (backupMissing.missingSources.isNotBlank) ...[ + Text( + context.l10n!.missingExtension, + style: context.textTheme.titleMedium, ), - ), - ], - if (backupMissing.missingTrackers.isNotBlank) ...[ - Text( - context.l10n!.missingTrackers, - style: context.textTheme.titleMedium, - ), - ...?backupMissing.missingTrackers?.map( - (e) => ListTile( - leading: const Icon(Icons.sync_rounded), - title: Text(e), + ...?backupMissing.missingSources?.map( + (e) => ListTile( + leading: const Icon(Icons.extension_rounded), + title: Text(e), + ), ), - ), - ], - if (backupMissing.mangasMissingSources.isNotBlank) ...[ - Text( - context.l10n!.mangaMissingSources, - style: context.textTheme.titleMedium, - ), - ...?backupMissing.mangasMissingSources?.map( - (e) => ListTile( - leading: const Icon(Icons.explore), - title: Text(e), + ], + if (backupMissing.missingTrackers.isNotBlank) ...[ + Text( + context.l10n!.missingTrackers, + style: context.textTheme.titleMedium, + ), + ...?backupMissing.missingTrackers?.map( + (e) => ListTile( + leading: const Icon(Icons.sync_rounded), + title: Text(e), + ), ), - ), - ] - ], + ], + if (backupMissing.mangasMissingSources.isNotBlank) ...[ + Text( + context.l10n!.mangaMissingSources, + style: context.textTheme.titleMedium, + ), + ...?backupMissing.mangasMissingSources?.map( + (e) => ListTile( + leading: const Icon(Icons.explore), + title: Text(e), + ), + ), + ] + ], + ), ), actions: [PopButton(popText: context.l10n!.close)], ); 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 8420d85c..79400a29 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 @@ -11,12 +11,12 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; import '../../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; part 'show_nsfw_switch.g.dart'; @riverpod -class ShowNSFW extends _$ShowNSFW with SharedPreferenceClient { +class ShowNSFW extends _$ShowNSFW with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, 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 503a4284..4ac8b7ad 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'ca96408e191b4ad20487c9191759aef73ca939ba'; +String _$showNSFWHash() => r'a88757282270337527e28828b83e3a36189a424c'; /// See also [ShowNSFW]. @ProviderFor(ShowNSFW) 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 c796c5bb..f3fb04bd 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 @@ -11,12 +11,12 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; import '../../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; part 'reader_invert_tap_tile.g.dart'; @riverpod -class InvertTap extends _$InvertTap with SharedPreferenceClient { +class InvertTap extends _$InvertTap with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, 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 9755e0a8..bb1a2ab1 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'adb0cbab12d2c1584f4a7693c68bb371002af51b'; +String _$invertTapHash() => r'8885890ec1184098ce4769b2488f02078502937b'; /// See also [InvertTap]. @ProviderFor(InvertTap) 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 fc9e7bca..ed14428d 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 @@ -13,14 +13,14 @@ import '../../../../../../constants/db_keys.dart'; import '../../../../../../constants/enum.dart'; import '../../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../../../widgets/radio_list_popup.dart'; part 'reader_mode_tile.g.dart'; @riverpod class ReaderModeKey extends _$ReaderModeKey - with SharedPreferenceEnumClient { + with SharedPreferenceEnumClientMixin { @override ReaderMode? build() => initialize( ref, 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 9b36023e..3b1c9673 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'bd86778f0d09706cc8b9e46190ec5c3f05847ded'; +String _$readerModeKeyHash() => r'ce3cb3f4277926e44291974f73e2ff82c91242e6'; /// 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 1cc0f328..1adb6007 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 @@ -13,14 +13,14 @@ import '../../../../../../constants/db_keys.dart'; import '../../../../../../constants/enum.dart'; import '../../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../../../widgets/radio_list_popup.dart'; part 'reader_navigation_layout_tile.g.dart'; @riverpod class ReaderNavigationLayoutKey extends _$ReaderNavigationLayoutKey - with SharedPreferenceEnumClient { + with SharedPreferenceEnumClientMixin { @override ReaderNavigationLayout? build() => initialize( ref, 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 28f91a1b..8f5b8e79 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'e6bea91f9a9f8bbd473ca3a29f1bcbbe792f4fac'; + r'aa37cea42eb029b459e56aad6a1803fa139d7db0'; /// 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 72df939f..4e44e1a0 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 @@ -14,13 +14,13 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../../../constants/db_keys.dart'; import '../../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; part 'reader_padding_slider.g.dart'; @riverpod class ReaderPaddingKey extends _$ReaderPaddingKey - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override double? build() => initialize( ref, 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 ef19a8f3..228335ae 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'0ea049ed6f7699646d8ab4c4527a60ca71045468'; +String _$readerPaddingKeyHash() => r'733c2f49bded5354ed4bc6016d2951bb3626a23e'; /// See also [ReaderPaddingKey]. @ProviderFor(ReaderPaddingKey) 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 a9b36417..5a152ea0 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 @@ -16,13 +16,14 @@ import '../../../../../../constants/app_sizes.dart'; import '../../../../../../constants/db_keys.dart'; import '../../../../../../utils/extensions/custom_extensions.dart'; -import '../../../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../../../widgets/pop_button.dart'; part 'credentials_popup.g.dart'; @riverpod -class Credentials extends _$Credentials with SharedPreferenceClient { +class Credentials extends _$Credentials + with SharedPreferenceClientMixin { @override String? build() => initialize( ref, 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 4cadd2e9..89e7cb7f 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'd36ec9987003881324c04805a28b1c6d2bfaba83'; +String _$credentialsHash() => r'e509b70ba4135d6ff261c22f96f600f70e1fb5e0'; /// See also [Credentials]. @ProviderFor(Credentials) 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 4a92f134..03b2a6bf 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 @@ -13,13 +13,13 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../constants/db_keys.dart'; import '../../../../utils/extensions/custom_extensions.dart'; -import '../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../widgets/pop_button.dart'; part 'server_url_tile.g.dart'; @riverpod -class ServerUrl extends _$ServerUrl with SharedPreferenceClient { +class ServerUrl extends _$ServerUrl with SharedPreferenceClientMixin { @override String? build() => initialize( ref, 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 d35e41e7..45b0d17b 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'99f4cbdc6bc8870eaa75e5d7fc9b295ff68f1aa9'; +String _$serverUrlHash() => r'0ce7ed7758ce8760ad2db99bfe9d7a7703fae57b'; /// See also [ServerUrl]. @ProviderFor(ServerUrl) diff --git a/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.dart b/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.dart index 6a52f8ab..42ee37a8 100644 --- a/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.dart +++ b/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.dart @@ -12,14 +12,14 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../../constants/db_keys.dart'; import '../../../../utils/extensions/custom_extensions.dart'; -import '../../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../../utils/mixin/shared_preferences_client_mixin.dart'; import '../../../../widgets/radio_list_popup.dart'; part 'theme_mode_tile.g.dart'; @riverpod class ThemeModeKey extends _$ThemeModeKey - with SharedPreferenceEnumClient { + with SharedPreferenceEnumClientMixin { @override ThemeMode? build() { return initialize( diff --git a/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.g.dart b/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.g.dart index 10c02a4b..0d967375 100644 --- a/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.g.dart +++ b/lib/src/features/settings/widgets/theme_mode_tile/theme_mode_tile.g.dart @@ -6,7 +6,7 @@ part of 'theme_mode_tile.dart'; // RiverpodGenerator // ************************************************************************** -String _$themeModeKeyHash() => r'cbaff231794f107e08321e52db71c6a171edae43'; +String _$themeModeKeyHash() => r'121bae69f5be36a545bdfad91dc9303d42d6c4be'; /// See also [ThemeModeKey]. @ProviderFor(ThemeModeKey) diff --git a/lib/src/global_providers/global_providers.dart b/lib/src/global_providers/global_providers.dart index ddcd6301..d1b8ff01 100644 --- a/lib/src/global_providers/global_providers.dart +++ b/lib/src/global_providers/global_providers.dart @@ -6,15 +6,16 @@ import 'package:flutter/material.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; +import 'package:shared_preferences/shared_preferences.dart'; import '../constants/db_keys.dart'; import '../constants/enum.dart'; import '../features/settings/presentation/server/widget/credential_popup/credentials_popup.dart'; import '../features/settings/widgets/server_url_tile/server_url_tile.dart'; import '../utils/extensions/custom_extensions.dart'; +import '../utils/mixin/shared_preferences_client_mixin.dart'; import '../utils/storage/dio/dio_client.dart'; import '../utils/storage/dio/network_module.dart'; -import '../utils/storage/local/shared_preferences_client.dart'; part 'global_providers.g.dart'; @@ -29,7 +30,7 @@ DioClient dioClientKey(ref) => DioClient( @riverpod class AuthTypeKey extends _$AuthTypeKey - with SharedPreferenceEnumClient { + with SharedPreferenceEnumClientMixin { @override AuthType? build() => initialize( ref, @@ -40,7 +41,7 @@ class AuthTypeKey extends _$AuthTypeKey } @riverpod -class L10n extends _$L10n with SharedPreferenceClient { +class L10n extends _$L10n with SharedPreferenceClientMixin { Map toJson(Locale locale) => { if (locale.countryCode.isNotBlank) "countryCode": locale.countryCode!, if (locale.languageCode.isNotBlank) "languageCode": locale.languageCode, @@ -63,3 +64,6 @@ class L10n extends _$L10n with SharedPreferenceClient { toJson: toJson, ); } + +@riverpod +SharedPreferences sharedPreferences(ref) => throw UnimplementedError(); diff --git a/lib/src/global_providers/global_providers.g.dart b/lib/src/global_providers/global_providers.g.dart index 250ba07d..0cdfb762 100644 --- a/lib/src/global_providers/global_providers.g.dart +++ b/lib/src/global_providers/global_providers.g.dart @@ -6,7 +6,37 @@ part of 'global_providers.dart'; // RiverpodGenerator // ************************************************************************** -String _$authTypeKeyHash() => r'4ec3957b64a93c74d7034a0b4a05567fa59a212d'; +String _$dioClientKeyHash() => r'aa6e40fe7fd11fd2fd884674cf4d47c1c5f93048'; + +/// See also [dioClientKey]. +@ProviderFor(dioClientKey) +final dioClientKeyProvider = AutoDisposeProvider.internal( + dioClientKey, + name: r'dioClientKeyProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') ? null : _$dioClientKeyHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef DioClientKeyRef = AutoDisposeProviderRef; +String _$sharedPreferencesHash() => r'dd034076f3a6cac11ba173b2ebd1bd0debcadd42'; + +/// See also [sharedPreferences]. +@ProviderFor(sharedPreferences) +final sharedPreferencesProvider = + AutoDisposeProvider.internal( + sharedPreferences, + name: r'sharedPreferencesProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$sharedPreferencesHash, + dependencies: null, + allTransitiveDependencies: null, +); + +typedef SharedPreferencesRef = AutoDisposeProviderRef; +String _$authTypeKeyHash() => r'8264b20583c2d0e3c9da5073ff1c13fda7e7fc34'; /// See also [AuthTypeKey]. @ProviderFor(AuthTypeKey) @@ -21,7 +51,7 @@ final authTypeKeyProvider = ); typedef _$AuthTypeKey = AutoDisposeNotifier; -String _$l10nHash() => r'8a8734741cebf400bc54f9be4365bef9b07da454'; +String _$l10nHash() => r'6a874a9412c7619bba907eebafcb828e7de350cf'; /// See also [L10n]. @ProviderFor(L10n) @@ -35,18 +65,4 @@ final l10nProvider = AutoDisposeNotifierProvider.internal( ); typedef _$L10n = AutoDisposeNotifier; -String _$dioClientKeyHash() => r'aa6e40fe7fd11fd2fd884674cf4d47c1c5f93048'; - -/// See also [dioClientKey]. -@ProviderFor(dioClientKey) -final dioClientKeyProvider = AutoDisposeProvider.internal( - dioClientKey, - name: r'dioClientKeyProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$dioClientKeyHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef DioClientKeyRef = AutoDisposeProviderRef; // ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions diff --git a/lib/src/utils/storage/local/shared_preferences_client.dart b/lib/src/utils/mixin/shared_preferences_client_mixin.dart similarity index 88% rename from lib/src/utils/storage/local/shared_preferences_client.dart rename to lib/src/utils/mixin/shared_preferences_client_mixin.dart index 93736542..e566cd23 100644 --- a/lib/src/utils/storage/local/shared_preferences_client.dart +++ b/lib/src/utils/mixin/shared_preferences_client_mixin.dart @@ -9,14 +9,10 @@ import 'dart:convert'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import '../../extensions/custom_extensions.dart'; +import '../../global_providers/global_providers.dart'; +import '../extensions/custom_extensions.dart'; -part 'shared_preferences_client.g.dart'; - -@riverpod -SharedPreferences sharedPreferences(ref) => throw UnimplementedError(); - -/// [SharedPreferenceClient] is a mixin to add [_get] and [update] functions to +/// [SharedPreferenceClientMixin] is a mixin to add [_get] and [update] functions to /// the provider. /// /// * Remember to use [ initialize ] function to assign [_key], [_client] @@ -25,7 +21,7 @@ SharedPreferences sharedPreferences(ref) => throw UnimplementedError(); /// * optionally provide [_initial] for giving initial value to the [_key]. /// /// * [T] should not be a Nullable Type. -mixin SharedPreferenceClient { +mixin SharedPreferenceClientMixin { late final String _key; late final SharedPreferences _client; late final T? _initial; @@ -82,12 +78,12 @@ mixin SharedPreferenceClient { } } -/// [SharedPreferenceEnumClient] is a mixin to add [get] and [update] functions to +/// [SharedPreferenceEnumClientMixin] is a mixin to add [get] and [update] functions to /// the provider. /// /// * Remember to initialize [_key], [_client], [_enumList] in [build] function of provider /// * optionally provide [_initial] for giving initial value to the [_key]. -mixin SharedPreferenceEnumClient { +mixin SharedPreferenceEnumClientMixin { late String _key; late SharedPreferences _client; T? _initial; diff --git a/lib/src/utils/mixin/state_provider_mixin.dart b/lib/src/utils/mixin/state_provider_mixin.dart new file mode 100644 index 00000000..34e6aaed --- /dev/null +++ b/lib/src/utils/mixin/state_provider_mixin.dart @@ -0,0 +1,14 @@ +// Copyright (c) 2023 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'; + +mixin StateProviderMixin { + @protected + set state(State value); + + void update(State state) => this.state = state; +} diff --git a/lib/src/utils/storage/local/shared_preferences_client.g.dart b/lib/src/utils/storage/local/shared_preferences_client.g.dart deleted file mode 100644 index 0a99631d..00000000 --- a/lib/src/utils/storage/local/shared_preferences_client.g.dart +++ /dev/null @@ -1,25 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'shared_preferences_client.dart'; - -// ************************************************************************** -// RiverpodGenerator -// ************************************************************************** - -String _$sharedPreferencesHash() => r'dd034076f3a6cac11ba173b2ebd1bd0debcadd42'; - -/// See also [sharedPreferences]. -@ProviderFor(sharedPreferences) -final sharedPreferencesProvider = - AutoDisposeProvider.internal( - sharedPreferences, - name: r'sharedPreferencesProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$sharedPreferencesHash, - dependencies: null, - allTransitiveDependencies: null, -); - -typedef SharedPreferencesRef = AutoDisposeProviderRef; -// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions 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 3dd1a19b..8fe6b12d 100644 --- a/lib/src/widgets/manga_cover/providers/manga_cover_providers.dart +++ b/lib/src/widgets/manga_cover/providers/manga_cover_providers.dart @@ -7,13 +7,13 @@ import 'package:riverpod_annotation/riverpod_annotation.dart'; import '../../../constants/db_keys.dart'; -import '../../../utils/storage/local/shared_preferences_client.dart'; +import '../../../utils/mixin/shared_preferences_client_mixin.dart'; part 'manga_cover_providers.g.dart'; @riverpod class DownloadedBadge extends _$DownloadedBadge - with SharedPreferenceClient { + with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, @@ -23,7 +23,7 @@ class DownloadedBadge extends _$DownloadedBadge } @riverpod -class UnreadBadge extends _$UnreadBadge with SharedPreferenceClient { +class UnreadBadge extends _$UnreadBadge with SharedPreferenceClientMixin { @override bool? build() => initialize( ref, 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 238bfd5a..e7fa48ac 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'87a75683efec7ac3af30542b8db7905ef201698b'; +String _$downloadedBadgeHash() => r'afa3d2e9bd56dcb3bcb89c5811f653ea2b1bb934'; /// See also [DownloadedBadge]. @ProviderFor(DownloadedBadge) @@ -22,7 +22,7 @@ final downloadedBadgeProvider = ); typedef _$DownloadedBadge = AutoDisposeNotifier; -String _$unreadBadgeHash() => r'28d64c3752401f1afb1c0075bd227f64fc090126'; +String _$unreadBadgeHash() => r'cdb245781af0083f949d8584063609220b41c790'; /// See also [UnreadBadge]. @ProviderFor(UnreadBadge) diff --git a/lib/src/widgets/radio_list_popup.dart b/lib/src/widgets/radio_list_popup.dart index 859f5d91..a89d4831 100644 --- a/lib/src/widgets/radio_list_popup.dart +++ b/lib/src/widgets/radio_list_popup.dart @@ -57,25 +57,30 @@ class RadioList extends StatelessWidget { final String Function(T)? displayName; @override Widget build(BuildContext context) { - return Column( - mainAxisSize: MainAxisSize.min, - children: optionList - .map( - (e) => RadioListTile( - activeColor: context.theme.indicatorColor, - title: Text( - displayName != null ? displayName!(e) : e.toString(), - ), - value: e, - groupValue: value, - onChanged: (value) { - if (value != null) { - onChange(value); - } - }, - ), - ) - .toList(), + return ConstrainedBox( + constraints: BoxConstraints(maxHeight: context.height * .7), + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: optionList + .map( + (e) => RadioListTile( + activeColor: context.theme.indicatorColor, + title: Text( + displayName != null ? displayName!(e) : e.toString(), + ), + value: e, + groupValue: value, + onChanged: (value) { + if (value != null) { + onChange(value); + } + }, + ), + ) + .toList(), + ), + ), ); } } diff --git a/pubspec.lock b/pubspec.lock index cb04030e..71c7c7cb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf" + sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" build_resolvers: dependency: transitive description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: built_value - sha256: "169565c8ad06adb760c3645bf71f00bff161b00002cace266cad42c5d22a7725" + sha256: "31b7c748fd4b9adf8d25d72a4c4a59ef119f12876cf414f94f8af5131d5fa2b0" url: "https://pub.dev" source: hosted - version: "8.4.3" + version: "8.4.4" cached_network_image: dependency: "direct main" description: @@ -245,26 +245,26 @@ packages: dependency: transitive description: name: custom_lint - sha256: "29b7e51b5e75fcd5ffce8fc12af87b71cbde7a59d080467b187630231aeb42c0" + sha256: "324e7026902f34e180d8d27e08a89dbbe3dd8a54e0c3852a0df0db0f4046120b" url: "https://pub.dev" source: hosted - version: "0.2.5" + version: "0.2.12" custom_lint_core: dependency: transitive description: name: custom_lint_core - sha256: "4592ac37e7cf4c9410268765f1c8ca3520309bbd0a340f3dfd047d18e5351962" + sha256: "34a9447102de5741d6dc464c4824a4173b20b91d5685589ea652b051dda1f461" url: "https://pub.dev" source: hosted - version: "0.2.10" + version: "0.2.12" dart_style: dependency: transitive description: name: dart_style - sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4" + sha256: "5be16bf1707658e4c03078d4a9b90208ded217fb02c163e207d334082412f2fb" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.5" dartx: dependency: transitive description: @@ -277,10 +277,10 @@ packages: dependency: "direct main" description: name: dio - sha256: "9fdbf71baeb250fc9da847f6cb2052196f62c19906a3657adfc18631a667d316" + sha256: "3709d74615bba5e443eb141f6a7f4bcc4788f8fae6f743edadfb79c2a8e6287e" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.0.1" fake_async: dependency: transitive description: @@ -370,10 +370,10 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: ce0e501cfc258907842238e4ca605e74b7fd1cdf04b3b43e86c43f3e40a1592c + sha256: "02dcaf49d405f652b7160e882bacfc02cb497041bb2eab2a49b1c393cf9aac12" url: "https://pub.dev" source: hosted - version: "0.11.0" + version: "0.12.0" flutter_lints: dependency: "direct dev" description: @@ -391,26 +391,26 @@ packages: dependency: "direct dev" description: name: flutter_native_splash - sha256: "6777a3abb974021a39b5fdd2d46a03ca390e03903b6351f21d10e7ecc969f12d" + sha256: af665ef80a213a9ed502845a3d7a61b9acca4100ee7e9f067a7440bc3acd6730 url: "https://pub.dev" source: hosted - version: "2.2.16" + version: "2.2.19" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "60fc7b78455b94e6de2333d2f95196d32cf5c22f4b0b0520a628804cb463503b" + sha256: c224ac897bed083dabf11f238dd11a239809b446740be0c2044608c50029ffdf url: "https://pub.dev" source: hosted - version: "2.0.7" + version: "2.0.9" flutter_riverpod: dependency: transitive description: name: flutter_riverpod - sha256: "46a27b7a11dc13738054093076f2dc65692ddcd463979b15092accf5681aea20" + sha256: "40c0d7d03ccd24fa32ea08dcfc4df9bb92c4c26c9a91938945da3be10ed8ca83" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" flutter_test: dependency: "direct dev" description: flutter @@ -473,10 +473,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: "7a79232827c851f6b9f08c3c7254a1eaff7bc6aa147e103e51f951c5c10b0ccc" + sha256: b4bb06205ec607278b6fc23db238278417bca84a3905779cc68d1eb7afae37e2 url: "https://pub.dev" source: hosted - version: "6.0.9" + version: "6.2.0" graphs: dependency: transitive description: @@ -489,18 +489,18 @@ packages: dependency: "direct main" description: name: hooks_riverpod - sha256: a596bcb1eaf48eae6da1ce8b9e60ec9538ef7d15725e941c3626f29dfcc01d96 + sha256: "048d5d912b9e5ef9db4d274d201a2bfe4270e5694ff5c6719b593d4ae9c512c7" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" html: dependency: transitive description: name: html - sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269 + sha256: "79d498e6d6761925a34ee5ea8fa6dfef38607781d2fa91e37523474282af55cb" url: "https://pub.dev" source: hosted - version: "0.15.1" + version: "0.15.2" http: dependency: transitive description: @@ -529,10 +529,10 @@ packages: dependency: transitive description: name: image - sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + sha256: "483a389d6ccb292b570c31b3a193779b1b0178e7eb571986d9a49904b6861227" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "4.0.15" infinite_scroll_pagination: dependency: "direct main" description: @@ -673,50 +673,50 @@ packages: dependency: "direct main" description: name: path_provider - sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95 + sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9" url: "https://pub.dev" source: hosted - version: "2.0.12" + version: "2.0.13" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e + sha256: "7623b7d4be0f0f7d9a8b5ee6879fc13e4522d4c875ab86801dee4af32b54b83e" url: "https://pub.dev" source: hosted - version: "2.0.22" + version: "2.0.23" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "62a68e7e1c6c459f9289859e2fae58290c981ce21d1697faf54910fe1faa4c74" + sha256: eec003594f19fe2456ea965ae36b3fc967bc5005f508890aafe31fa75e41d972 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: "2e32f1640f07caef0d3cb993680f181c79e54a3827b997d5ee221490d131fbd9" + sha256: "525ad5e07622d19447ad740b1ed5070031f7a5437f44355ae915ff56e986429a" url: "https://pub.dev" source: hosted - version: "2.1.8" + version: "2.1.9" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 + sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.6" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c + sha256: "642ddf65fde5404f83267e8459ddb4556316d3ee6d511ed193357e25caa3632d" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pedantic: dependency: transitive description: @@ -785,10 +785,10 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pointycastle: dependency: transitive description: @@ -825,10 +825,10 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a" + sha256: ec85d7d55339d85f44ec2b682a82fea340071e8978257e5a43e69f79e98ef50c url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" recase: dependency: transitive description: @@ -841,34 +841,34 @@ packages: dependency: transitive description: name: riverpod - sha256: "59a48de9c757aa61aa28e9fd625ffb360d43b6b54606f12536622c55be9e8c4b" + sha256: c5aea6c3fed340707f013a023a37ab388bf45611a8a4f7e76b5e9007eb76cd25 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" riverpod_analyzer_utils: dependency: transitive description: name: riverpod_analyzer_utils - sha256: "4f0d8f5887186f5fad5377a003beabc36f21f48098828e61be11c03578a8f03a" + sha256: "51f415c7b8ed8fbb0114f7c18de015b1465b3311bf75683a209ee2f680bac160" url: "https://pub.dev" source: hosted - version: "0.0.2" + version: "0.1.1" riverpod_annotation: dependency: "direct main" description: name: riverpod_annotation - sha256: "4726dfa853880e64a8a9f7232eb10a69d6d1df5a45d5847fd0b9ecf6807e57b7" + sha256: "8f39f568860637c6ca5842fbcc175e5e222269f0f8d6f40472d26772d7d563ba" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "2.0.0" riverpod_generator: dependency: "direct dev" description: name: riverpod_generator - sha256: de002980e1b47d8a8275a465e7c955cbe4722ea97cab76d93af90dad920eac05 + sha256: d7265eac04bad1febff3776b72ac72ec8d0e86efe6b30dc0585899f670bcd26c url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "2.0.0" rxdart: dependency: transitive description: @@ -905,58 +905,58 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: "5949029e70abe87f75cfe59d17bf5c397619c4b74a099b10116baeb34786fad9" + sha256: ee6257848f822b8481691f20c3e6d2bfee2e9eccb2a3d249907fcfb198c55b41 url: "https://pub.dev" source: hosted - version: "2.0.17" + version: "2.0.18" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "955e9736a12ba776bdd261cf030232b30eadfcd9c79b32a3250dd4a494e8c8f7" + sha256: a51a4f9375097f94df1c6e0a49c0374440d31ab026b59d58a7e7660675879db4 url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.0.16" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "2b55c18636a4edc529fa5cd44c03d3f3100c00513f518c5127c951978efcccd0" + sha256: "6b84fdf06b32bb336f972d373cd38b63734f3461ba56ac2ba01b56d052796259" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: f8ea038aa6da37090093974ebdcf4397010605fd2ff65c37a66f9d28394cb874 + sha256: d7fb71e6e20cd3dfffcc823a28da3539b392e53ed5fc5c2b90b55fdaa8a7e8fa url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: da9431745ede5ece47bc26d5d73a9d3c6936ef6945c101a5aca46f62e52c1cf3 + sha256: "824bfd02713e37603b2bdade0842e47d56e7db32b1dcdd1cae533fb88e2913fc" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: a4b5bc37fe1b368bbc81f953197d55e12f49d0296e7e412dfe2d2d77d6929958 + sha256: "6737b757e49ba93de2a233df229d0b6a87728cea1684da828cbc718b65dcf9d7" url: "https://pub.dev" source: hosted - version: "2.0.4" + version: "2.0.5" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: "5eaf05ae77658d3521d0e993ede1af962d4b326cd2153d312df716dc250f00c9" + sha256: bd014168e8484837c39ef21065b78f305810ceabc1d4f90be6e3b392ce81b46d url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" shelf: dependency: transitive description: @@ -1014,10 +1014,10 @@ packages: dependency: transitive description: name: sqflite - sha256: "78324387dc81df14f78df06019175a86a2ee0437624166c382e145d0a7fd9a4f" + sha256: "851d5040552cf911f4cabda08d003eca76b27da3ed0002978272e27c8fbf8ecc" url: "https://pub.dev" source: hosted - version: "2.2.4+1" + version: "2.2.5" sqflite_common: dependency: transitive description: @@ -1126,66 +1126,66 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: e8f2efc804810c0f2f5b485f49e7942179f56eabcfe81dce3387fec4bb55876b + sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" url: "https://pub.dev" source: hosted - version: "6.1.9" + version: "6.1.10" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "3e2f6dfd2c7d9cd123296cab8ef66cfc2c1a13f5845f42c7a0f365690a8a7dd1" + sha256: "1f4d9ebe86f333c15d318f81dcdc08b01d45da44af74552608455ebdc08d9732" url: "https://pub.dev" source: hosted - version: "6.0.23" + version: "6.0.24" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "0a5af0aefdd8cf820dd739886efb1637f1f24489900204f50984634c07a54815" + sha256: c9cd648d2f7ab56968e049d4e9116f96a85517f1dd806b96a86ea1018a3a82e5 url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.1.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "318c42cba924e18180c029be69caf0a1a710191b9ec49bb42b5998fdcccee3cc" + sha256: e29039160ab3730e42f3d811dc2a6d5f2864b90a70fb765ea60144b03307f682 url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "41988b55570df53b3dd2a7fc90c76756a963de6a8c5f8e113330cb35992e2094" + sha256: "2dddb3291a57b074dade66b5e07e64401dd2487caefd4e9e2f467138d8c7eb06" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: "4eae912628763eb48fc214522e58e942fd16ce195407dbf45638239523c759a6" + sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "44d79408ce9f07052095ef1f9a693c258d6373dc3944249374e30eff7219ccb0" + sha256: "574cfbe2390666003c3a1d129bdc4574aaa6728f0c00a4829a81c316de69dd9b" url: "https://pub.dev" source: hosted - version: "2.0.14" + version: "2.0.15" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: b6217370f8eb1fd85c8890c539f5a639a01ab209a36db82c921ebeacefc7a615 + sha256: "97c9067950a0d09cbd93e2e3f0383d1403989362b97102fbf446473a48079a4b" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.4" uuid: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 4e47b661..969b02f5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: tachidesk_sorayomi description: A new Flutter frontend for Tachidesk. publish_to: "none" -version: 0.4.4+1 +version: 0.4.5+1 environment: sdk: ">=2.18.1 <3.0.0" @@ -30,7 +30,7 @@ dependencies: path_provider: ^2.0.11 permission_handler: ^10.2.0 pub_semver: ^2.1.2 - riverpod_annotation: ^1.0.6 + riverpod_annotation: ^2.0.0 scrollable_positioned_list: ^0.3.5 share_plus: ^6.2.0 shared_preferences: ^2.0.15 @@ -41,7 +41,7 @@ dev_dependencies: build_runner: ^2.3.2 # flutter_flavorizr: ^2.1.5 flutter_gen_runner: ^5.1.0+1 - flutter_launcher_icons: ^0.11.0 + flutter_launcher_icons: ^0.12.0 flutter_lints: ^2.0.1 flutter_native_splash: ^2.2.14 flutter_test: @@ -49,7 +49,7 @@ dev_dependencies: freezed: ^2.2.1 json_serializable: ^6.5.4 lints: ^2.0.1 - riverpod_generator: ^1.0.6 + riverpod_generator: ^2.0.0 flutter: uses-material-design: true