mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-01-14 22:29:32 +00:00
chore: update flutter and dependencies
This commit is contained in:
parent
06694f5f0b
commit
a520136e01
80 changed files with 7701 additions and 9141 deletions
|
|
@ -110,7 +110,7 @@ class ItemDownloadProgress extends _$ItemDownloadProgress {
|
|||
final totalDownloadedSize = downloadedSize + inProgressFileSize;
|
||||
final progress = totalDownloadedSize / totalSize;
|
||||
// if current progress is more than calculated progress, do not update
|
||||
if (progress < (state.valueOrNull ?? 0.0)) {
|
||||
if (progress < (state.value ?? 0.0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -6,24 +6,64 @@ part of 'search_controller.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
/// The controller for the search bar.
|
||||
|
||||
@ProviderFor(GlobalSearchController)
|
||||
final globalSearchControllerProvider = GlobalSearchControllerProvider._();
|
||||
|
||||
/// The controller for the search bar.
|
||||
final class GlobalSearchControllerProvider
|
||||
extends $NotifierProvider<GlobalSearchController, Raw<SearchController>> {
|
||||
/// The controller for the search bar.
|
||||
GlobalSearchControllerProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'globalSearchControllerProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$globalSearchControllerHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
GlobalSearchController create() => GlobalSearchController();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(Raw<SearchController> value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<Raw<SearchController>>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$globalSearchControllerHash() =>
|
||||
r'd854ace6f2e00a10fc33aba63051375f82ad1b10';
|
||||
|
||||
/// The controller for the search bar.
|
||||
///
|
||||
/// Copied from [GlobalSearchController].
|
||||
@ProviderFor(GlobalSearchController)
|
||||
final globalSearchControllerProvider =
|
||||
NotifierProvider<GlobalSearchController, Raw<SearchController>>.internal(
|
||||
GlobalSearchController.new,
|
||||
name: r'globalSearchControllerProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$globalSearchControllerHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$GlobalSearchController = Notifier<Raw<SearchController>>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
abstract class _$GlobalSearchController
|
||||
extends $Notifier<Raw<SearchController>> {
|
||||
Raw<SearchController> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref = this.ref as $Ref<Raw<SearchController>, Raw<SearchController>>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<Raw<SearchController>, Raw<SearchController>>,
|
||||
Raw<SearchController>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, build);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,186 +6,94 @@ part of 'search_result_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$searchResultHash() => r'33785de298ad0d53c9d21e8fec88ba2f22f1363f';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
/// The provider for the search result.
|
||||
///
|
||||
/// Copied from [searchResult].
|
||||
|
||||
@ProviderFor(searchResult)
|
||||
const searchResultProvider = SearchResultFamily();
|
||||
final searchResultProvider = SearchResultFamily._();
|
||||
|
||||
/// The provider for the search result.
|
||||
///
|
||||
/// Copied from [searchResult].
|
||||
class SearchResultFamily extends Family<AsyncValue<LibrarySearchResponse?>> {
|
||||
/// The provider for the search result.
|
||||
///
|
||||
/// Copied from [searchResult].
|
||||
const SearchResultFamily();
|
||||
|
||||
final class SearchResultProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
AsyncValue<LibrarySearchResponse?>,
|
||||
LibrarySearchResponse?,
|
||||
FutureOr<LibrarySearchResponse?>
|
||||
>
|
||||
with
|
||||
$FutureModifier<LibrarySearchResponse?>,
|
||||
$FutureProvider<LibrarySearchResponse?> {
|
||||
/// The provider for the search result.
|
||||
///
|
||||
/// Copied from [searchResult].
|
||||
SearchResultProvider call(
|
||||
String query, {
|
||||
int limit = 25,
|
||||
}) {
|
||||
return SearchResultProvider(
|
||||
query,
|
||||
limit: limit,
|
||||
);
|
||||
SearchResultProvider._({
|
||||
required SearchResultFamily super.from,
|
||||
required (String, {int limit}) super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'searchResultProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$searchResultHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'searchResultProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
SearchResultProvider getProviderOverride(
|
||||
covariant SearchResultProvider provider,
|
||||
) {
|
||||
return call(
|
||||
provider.query,
|
||||
limit: provider.limit,
|
||||
);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
$FutureProviderElement<LibrarySearchResponse?> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'searchResultProvider';
|
||||
}
|
||||
|
||||
/// The provider for the search result.
|
||||
///
|
||||
/// Copied from [searchResult].
|
||||
class SearchResultProvider
|
||||
extends AutoDisposeFutureProvider<LibrarySearchResponse?> {
|
||||
/// The provider for the search result.
|
||||
///
|
||||
/// Copied from [searchResult].
|
||||
SearchResultProvider(
|
||||
String query, {
|
||||
int limit = 25,
|
||||
}) : this._internal(
|
||||
(ref) => searchResult(
|
||||
ref as SearchResultRef,
|
||||
query,
|
||||
limit: limit,
|
||||
),
|
||||
from: searchResultProvider,
|
||||
name: r'searchResultProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$searchResultHash,
|
||||
dependencies: SearchResultFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
SearchResultFamily._allTransitiveDependencies,
|
||||
query: query,
|
||||
limit: limit,
|
||||
);
|
||||
|
||||
SearchResultProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.query,
|
||||
required this.limit,
|
||||
}) : super.internal();
|
||||
|
||||
final String query;
|
||||
final int limit;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<LibrarySearchResponse?> Function(SearchResultRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: SearchResultProvider._internal(
|
||||
(ref) => create(ref as SearchResultRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
query: query,
|
||||
limit: limit,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<LibrarySearchResponse?> createElement() {
|
||||
return _SearchResultProviderElement(this);
|
||||
FutureOr<LibrarySearchResponse?> create(Ref ref) {
|
||||
final argument = this.argument as (String, {int limit});
|
||||
return searchResult(ref, argument.$1, limit: argument.limit);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is SearchResultProvider &&
|
||||
other.query == query &&
|
||||
other.limit == limit;
|
||||
return other is SearchResultProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, query.hashCode);
|
||||
hash = _SystemHash.combine(hash, limit.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin SearchResultRef on AutoDisposeFutureProviderRef<LibrarySearchResponse?> {
|
||||
/// The parameter `query` of this provider.
|
||||
String get query;
|
||||
String _$searchResultHash() => r'33785de298ad0d53c9d21e8fec88ba2f22f1363f';
|
||||
|
||||
/// The parameter `limit` of this provider.
|
||||
int get limit;
|
||||
}
|
||||
/// The provider for the search result.
|
||||
|
||||
class _SearchResultProviderElement
|
||||
extends AutoDisposeFutureProviderElement<LibrarySearchResponse?>
|
||||
with SearchResultRef {
|
||||
_SearchResultProviderElement(super.provider);
|
||||
final class SearchResultFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<
|
||||
FutureOr<LibrarySearchResponse?>,
|
||||
(String, {int limit})
|
||||
> {
|
||||
SearchResultFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'searchResultProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
/// The provider for the search result.
|
||||
|
||||
SearchResultProvider call(String query, {int limit = 25}) =>
|
||||
SearchResultProvider._(argument: (query, limit: limit), from: this);
|
||||
|
||||
@override
|
||||
String get query => (origin as SearchResultProvider).query;
|
||||
@override
|
||||
int get limit => (origin as SearchResultProvider).limit;
|
||||
String toString() => r'searchResultProvider';
|
||||
}
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ class BookSearchResultMini extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final item = ref.watch(libraryItemProvider(book.libraryItemId)).valueOrNull;
|
||||
final item = ref.watch(libraryItemProvider(book.libraryItemId)).value;
|
||||
final image = item == null
|
||||
? const AsyncValue.loading()
|
||||
: ref.watch(coverImageProvider(item.id));
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class LibraryItemActions extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
||||
final item = ref.watch(libraryItemProvider(id)).value;
|
||||
if (item == null) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
|
@ -216,7 +216,7 @@ class LibItemDownloadButton extends HookConsumerWidget {
|
|||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final isItemDownloaded = ref.watch(isItemDownloadedProvider(item));
|
||||
if (isItemDownloaded.valueOrNull ?? false) {
|
||||
if (isItemDownloaded.value ?? false) {
|
||||
return AlreadyItemDownloadedButton(item: item);
|
||||
}
|
||||
final isItemDownloading = ref.watch(isItemDownloadingProvider(item.id));
|
||||
|
|
@ -252,7 +252,7 @@ class ItemCurrentlyInDownloadQueue extends HookConsumerWidget {
|
|||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final progress = ref
|
||||
.watch(itemDownloadProgressProvider(item.id))
|
||||
.valueOrNull
|
||||
.value
|
||||
?.clamp(0.05, 1.0);
|
||||
|
||||
if (progress == 1) {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class _BookDetails extends HookConsumerWidget {
|
|||
final itemFromApi = ref.watch(libraryItemProvider(id));
|
||||
|
||||
final itemBookMetadata =
|
||||
itemFromApi.valueOrNull?.media.metadata.asBookMetadataExpanded;
|
||||
itemFromApi.value?.media.metadata.asBookMetadataExpanded;
|
||||
|
||||
return Expanded(
|
||||
child: Padding(
|
||||
|
|
@ -143,7 +143,7 @@ class _LibraryItemProgressIndicator extends HookConsumerWidget {
|
|||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final player = ref.watch(audiobookPlayerProvider);
|
||||
final libraryItem = ref.watch(libraryItemProvider(id)).valueOrNull;
|
||||
final libraryItem = ref.watch(libraryItemProvider(id)).value;
|
||||
if (libraryItem == null) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
|
@ -362,7 +362,7 @@ class _BookCover extends HookConsumerWidget {
|
|||
MediaQuery.of(context).highContrast,
|
||||
),
|
||||
)
|
||||
.valueOrNull;
|
||||
.value;
|
||||
}
|
||||
|
||||
return ThemeSwitcher(
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class LibraryItemMetadata extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
||||
final item = ref.watch(libraryItemProvider(id)).value;
|
||||
|
||||
/// formats the duration of the book as `10h 30m`
|
||||
///
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ class LibraryItemDescription extends HookConsumerWidget {
|
|||
final String id;
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
||||
final item = ref.watch(libraryItemProvider(id)).value;
|
||||
if (item == null) {
|
||||
return const SizedBox();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class LibraryItemSliverAppBar extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
||||
final item = ref.watch(libraryItemProvider(id)).value;
|
||||
|
||||
final showTitle = useState(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class LibraryBrowserPage extends HookConsumerWidget {
|
|||
const LibraryBrowserPage({super.key});
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final currentLibrary = ref.watch(currentLibraryProvider).valueOrNull;
|
||||
final currentLibrary = ref.watch(currentLibraryProvider).value;
|
||||
|
||||
// Determine the icon to use, with a fallback
|
||||
final IconData libraryIconData =
|
||||
|
|
|
|||
|
|
@ -6,20 +6,48 @@ part of 'logs_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(Logs)
|
||||
final logsProvider = LogsProvider._();
|
||||
|
||||
final class LogsProvider extends $AsyncNotifierProvider<Logs, List<LogRecord>> {
|
||||
LogsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'logsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$logsHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
Logs create() => Logs();
|
||||
}
|
||||
|
||||
String _$logsHash() => r'aa9d3d56586cba6ddf69615320ea605d071ea5e2';
|
||||
|
||||
/// See also [Logs].
|
||||
@ProviderFor(Logs)
|
||||
final logsProvider =
|
||||
AutoDisposeAsyncNotifierProvider<Logs, List<LogRecord>>.internal(
|
||||
Logs.new,
|
||||
name: r'logsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$logsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$Logs = AutoDisposeAsyncNotifier<List<LogRecord>>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
abstract class _$Logs extends $AsyncNotifier<List<LogRecord>> {
|
||||
FutureOr<List<LogRecord>> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref = this.ref as $Ref<AsyncValue<List<LogRecord>>, List<LogRecord>>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<AsyncValue<List<LogRecord>>, List<LogRecord>>,
|
||||
AsyncValue<List<LogRecord>>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, build);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import 'package:freezed_annotation/freezed_annotation.dart';
|
|||
part 'flow.freezed.dart';
|
||||
|
||||
@freezed
|
||||
class Flow with _$Flow {
|
||||
sealed class Flow with _$Flow {
|
||||
const factory Flow({
|
||||
required Uri serverUri,
|
||||
required String state,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,241 +9,272 @@ part of 'flow.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Flow {
|
||||
Uri get serverUri => throw _privateConstructorUsedError;
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
String get verifier => throw _privateConstructorUsedError;
|
||||
Cookie get cookie => throw _privateConstructorUsedError;
|
||||
bool get isFlowComplete => throw _privateConstructorUsedError;
|
||||
String? get authToken => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of Flow
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$FlowCopyWith<Flow> get copyWith => throw _privateConstructorUsedError;
|
||||
Uri get serverUri; String get state; String get verifier; Cookie get cookie; bool get isFlowComplete; String? get authToken;
|
||||
/// Create a copy of Flow
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$FlowCopyWith<Flow> get copyWith => _$FlowCopyWithImpl<Flow>(this as Flow, _$identity);
|
||||
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is Flow&&(identical(other.serverUri, serverUri) || other.serverUri == serverUri)&&(identical(other.state, state) || other.state == state)&&(identical(other.verifier, verifier) || other.verifier == verifier)&&(identical(other.cookie, cookie) || other.cookie == cookie)&&(identical(other.isFlowComplete, isFlowComplete) || other.isFlowComplete == isFlowComplete)&&(identical(other.authToken, authToken) || other.authToken == authToken));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,serverUri,state,verifier,cookie,isFlowComplete,authToken);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Flow(serverUri: $serverUri, state: $state, verifier: $verifier, cookie: $cookie, isFlowComplete: $isFlowComplete, authToken: $authToken)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FlowCopyWith<$Res> {
|
||||
factory $FlowCopyWith(Flow value, $Res Function(Flow) then) =
|
||||
_$FlowCopyWithImpl<$Res, Flow>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{Uri serverUri,
|
||||
String state,
|
||||
String verifier,
|
||||
Cookie cookie,
|
||||
bool isFlowComplete,
|
||||
String? authToken});
|
||||
}
|
||||
abstract mixin class $FlowCopyWith<$Res> {
|
||||
factory $FlowCopyWith(Flow value, $Res Function(Flow) _then) = _$FlowCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
Uri serverUri, String state, String verifier, Cookie cookie, bool isFlowComplete, String? authToken
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$FlowCopyWithImpl<$Res, $Val extends Flow>
|
||||
class _$FlowCopyWithImpl<$Res>
|
||||
implements $FlowCopyWith<$Res> {
|
||||
_$FlowCopyWithImpl(this._value, this._then);
|
||||
_$FlowCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final Flow _self;
|
||||
final $Res Function(Flow) _then;
|
||||
|
||||
/// Create a copy of Flow
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? serverUri = null,
|
||||
Object? state = null,
|
||||
Object? verifier = null,
|
||||
Object? cookie = null,
|
||||
Object? isFlowComplete = null,
|
||||
Object? authToken = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
serverUri: null == serverUri
|
||||
? _value.serverUri
|
||||
: serverUri // ignore: cast_nullable_to_non_nullable
|
||||
as Uri,
|
||||
state: null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
verifier: null == verifier
|
||||
? _value.verifier
|
||||
: verifier // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
cookie: null == cookie
|
||||
? _value.cookie
|
||||
: cookie // ignore: cast_nullable_to_non_nullable
|
||||
as Cookie,
|
||||
isFlowComplete: null == isFlowComplete
|
||||
? _value.isFlowComplete
|
||||
: isFlowComplete // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
authToken: freezed == authToken
|
||||
? _value.authToken
|
||||
: authToken // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
}
|
||||
/// Create a copy of Flow
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? serverUri = null,Object? state = null,Object? verifier = null,Object? cookie = null,Object? isFlowComplete = null,Object? authToken = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
serverUri: null == serverUri ? _self.serverUri : serverUri // ignore: cast_nullable_to_non_nullable
|
||||
as Uri,state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
|
||||
as String,verifier: null == verifier ? _self.verifier : verifier // ignore: cast_nullable_to_non_nullable
|
||||
as String,cookie: null == cookie ? _self.cookie : cookie // ignore: cast_nullable_to_non_nullable
|
||||
as Cookie,isFlowComplete: null == isFlowComplete ? _self.isFlowComplete : isFlowComplete // ignore: cast_nullable_to_non_nullable
|
||||
as bool,authToken: freezed == authToken ? _self.authToken : authToken // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FlowImplCopyWith<$Res> implements $FlowCopyWith<$Res> {
|
||||
factory _$$FlowImplCopyWith(
|
||||
_$FlowImpl value, $Res Function(_$FlowImpl) then) =
|
||||
__$$FlowImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{Uri serverUri,
|
||||
String state,
|
||||
String verifier,
|
||||
Cookie cookie,
|
||||
bool isFlowComplete,
|
||||
String? authToken});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FlowImplCopyWithImpl<$Res>
|
||||
extends _$FlowCopyWithImpl<$Res, _$FlowImpl>
|
||||
implements _$$FlowImplCopyWith<$Res> {
|
||||
__$$FlowImplCopyWithImpl(_$FlowImpl _value, $Res Function(_$FlowImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Flow
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? serverUri = null,
|
||||
Object? state = null,
|
||||
Object? verifier = null,
|
||||
Object? cookie = null,
|
||||
Object? isFlowComplete = null,
|
||||
Object? authToken = freezed,
|
||||
}) {
|
||||
return _then(_$FlowImpl(
|
||||
serverUri: null == serverUri
|
||||
? _value.serverUri
|
||||
: serverUri // ignore: cast_nullable_to_non_nullable
|
||||
as Uri,
|
||||
state: null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
verifier: null == verifier
|
||||
? _value.verifier
|
||||
: verifier // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
cookie: null == cookie
|
||||
? _value.cookie
|
||||
: cookie // ignore: cast_nullable_to_non_nullable
|
||||
as Cookie,
|
||||
isFlowComplete: null == isFlowComplete
|
||||
? _value.isFlowComplete
|
||||
: isFlowComplete // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
authToken: freezed == authToken
|
||||
? _value.authToken
|
||||
: authToken // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
/// Adds pattern-matching-related methods to [Flow].
|
||||
extension FlowPatterns on Flow {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Flow value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _Flow() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Flow value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _Flow():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Flow value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _Flow() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( Uri serverUri, String state, String verifier, Cookie cookie, bool isFlowComplete, String? authToken)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Flow() when $default != null:
|
||||
return $default(_that.serverUri,_that.state,_that.verifier,_that.cookie,_that.isFlowComplete,_that.authToken);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( Uri serverUri, String state, String verifier, Cookie cookie, bool isFlowComplete, String? authToken) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Flow():
|
||||
return $default(_that.serverUri,_that.state,_that.verifier,_that.cookie,_that.isFlowComplete,_that.authToken);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( Uri serverUri, String state, String verifier, Cookie cookie, bool isFlowComplete, String? authToken)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Flow() when $default != null:
|
||||
return $default(_that.serverUri,_that.state,_that.verifier,_that.cookie,_that.isFlowComplete,_that.authToken);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$FlowImpl implements _Flow {
|
||||
const _$FlowImpl(
|
||||
{required this.serverUri,
|
||||
required this.state,
|
||||
required this.verifier,
|
||||
required this.cookie,
|
||||
this.isFlowComplete = false,
|
||||
this.authToken});
|
||||
|
||||
@override
|
||||
final Uri serverUri;
|
||||
@override
|
||||
final String state;
|
||||
@override
|
||||
final String verifier;
|
||||
@override
|
||||
final Cookie cookie;
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool isFlowComplete;
|
||||
@override
|
||||
final String? authToken;
|
||||
class _Flow implements Flow {
|
||||
const _Flow({required this.serverUri, required this.state, required this.verifier, required this.cookie, this.isFlowComplete = false, this.authToken});
|
||||
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Flow(serverUri: $serverUri, state: $state, verifier: $verifier, cookie: $cookie, isFlowComplete: $isFlowComplete, authToken: $authToken)';
|
||||
}
|
||||
@override final Uri serverUri;
|
||||
@override final String state;
|
||||
@override final String verifier;
|
||||
@override final Cookie cookie;
|
||||
@override@JsonKey() final bool isFlowComplete;
|
||||
@override final String? authToken;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FlowImpl &&
|
||||
(identical(other.serverUri, serverUri) ||
|
||||
other.serverUri == serverUri) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.verifier, verifier) ||
|
||||
other.verifier == verifier) &&
|
||||
(identical(other.cookie, cookie) || other.cookie == cookie) &&
|
||||
(identical(other.isFlowComplete, isFlowComplete) ||
|
||||
other.isFlowComplete == isFlowComplete) &&
|
||||
(identical(other.authToken, authToken) ||
|
||||
other.authToken == authToken));
|
||||
}
|
||||
/// Create a copy of Flow
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$FlowCopyWith<_Flow> get copyWith => __$FlowCopyWithImpl<_Flow>(this, _$identity);
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, serverUri, state, verifier,
|
||||
cookie, isFlowComplete, authToken);
|
||||
|
||||
/// Create a copy of Flow
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FlowImplCopyWith<_$FlowImpl> get copyWith =>
|
||||
__$$FlowImplCopyWithImpl<_$FlowImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Flow&&(identical(other.serverUri, serverUri) || other.serverUri == serverUri)&&(identical(other.state, state) || other.state == state)&&(identical(other.verifier, verifier) || other.verifier == verifier)&&(identical(other.cookie, cookie) || other.cookie == cookie)&&(identical(other.isFlowComplete, isFlowComplete) || other.isFlowComplete == isFlowComplete)&&(identical(other.authToken, authToken) || other.authToken == authToken));
|
||||
}
|
||||
|
||||
abstract class _Flow implements Flow {
|
||||
const factory _Flow(
|
||||
{required final Uri serverUri,
|
||||
required final String state,
|
||||
required final String verifier,
|
||||
required final Cookie cookie,
|
||||
final bool isFlowComplete,
|
||||
final String? authToken}) = _$FlowImpl;
|
||||
|
||||
@override
|
||||
Uri get serverUri;
|
||||
@override
|
||||
String get state;
|
||||
@override
|
||||
String get verifier;
|
||||
@override
|
||||
Cookie get cookie;
|
||||
@override
|
||||
bool get isFlowComplete;
|
||||
@override
|
||||
String? get authToken;
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,serverUri,state,verifier,cookie,isFlowComplete,authToken);
|
||||
|
||||
/// Create a copy of Flow
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FlowImplCopyWith<_$FlowImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
@override
|
||||
String toString() {
|
||||
return 'Flow(serverUri: $serverUri, state: $state, verifier: $verifier, cookie: $cookie, isFlowComplete: $isFlowComplete, authToken: $authToken)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$FlowCopyWith<$Res> implements $FlowCopyWith<$Res> {
|
||||
factory _$FlowCopyWith(_Flow value, $Res Function(_Flow) _then) = __$FlowCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
Uri serverUri, String state, String verifier, Cookie cookie, bool isFlowComplete, String? authToken
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$FlowCopyWithImpl<$Res>
|
||||
implements _$FlowCopyWith<$Res> {
|
||||
__$FlowCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _Flow _self;
|
||||
final $Res Function(_Flow) _then;
|
||||
|
||||
/// Create a copy of Flow
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? serverUri = null,Object? state = null,Object? verifier = null,Object? cookie = null,Object? isFlowComplete = null,Object? authToken = freezed,}) {
|
||||
return _then(_Flow(
|
||||
serverUri: null == serverUri ? _self.serverUri : serverUri // ignore: cast_nullable_to_non_nullable
|
||||
as Uri,state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
|
||||
as String,verifier: null == verifier ? _self.verifier : verifier // ignore: cast_nullable_to_non_nullable
|
||||
as String,cookie: null == cookie ? _self.cookie : cookie // ignore: cast_nullable_to_non_nullable
|
||||
as Cookie,isFlowComplete: null == isFlowComplete ? _self.isFlowComplete : isFlowComplete // ignore: cast_nullable_to_non_nullable
|
||||
as bool,authToken: freezed == authToken ? _self.authToken : authToken // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,221 +6,167 @@ part of 'oauth_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$loginInExchangeForCodeHash() =>
|
||||
r'bfc3945529048a0f536052fd5579b76457560fcd';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
@ProviderFor(OauthFlows)
|
||||
final oauthFlowsProvider = OauthFlowsProvider._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
///
|
||||
/// Copied from [loginInExchangeForCode].
|
||||
@ProviderFor(loginInExchangeForCode)
|
||||
const loginInExchangeForCodeProvider = LoginInExchangeForCodeFamily();
|
||||
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
///
|
||||
/// Copied from [loginInExchangeForCode].
|
||||
class LoginInExchangeForCodeFamily extends Family<AsyncValue<String?>> {
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
///
|
||||
/// Copied from [loginInExchangeForCode].
|
||||
const LoginInExchangeForCodeFamily();
|
||||
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
///
|
||||
/// Copied from [loginInExchangeForCode].
|
||||
LoginInExchangeForCodeProvider call({
|
||||
required String oauthState,
|
||||
required String code,
|
||||
ErrorResponseHandler? responseHandler,
|
||||
}) {
|
||||
return LoginInExchangeForCodeProvider(
|
||||
oauthState: oauthState,
|
||||
code: code,
|
||||
responseHandler: responseHandler,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
LoginInExchangeForCodeProvider getProviderOverride(
|
||||
covariant LoginInExchangeForCodeProvider provider,
|
||||
) {
|
||||
return call(
|
||||
oauthState: provider.oauthState,
|
||||
code: provider.code,
|
||||
responseHandler: provider.responseHandler,
|
||||
);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'loginInExchangeForCodeProvider';
|
||||
}
|
||||
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
///
|
||||
/// Copied from [loginInExchangeForCode].
|
||||
class LoginInExchangeForCodeProvider
|
||||
extends AutoDisposeFutureProvider<String?> {
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
///
|
||||
/// Copied from [loginInExchangeForCode].
|
||||
LoginInExchangeForCodeProvider({
|
||||
required String oauthState,
|
||||
required String code,
|
||||
ErrorResponseHandler? responseHandler,
|
||||
}) : this._internal(
|
||||
(ref) => loginInExchangeForCode(
|
||||
ref as LoginInExchangeForCodeRef,
|
||||
oauthState: oauthState,
|
||||
code: code,
|
||||
responseHandler: responseHandler,
|
||||
),
|
||||
from: loginInExchangeForCodeProvider,
|
||||
name: r'loginInExchangeForCodeProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$loginInExchangeForCodeHash,
|
||||
dependencies: LoginInExchangeForCodeFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
LoginInExchangeForCodeFamily._allTransitiveDependencies,
|
||||
oauthState: oauthState,
|
||||
code: code,
|
||||
responseHandler: responseHandler,
|
||||
);
|
||||
|
||||
LoginInExchangeForCodeProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.oauthState,
|
||||
required this.code,
|
||||
required this.responseHandler,
|
||||
}) : super.internal();
|
||||
|
||||
final String oauthState;
|
||||
final String code;
|
||||
final ErrorResponseHandler? responseHandler;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<String?> Function(LoginInExchangeForCodeRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: LoginInExchangeForCodeProvider._internal(
|
||||
(ref) => create(ref as LoginInExchangeForCodeRef),
|
||||
from: from,
|
||||
name: null,
|
||||
final class OauthFlowsProvider
|
||||
extends $NotifierProvider<OauthFlows, Map<State, Flow>> {
|
||||
OauthFlowsProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'oauthFlowsProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
oauthState: oauthState,
|
||||
code: code,
|
||||
responseHandler: responseHandler,
|
||||
),
|
||||
);
|
||||
}
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<String?> createElement() {
|
||||
return _LoginInExchangeForCodeProviderElement(this);
|
||||
String debugGetCreateSourceHash() => _$oauthFlowsHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
OauthFlows create() => OauthFlows();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(Map<State, Flow> value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<Map<State, Flow>>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$oauthFlowsHash() => r'4e278baa0bf26f2a10694ca2caadb68dd5b6156f';
|
||||
|
||||
abstract class _$OauthFlows extends $Notifier<Map<State, Flow>> {
|
||||
Map<State, Flow> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref = this.ref as $Ref<Map<State, Flow>, Map<State, Flow>>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<Map<State, Flow>, Map<State, Flow>>,
|
||||
Map<State, Flow>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, build);
|
||||
}
|
||||
}
|
||||
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
|
||||
@ProviderFor(loginInExchangeForCode)
|
||||
final loginInExchangeForCodeProvider = LoginInExchangeForCodeFamily._();
|
||||
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
|
||||
final class LoginInExchangeForCodeProvider
|
||||
extends $FunctionalProvider<AsyncValue<String?>, String?, FutureOr<String?>>
|
||||
with $FutureModifier<String?>, $FutureProvider<String?> {
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
LoginInExchangeForCodeProvider._({
|
||||
required LoginInExchangeForCodeFamily super.from,
|
||||
required ({
|
||||
State oauthState,
|
||||
Code code,
|
||||
ErrorResponseHandler? responseHandler,
|
||||
})
|
||||
super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'loginInExchangeForCodeProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$loginInExchangeForCodeHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'loginInExchangeForCodeProvider'
|
||||
''
|
||||
'$argument';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$FutureProviderElement<String?> $createElement($ProviderPointer pointer) =>
|
||||
$FutureProviderElement(pointer);
|
||||
|
||||
@override
|
||||
FutureOr<String?> create(Ref ref) {
|
||||
final argument =
|
||||
this.argument
|
||||
as ({
|
||||
State oauthState,
|
||||
Code code,
|
||||
ErrorResponseHandler? responseHandler,
|
||||
});
|
||||
return loginInExchangeForCode(
|
||||
ref,
|
||||
oauthState: argument.oauthState,
|
||||
code: argument.code,
|
||||
responseHandler: argument.responseHandler,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is LoginInExchangeForCodeProvider &&
|
||||
other.oauthState == oauthState &&
|
||||
other.code == code &&
|
||||
other.responseHandler == responseHandler;
|
||||
other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, oauthState.hashCode);
|
||||
hash = _SystemHash.combine(hash, code.hashCode);
|
||||
hash = _SystemHash.combine(hash, responseHandler.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin LoginInExchangeForCodeRef on AutoDisposeFutureProviderRef<String?> {
|
||||
/// The parameter `oauthState` of this provider.
|
||||
String get oauthState;
|
||||
String _$loginInExchangeForCodeHash() =>
|
||||
r'bfc3945529048a0f536052fd5579b76457560fcd';
|
||||
|
||||
/// The parameter `code` of this provider.
|
||||
String get code;
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
|
||||
/// The parameter `responseHandler` of this provider.
|
||||
ErrorResponseHandler? get responseHandler;
|
||||
final class LoginInExchangeForCodeFamily extends $Family
|
||||
with
|
||||
$FunctionalFamilyOverride<
|
||||
FutureOr<String?>,
|
||||
({State oauthState, Code code, ErrorResponseHandler? responseHandler})
|
||||
> {
|
||||
LoginInExchangeForCodeFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'loginInExchangeForCodeProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
/// the code returned by the server in exchange for the verifier
|
||||
|
||||
LoginInExchangeForCodeProvider call({
|
||||
required State oauthState,
|
||||
required Code code,
|
||||
ErrorResponseHandler? responseHandler,
|
||||
}) => LoginInExchangeForCodeProvider._(
|
||||
argument: (
|
||||
oauthState: oauthState,
|
||||
code: code,
|
||||
responseHandler: responseHandler,
|
||||
),
|
||||
from: this,
|
||||
);
|
||||
|
||||
@override
|
||||
String toString() => r'loginInExchangeForCodeProvider';
|
||||
}
|
||||
|
||||
class _LoginInExchangeForCodeProviderElement
|
||||
extends AutoDisposeFutureProviderElement<String?>
|
||||
with LoginInExchangeForCodeRef {
|
||||
_LoginInExchangeForCodeProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get oauthState =>
|
||||
(origin as LoginInExchangeForCodeProvider).oauthState;
|
||||
@override
|
||||
String get code => (origin as LoginInExchangeForCodeProvider).code;
|
||||
@override
|
||||
ErrorResponseHandler? get responseHandler =>
|
||||
(origin as LoginInExchangeForCodeProvider).responseHandler;
|
||||
}
|
||||
|
||||
String _$oauthFlowsHash() => r'4e278baa0bf26f2a10694ca2caadb68dd5b6156f';
|
||||
|
||||
/// See also [OauthFlows].
|
||||
@ProviderFor(OauthFlows)
|
||||
final oauthFlowsProvider =
|
||||
NotifierProvider<OauthFlows, Map<State, Flow>>.internal(
|
||||
OauthFlows.new,
|
||||
name: r'oauthFlowsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$oauthFlowsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$OauthFlows = Notifier<Map<State, Flow>>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part 'book_settings.g.dart';
|
|||
|
||||
/// per book settings
|
||||
@freezed
|
||||
class BookSettings with _$BookSettings {
|
||||
sealed class BookSettings with _$BookSettings {
|
||||
const factory BookSettings({
|
||||
required String bookId,
|
||||
@Default(NullablePlayerSettings()) NullablePlayerSettings playerSettings,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,195 +9,284 @@ part of 'book_settings.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
BookSettings _$BookSettingsFromJson(Map<String, dynamic> json) {
|
||||
return _BookSettings.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$BookSettings {
|
||||
String get bookId => throw _privateConstructorUsedError;
|
||||
NullablePlayerSettings get playerSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
String get bookId; NullablePlayerSettings get playerSettings;
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$BookSettingsCopyWith<BookSettings> get copyWith => _$BookSettingsCopyWithImpl<BookSettings>(this as BookSettings, _$identity);
|
||||
|
||||
/// Serializes this BookSettings to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is BookSettings&&(identical(other.bookId, bookId) || other.bookId == bookId)&&(identical(other.playerSettings, playerSettings) || other.playerSettings == playerSettings));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,bookId,playerSettings);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BookSettings(bookId: $bookId, playerSettings: $playerSettings)';
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$BookSettingsCopyWith<BookSettings> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $BookSettingsCopyWith<$Res> {
|
||||
factory $BookSettingsCopyWith(
|
||||
BookSettings value, $Res Function(BookSettings) then) =
|
||||
_$BookSettingsCopyWithImpl<$Res, BookSettings>;
|
||||
@useResult
|
||||
$Res call({String bookId, NullablePlayerSettings playerSettings});
|
||||
abstract mixin class $BookSettingsCopyWith<$Res> {
|
||||
factory $BookSettingsCopyWith(BookSettings value, $Res Function(BookSettings) _then) = _$BookSettingsCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String bookId, NullablePlayerSettings playerSettings
|
||||
});
|
||||
|
||||
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
||||
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$BookSettingsCopyWithImpl<$Res, $Val extends BookSettings>
|
||||
class _$BookSettingsCopyWithImpl<$Res>
|
||||
implements $BookSettingsCopyWith<$Res> {
|
||||
_$BookSettingsCopyWithImpl(this._value, this._then);
|
||||
_$BookSettingsCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final BookSettings _self;
|
||||
final $Res Function(BookSettings) _then;
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? bookId = null,
|
||||
Object? playerSettings = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
bookId: null == bookId
|
||||
? _value.bookId
|
||||
: bookId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
playerSettings: null == playerSettings
|
||||
? _value.playerSettings
|
||||
: playerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as NullablePlayerSettings,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings {
|
||||
return $NullablePlayerSettingsCopyWith<$Res>(_value.playerSettings,
|
||||
(value) {
|
||||
return _then(_value.copyWith(playerSettings: value) as $Val);
|
||||
});
|
||||
}
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? bookId = null,Object? playerSettings = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
bookId: null == bookId ? _self.bookId : bookId // ignore: cast_nullable_to_non_nullable
|
||||
as String,playerSettings: null == playerSettings ? _self.playerSettings : playerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as NullablePlayerSettings,
|
||||
));
|
||||
}
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings {
|
||||
|
||||
return $NullablePlayerSettingsCopyWith<$Res>(_self.playerSettings, (value) {
|
||||
return _then(_self.copyWith(playerSettings: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$BookSettingsImplCopyWith<$Res>
|
||||
implements $BookSettingsCopyWith<$Res> {
|
||||
factory _$$BookSettingsImplCopyWith(
|
||||
_$BookSettingsImpl value, $Res Function(_$BookSettingsImpl) then) =
|
||||
__$$BookSettingsImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String bookId, NullablePlayerSettings playerSettings});
|
||||
|
||||
@override
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
||||
/// Adds pattern-matching-related methods to [BookSettings].
|
||||
extension BookSettingsPatterns on BookSettings {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _BookSettings value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _BookSettings value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _BookSettings value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String bookId, NullablePlayerSettings playerSettings)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings() when $default != null:
|
||||
return $default(_that.bookId,_that.playerSettings);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String bookId, NullablePlayerSettings playerSettings) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings():
|
||||
return $default(_that.bookId,_that.playerSettings);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String bookId, NullablePlayerSettings playerSettings)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings() when $default != null:
|
||||
return $default(_that.bookId,_that.playerSettings);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$BookSettingsImplCopyWithImpl<$Res>
|
||||
extends _$BookSettingsCopyWithImpl<$Res, _$BookSettingsImpl>
|
||||
implements _$$BookSettingsImplCopyWith<$Res> {
|
||||
__$$BookSettingsImplCopyWithImpl(
|
||||
_$BookSettingsImpl _value, $Res Function(_$BookSettingsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? bookId = null,
|
||||
Object? playerSettings = null,
|
||||
}) {
|
||||
return _then(_$BookSettingsImpl(
|
||||
bookId: null == bookId
|
||||
? _value.bookId
|
||||
: bookId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
playerSettings: null == playerSettings
|
||||
? _value.playerSettings
|
||||
: playerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as NullablePlayerSettings,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$BookSettingsImpl implements _BookSettings {
|
||||
const _$BookSettingsImpl(
|
||||
{required this.bookId,
|
||||
this.playerSettings = const NullablePlayerSettings()});
|
||||
|
||||
factory _$BookSettingsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$BookSettingsImplFromJson(json);
|
||||
class _BookSettings implements BookSettings {
|
||||
const _BookSettings({required this.bookId, this.playerSettings = const NullablePlayerSettings()});
|
||||
factory _BookSettings.fromJson(Map<String, dynamic> json) => _$BookSettingsFromJson(json);
|
||||
|
||||
@override
|
||||
final String bookId;
|
||||
@override
|
||||
@JsonKey()
|
||||
final NullablePlayerSettings playerSettings;
|
||||
@override final String bookId;
|
||||
@override@JsonKey() final NullablePlayerSettings playerSettings;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BookSettings(bookId: $bookId, playerSettings: $playerSettings)';
|
||||
}
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$BookSettingsCopyWith<_BookSettings> get copyWith => __$BookSettingsCopyWithImpl<_BookSettings>(this, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$BookSettingsImpl &&
|
||||
(identical(other.bookId, bookId) || other.bookId == bookId) &&
|
||||
(identical(other.playerSettings, playerSettings) ||
|
||||
other.playerSettings == playerSettings));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, bookId, playerSettings);
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$BookSettingsImplCopyWith<_$BookSettingsImpl> get copyWith =>
|
||||
__$$BookSettingsImplCopyWithImpl<_$BookSettingsImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$BookSettingsImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$BookSettingsToJson(this, );
|
||||
}
|
||||
|
||||
abstract class _BookSettings implements BookSettings {
|
||||
const factory _BookSettings(
|
||||
{required final String bookId,
|
||||
final NullablePlayerSettings playerSettings}) = _$BookSettingsImpl;
|
||||
|
||||
factory _BookSettings.fromJson(Map<String, dynamic> json) =
|
||||
_$BookSettingsImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get bookId;
|
||||
@override
|
||||
NullablePlayerSettings get playerSettings;
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$BookSettingsImplCopyWith<_$BookSettingsImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BookSettings&&(identical(other.bookId, bookId) || other.bookId == bookId)&&(identical(other.playerSettings, playerSettings) || other.playerSettings == playerSettings));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,bookId,playerSettings);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BookSettings(bookId: $bookId, playerSettings: $playerSettings)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$BookSettingsCopyWith<$Res> implements $BookSettingsCopyWith<$Res> {
|
||||
factory _$BookSettingsCopyWith(_BookSettings value, $Res Function(_BookSettings) _then) = __$BookSettingsCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String bookId, NullablePlayerSettings playerSettings
|
||||
});
|
||||
|
||||
|
||||
@override $NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$BookSettingsCopyWithImpl<$Res>
|
||||
implements _$BookSettingsCopyWith<$Res> {
|
||||
__$BookSettingsCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _BookSettings _self;
|
||||
final $Res Function(_BookSettings) _then;
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? bookId = null,Object? playerSettings = null,}) {
|
||||
return _then(_BookSettings(
|
||||
bookId: null == bookId ? _self.bookId : bookId // ignore: cast_nullable_to_non_nullable
|
||||
as String,playerSettings: null == playerSettings ? _self.playerSettings : playerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as NullablePlayerSettings,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings {
|
||||
|
||||
return $NullablePlayerSettingsCopyWith<$Res>(_self.playerSettings, (value) {
|
||||
return _then(_self.copyWith(playerSettings: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,16 +6,17 @@ part of 'book_settings.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$BookSettingsImpl _$$BookSettingsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$BookSettingsImpl(
|
||||
_BookSettings _$BookSettingsFromJson(Map<String, dynamic> json) =>
|
||||
_BookSettings(
|
||||
bookId: json['bookId'] as String,
|
||||
playerSettings: json['playerSettings'] == null
|
||||
? const NullablePlayerSettings()
|
||||
: NullablePlayerSettings.fromJson(
|
||||
json['playerSettings'] as Map<String, dynamic>),
|
||||
json['playerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$BookSettingsImplToJson(_$BookSettingsImpl instance) =>
|
||||
Map<String, dynamic> _$BookSettingsToJson(_BookSettings instance) =>
|
||||
<String, dynamic>{
|
||||
'bookId': instance.bookId,
|
||||
'playerSettings': instance.playerSettings,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ part 'nullable_player_settings.freezed.dart';
|
|||
part 'nullable_player_settings.g.dart';
|
||||
|
||||
@freezed
|
||||
class NullablePlayerSettings with _$NullablePlayerSettings {
|
||||
sealed class NullablePlayerSettings with _$NullablePlayerSettings {
|
||||
const factory NullablePlayerSettings({
|
||||
MinimizedPlayerSettings? miniPlayerSettings,
|
||||
ExpandedPlayerSettings? expandedPlayerSettings,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,369 +9,361 @@ part of 'nullable_player_settings.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
NullablePlayerSettings _$NullablePlayerSettingsFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _NullablePlayerSettings.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$NullablePlayerSettings {
|
||||
MinimizedPlayerSettings? get miniPlayerSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
ExpandedPlayerSettings? get expandedPlayerSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
double? get preferredDefaultVolume => throw _privateConstructorUsedError;
|
||||
double? get preferredDefaultSpeed => throw _privateConstructorUsedError;
|
||||
List<double>? get speedOptions => throw _privateConstructorUsedError;
|
||||
SleepTimerSettings? get sleepTimerSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
Duration? get playbackReportInterval => throw _privateConstructorUsedError;
|
||||
|
||||
MinimizedPlayerSettings? get miniPlayerSettings; ExpandedPlayerSettings? get expandedPlayerSettings; double? get preferredDefaultVolume; double? get preferredDefaultSpeed; List<double>? get speedOptions; SleepTimerSettings? get sleepTimerSettings; Duration? get playbackReportInterval;
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$NullablePlayerSettingsCopyWith<NullablePlayerSettings> get copyWith => _$NullablePlayerSettingsCopyWithImpl<NullablePlayerSettings>(this as NullablePlayerSettings, _$identity);
|
||||
|
||||
/// Serializes this NullablePlayerSettings to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is NullablePlayerSettings&&(identical(other.miniPlayerSettings, miniPlayerSettings) || other.miniPlayerSettings == miniPlayerSettings)&&(identical(other.expandedPlayerSettings, expandedPlayerSettings) || other.expandedPlayerSettings == expandedPlayerSettings)&&(identical(other.preferredDefaultVolume, preferredDefaultVolume) || other.preferredDefaultVolume == preferredDefaultVolume)&&(identical(other.preferredDefaultSpeed, preferredDefaultSpeed) || other.preferredDefaultSpeed == preferredDefaultSpeed)&&const DeepCollectionEquality().equals(other.speedOptions, speedOptions)&&(identical(other.sleepTimerSettings, sleepTimerSettings) || other.sleepTimerSettings == sleepTimerSettings)&&(identical(other.playbackReportInterval, playbackReportInterval) || other.playbackReportInterval == playbackReportInterval));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,miniPlayerSettings,expandedPlayerSettings,preferredDefaultVolume,preferredDefaultSpeed,const DeepCollectionEquality().hash(speedOptions),sleepTimerSettings,playbackReportInterval);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NullablePlayerSettings(miniPlayerSettings: $miniPlayerSettings, expandedPlayerSettings: $expandedPlayerSettings, preferredDefaultVolume: $preferredDefaultVolume, preferredDefaultSpeed: $preferredDefaultSpeed, speedOptions: $speedOptions, sleepTimerSettings: $sleepTimerSettings, playbackReportInterval: $playbackReportInterval)';
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$NullablePlayerSettingsCopyWith<NullablePlayerSettings> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $NullablePlayerSettingsCopyWith<$Res> {
|
||||
factory $NullablePlayerSettingsCopyWith(NullablePlayerSettings value,
|
||||
$Res Function(NullablePlayerSettings) then) =
|
||||
_$NullablePlayerSettingsCopyWithImpl<$Res, NullablePlayerSettings>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{MinimizedPlayerSettings? miniPlayerSettings,
|
||||
ExpandedPlayerSettings? expandedPlayerSettings,
|
||||
double? preferredDefaultVolume,
|
||||
double? preferredDefaultSpeed,
|
||||
List<double>? speedOptions,
|
||||
SleepTimerSettings? sleepTimerSettings,
|
||||
Duration? playbackReportInterval});
|
||||
abstract mixin class $NullablePlayerSettingsCopyWith<$Res> {
|
||||
factory $NullablePlayerSettingsCopyWith(NullablePlayerSettings value, $Res Function(NullablePlayerSettings) _then) = _$NullablePlayerSettingsCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval
|
||||
});
|
||||
|
||||
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
||||
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;
|
||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;
|
||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NullablePlayerSettingsCopyWithImpl<$Res,
|
||||
$Val extends NullablePlayerSettings>
|
||||
class _$NullablePlayerSettingsCopyWithImpl<$Res>
|
||||
implements $NullablePlayerSettingsCopyWith<$Res> {
|
||||
_$NullablePlayerSettingsCopyWithImpl(this._value, this._then);
|
||||
_$NullablePlayerSettingsCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final NullablePlayerSettings _self;
|
||||
final $Res Function(NullablePlayerSettings) _then;
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? miniPlayerSettings = freezed,
|
||||
Object? expandedPlayerSettings = freezed,
|
||||
Object? preferredDefaultVolume = freezed,
|
||||
Object? preferredDefaultSpeed = freezed,
|
||||
Object? speedOptions = freezed,
|
||||
Object? sleepTimerSettings = freezed,
|
||||
Object? playbackReportInterval = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
miniPlayerSettings: freezed == miniPlayerSettings
|
||||
? _value.miniPlayerSettings
|
||||
: miniPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as MinimizedPlayerSettings?,
|
||||
expandedPlayerSettings: freezed == expandedPlayerSettings
|
||||
? _value.expandedPlayerSettings
|
||||
: expandedPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as ExpandedPlayerSettings?,
|
||||
preferredDefaultVolume: freezed == preferredDefaultVolume
|
||||
? _value.preferredDefaultVolume
|
||||
: preferredDefaultVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
preferredDefaultSpeed: freezed == preferredDefaultSpeed
|
||||
? _value.preferredDefaultSpeed
|
||||
: preferredDefaultSpeed // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
speedOptions: freezed == speedOptions
|
||||
? _value.speedOptions
|
||||
: speedOptions // ignore: cast_nullable_to_non_nullable
|
||||
as List<double>?,
|
||||
sleepTimerSettings: freezed == sleepTimerSettings
|
||||
? _value.sleepTimerSettings
|
||||
: sleepTimerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as SleepTimerSettings?,
|
||||
playbackReportInterval: freezed == playbackReportInterval
|
||||
? _value.playbackReportInterval
|
||||
: playbackReportInterval // ignore: cast_nullable_to_non_nullable
|
||||
as Duration?,
|
||||
) as $Val);
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? miniPlayerSettings = freezed,Object? expandedPlayerSettings = freezed,Object? preferredDefaultVolume = freezed,Object? preferredDefaultSpeed = freezed,Object? speedOptions = freezed,Object? sleepTimerSettings = freezed,Object? playbackReportInterval = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
miniPlayerSettings: freezed == miniPlayerSettings ? _self.miniPlayerSettings : miniPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as MinimizedPlayerSettings?,expandedPlayerSettings: freezed == expandedPlayerSettings ? _self.expandedPlayerSettings : expandedPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as ExpandedPlayerSettings?,preferredDefaultVolume: freezed == preferredDefaultVolume ? _self.preferredDefaultVolume : preferredDefaultVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double?,preferredDefaultSpeed: freezed == preferredDefaultSpeed ? _self.preferredDefaultSpeed : preferredDefaultSpeed // ignore: cast_nullable_to_non_nullable
|
||||
as double?,speedOptions: freezed == speedOptions ? _self.speedOptions : speedOptions // ignore: cast_nullable_to_non_nullable
|
||||
as List<double>?,sleepTimerSettings: freezed == sleepTimerSettings ? _self.sleepTimerSettings : sleepTimerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as SleepTimerSettings?,playbackReportInterval: freezed == playbackReportInterval ? _self.playbackReportInterval : playbackReportInterval // ignore: cast_nullable_to_non_nullable
|
||||
as Duration?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings {
|
||||
if (_self.miniPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings {
|
||||
if (_value.miniPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $MinimizedPlayerSettingsCopyWith<$Res>(_value.miniPlayerSettings!,
|
||||
(value) {
|
||||
return _then(_value.copyWith(miniPlayerSettings: value) as $Val);
|
||||
});
|
||||
return $MinimizedPlayerSettingsCopyWith<$Res>(_self.miniPlayerSettings!, (value) {
|
||||
return _then(_self.copyWith(miniPlayerSettings: value));
|
||||
});
|
||||
}/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings {
|
||||
if (_self.expandedPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings {
|
||||
if (_value.expandedPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ExpandedPlayerSettingsCopyWith<$Res>(_value.expandedPlayerSettings!,
|
||||
(value) {
|
||||
return _then(_value.copyWith(expandedPlayerSettings: value) as $Val);
|
||||
});
|
||||
return $ExpandedPlayerSettingsCopyWith<$Res>(_self.expandedPlayerSettings!, (value) {
|
||||
return _then(_self.copyWith(expandedPlayerSettings: value));
|
||||
});
|
||||
}/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings {
|
||||
if (_self.sleepTimerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings {
|
||||
if (_value.sleepTimerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SleepTimerSettingsCopyWith<$Res>(_value.sleepTimerSettings!,
|
||||
(value) {
|
||||
return _then(_value.copyWith(sleepTimerSettings: value) as $Val);
|
||||
});
|
||||
}
|
||||
return $SleepTimerSettingsCopyWith<$Res>(_self.sleepTimerSettings!, (value) {
|
||||
return _then(_self.copyWith(sleepTimerSettings: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NullablePlayerSettingsImplCopyWith<$Res>
|
||||
implements $NullablePlayerSettingsCopyWith<$Res> {
|
||||
factory _$$NullablePlayerSettingsImplCopyWith(
|
||||
_$NullablePlayerSettingsImpl value,
|
||||
$Res Function(_$NullablePlayerSettingsImpl) then) =
|
||||
__$$NullablePlayerSettingsImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{MinimizedPlayerSettings? miniPlayerSettings,
|
||||
ExpandedPlayerSettings? expandedPlayerSettings,
|
||||
double? preferredDefaultVolume,
|
||||
double? preferredDefaultSpeed,
|
||||
List<double>? speedOptions,
|
||||
SleepTimerSettings? sleepTimerSettings,
|
||||
Duration? playbackReportInterval});
|
||||
|
||||
@override
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;
|
||||
@override
|
||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;
|
||||
@override
|
||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
||||
/// Adds pattern-matching-related methods to [NullablePlayerSettings].
|
||||
extension NullablePlayerSettingsPatterns on NullablePlayerSettings {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _NullablePlayerSettings value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _NullablePlayerSettings value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _NullablePlayerSettings value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings() when $default != null:
|
||||
return $default(_that.miniPlayerSettings,_that.expandedPlayerSettings,_that.preferredDefaultVolume,_that.preferredDefaultSpeed,_that.speedOptions,_that.sleepTimerSettings,_that.playbackReportInterval);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings():
|
||||
return $default(_that.miniPlayerSettings,_that.expandedPlayerSettings,_that.preferredDefaultVolume,_that.preferredDefaultSpeed,_that.speedOptions,_that.sleepTimerSettings,_that.playbackReportInterval);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings() when $default != null:
|
||||
return $default(_that.miniPlayerSettings,_that.expandedPlayerSettings,_that.preferredDefaultVolume,_that.preferredDefaultSpeed,_that.speedOptions,_that.sleepTimerSettings,_that.playbackReportInterval);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NullablePlayerSettingsImplCopyWithImpl<$Res>
|
||||
extends _$NullablePlayerSettingsCopyWithImpl<$Res,
|
||||
_$NullablePlayerSettingsImpl>
|
||||
implements _$$NullablePlayerSettingsImplCopyWith<$Res> {
|
||||
__$$NullablePlayerSettingsImplCopyWithImpl(
|
||||
_$NullablePlayerSettingsImpl _value,
|
||||
$Res Function(_$NullablePlayerSettingsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? miniPlayerSettings = freezed,
|
||||
Object? expandedPlayerSettings = freezed,
|
||||
Object? preferredDefaultVolume = freezed,
|
||||
Object? preferredDefaultSpeed = freezed,
|
||||
Object? speedOptions = freezed,
|
||||
Object? sleepTimerSettings = freezed,
|
||||
Object? playbackReportInterval = freezed,
|
||||
}) {
|
||||
return _then(_$NullablePlayerSettingsImpl(
|
||||
miniPlayerSettings: freezed == miniPlayerSettings
|
||||
? _value.miniPlayerSettings
|
||||
: miniPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as MinimizedPlayerSettings?,
|
||||
expandedPlayerSettings: freezed == expandedPlayerSettings
|
||||
? _value.expandedPlayerSettings
|
||||
: expandedPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as ExpandedPlayerSettings?,
|
||||
preferredDefaultVolume: freezed == preferredDefaultVolume
|
||||
? _value.preferredDefaultVolume
|
||||
: preferredDefaultVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
preferredDefaultSpeed: freezed == preferredDefaultSpeed
|
||||
? _value.preferredDefaultSpeed
|
||||
: preferredDefaultSpeed // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
speedOptions: freezed == speedOptions
|
||||
? _value._speedOptions
|
||||
: speedOptions // ignore: cast_nullable_to_non_nullable
|
||||
as List<double>?,
|
||||
sleepTimerSettings: freezed == sleepTimerSettings
|
||||
? _value.sleepTimerSettings
|
||||
: sleepTimerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as SleepTimerSettings?,
|
||||
playbackReportInterval: freezed == playbackReportInterval
|
||||
? _value.playbackReportInterval
|
||||
: playbackReportInterval // ignore: cast_nullable_to_non_nullable
|
||||
as Duration?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$NullablePlayerSettingsImpl implements _NullablePlayerSettings {
|
||||
const _$NullablePlayerSettingsImpl(
|
||||
{this.miniPlayerSettings,
|
||||
this.expandedPlayerSettings,
|
||||
this.preferredDefaultVolume,
|
||||
this.preferredDefaultSpeed,
|
||||
final List<double>? speedOptions,
|
||||
this.sleepTimerSettings,
|
||||
this.playbackReportInterval})
|
||||
: _speedOptions = speedOptions;
|
||||
|
||||
factory _$NullablePlayerSettingsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$NullablePlayerSettingsImplFromJson(json);
|
||||
class _NullablePlayerSettings implements NullablePlayerSettings {
|
||||
const _NullablePlayerSettings({this.miniPlayerSettings, this.expandedPlayerSettings, this.preferredDefaultVolume, this.preferredDefaultSpeed, final List<double>? speedOptions, this.sleepTimerSettings, this.playbackReportInterval}): _speedOptions = speedOptions;
|
||||
factory _NullablePlayerSettings.fromJson(Map<String, dynamic> json) => _$NullablePlayerSettingsFromJson(json);
|
||||
|
||||
@override
|
||||
final MinimizedPlayerSettings? miniPlayerSettings;
|
||||
@override
|
||||
final ExpandedPlayerSettings? expandedPlayerSettings;
|
||||
@override
|
||||
final double? preferredDefaultVolume;
|
||||
@override
|
||||
final double? preferredDefaultSpeed;
|
||||
final List<double>? _speedOptions;
|
||||
@override
|
||||
List<double>? get speedOptions {
|
||||
final value = _speedOptions;
|
||||
if (value == null) return null;
|
||||
if (_speedOptions is EqualUnmodifiableListView) return _speedOptions;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
@override
|
||||
final SleepTimerSettings? sleepTimerSettings;
|
||||
@override
|
||||
final Duration? playbackReportInterval;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NullablePlayerSettings(miniPlayerSettings: $miniPlayerSettings, expandedPlayerSettings: $expandedPlayerSettings, preferredDefaultVolume: $preferredDefaultVolume, preferredDefaultSpeed: $preferredDefaultSpeed, speedOptions: $speedOptions, sleepTimerSettings: $sleepTimerSettings, playbackReportInterval: $playbackReportInterval)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NullablePlayerSettingsImpl &&
|
||||
(identical(other.miniPlayerSettings, miniPlayerSettings) ||
|
||||
other.miniPlayerSettings == miniPlayerSettings) &&
|
||||
(identical(other.expandedPlayerSettings, expandedPlayerSettings) ||
|
||||
other.expandedPlayerSettings == expandedPlayerSettings) &&
|
||||
(identical(other.preferredDefaultVolume, preferredDefaultVolume) ||
|
||||
other.preferredDefaultVolume == preferredDefaultVolume) &&
|
||||
(identical(other.preferredDefaultSpeed, preferredDefaultSpeed) ||
|
||||
other.preferredDefaultSpeed == preferredDefaultSpeed) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._speedOptions, _speedOptions) &&
|
||||
(identical(other.sleepTimerSettings, sleepTimerSettings) ||
|
||||
other.sleepTimerSettings == sleepTimerSettings) &&
|
||||
(identical(other.playbackReportInterval, playbackReportInterval) ||
|
||||
other.playbackReportInterval == playbackReportInterval));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
miniPlayerSettings,
|
||||
expandedPlayerSettings,
|
||||
preferredDefaultVolume,
|
||||
preferredDefaultSpeed,
|
||||
const DeepCollectionEquality().hash(_speedOptions),
|
||||
sleepTimerSettings,
|
||||
playbackReportInterval);
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NullablePlayerSettingsImplCopyWith<_$NullablePlayerSettingsImpl>
|
||||
get copyWith => __$$NullablePlayerSettingsImplCopyWithImpl<
|
||||
_$NullablePlayerSettingsImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$NullablePlayerSettingsImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
@override final MinimizedPlayerSettings? miniPlayerSettings;
|
||||
@override final ExpandedPlayerSettings? expandedPlayerSettings;
|
||||
@override final double? preferredDefaultVolume;
|
||||
@override final double? preferredDefaultSpeed;
|
||||
final List<double>? _speedOptions;
|
||||
@override List<double>? get speedOptions {
|
||||
final value = _speedOptions;
|
||||
if (value == null) return null;
|
||||
if (_speedOptions is EqualUnmodifiableListView) return _speedOptions;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
abstract class _NullablePlayerSettings implements NullablePlayerSettings {
|
||||
const factory _NullablePlayerSettings(
|
||||
{final MinimizedPlayerSettings? miniPlayerSettings,
|
||||
final ExpandedPlayerSettings? expandedPlayerSettings,
|
||||
final double? preferredDefaultVolume,
|
||||
final double? preferredDefaultSpeed,
|
||||
final List<double>? speedOptions,
|
||||
final SleepTimerSettings? sleepTimerSettings,
|
||||
final Duration? playbackReportInterval}) = _$NullablePlayerSettingsImpl;
|
||||
@override final SleepTimerSettings? sleepTimerSettings;
|
||||
@override final Duration? playbackReportInterval;
|
||||
|
||||
factory _NullablePlayerSettings.fromJson(Map<String, dynamic> json) =
|
||||
_$NullablePlayerSettingsImpl.fromJson;
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$NullablePlayerSettingsCopyWith<_NullablePlayerSettings> get copyWith => __$NullablePlayerSettingsCopyWithImpl<_NullablePlayerSettings>(this, _$identity);
|
||||
|
||||
@override
|
||||
MinimizedPlayerSettings? get miniPlayerSettings;
|
||||
@override
|
||||
ExpandedPlayerSettings? get expandedPlayerSettings;
|
||||
@override
|
||||
double? get preferredDefaultVolume;
|
||||
@override
|
||||
double? get preferredDefaultSpeed;
|
||||
@override
|
||||
List<double>? get speedOptions;
|
||||
@override
|
||||
SleepTimerSettings? get sleepTimerSettings;
|
||||
@override
|
||||
Duration? get playbackReportInterval;
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$NullablePlayerSettingsImplCopyWith<_$NullablePlayerSettingsImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$NullablePlayerSettingsToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _NullablePlayerSettings&&(identical(other.miniPlayerSettings, miniPlayerSettings) || other.miniPlayerSettings == miniPlayerSettings)&&(identical(other.expandedPlayerSettings, expandedPlayerSettings) || other.expandedPlayerSettings == expandedPlayerSettings)&&(identical(other.preferredDefaultVolume, preferredDefaultVolume) || other.preferredDefaultVolume == preferredDefaultVolume)&&(identical(other.preferredDefaultSpeed, preferredDefaultSpeed) || other.preferredDefaultSpeed == preferredDefaultSpeed)&&const DeepCollectionEquality().equals(other._speedOptions, _speedOptions)&&(identical(other.sleepTimerSettings, sleepTimerSettings) || other.sleepTimerSettings == sleepTimerSettings)&&(identical(other.playbackReportInterval, playbackReportInterval) || other.playbackReportInterval == playbackReportInterval));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,miniPlayerSettings,expandedPlayerSettings,preferredDefaultVolume,preferredDefaultSpeed,const DeepCollectionEquality().hash(_speedOptions),sleepTimerSettings,playbackReportInterval);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NullablePlayerSettings(miniPlayerSettings: $miniPlayerSettings, expandedPlayerSettings: $expandedPlayerSettings, preferredDefaultVolume: $preferredDefaultVolume, preferredDefaultSpeed: $preferredDefaultSpeed, speedOptions: $speedOptions, sleepTimerSettings: $sleepTimerSettings, playbackReportInterval: $playbackReportInterval)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$NullablePlayerSettingsCopyWith<$Res> implements $NullablePlayerSettingsCopyWith<$Res> {
|
||||
factory _$NullablePlayerSettingsCopyWith(_NullablePlayerSettings value, $Res Function(_NullablePlayerSettings) _then) = __$NullablePlayerSettingsCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval
|
||||
});
|
||||
|
||||
|
||||
@override $MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;@override $ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;@override $SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$NullablePlayerSettingsCopyWithImpl<$Res>
|
||||
implements _$NullablePlayerSettingsCopyWith<$Res> {
|
||||
__$NullablePlayerSettingsCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _NullablePlayerSettings _self;
|
||||
final $Res Function(_NullablePlayerSettings) _then;
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? miniPlayerSettings = freezed,Object? expandedPlayerSettings = freezed,Object? preferredDefaultVolume = freezed,Object? preferredDefaultSpeed = freezed,Object? speedOptions = freezed,Object? sleepTimerSettings = freezed,Object? playbackReportInterval = freezed,}) {
|
||||
return _then(_NullablePlayerSettings(
|
||||
miniPlayerSettings: freezed == miniPlayerSettings ? _self.miniPlayerSettings : miniPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as MinimizedPlayerSettings?,expandedPlayerSettings: freezed == expandedPlayerSettings ? _self.expandedPlayerSettings : expandedPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as ExpandedPlayerSettings?,preferredDefaultVolume: freezed == preferredDefaultVolume ? _self.preferredDefaultVolume : preferredDefaultVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double?,preferredDefaultSpeed: freezed == preferredDefaultSpeed ? _self.preferredDefaultSpeed : preferredDefaultSpeed // ignore: cast_nullable_to_non_nullable
|
||||
as double?,speedOptions: freezed == speedOptions ? _self._speedOptions : speedOptions // ignore: cast_nullable_to_non_nullable
|
||||
as List<double>?,sleepTimerSettings: freezed == sleepTimerSettings ? _self.sleepTimerSettings : sleepTimerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as SleepTimerSettings?,playbackReportInterval: freezed == playbackReportInterval ? _self.playbackReportInterval : playbackReportInterval // ignore: cast_nullable_to_non_nullable
|
||||
as Duration?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings {
|
||||
if (_self.miniPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $MinimizedPlayerSettingsCopyWith<$Res>(_self.miniPlayerSettings!, (value) {
|
||||
return _then(_self.copyWith(miniPlayerSettings: value));
|
||||
});
|
||||
}/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings {
|
||||
if (_self.expandedPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ExpandedPlayerSettingsCopyWith<$Res>(_self.expandedPlayerSettings!, (value) {
|
||||
return _then(_self.copyWith(expandedPlayerSettings: value));
|
||||
});
|
||||
}/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings {
|
||||
if (_self.sleepTimerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SleepTimerSettingsCopyWith<$Res>(_self.sleepTimerSettings!, (value) {
|
||||
return _then(_self.copyWith(sleepTimerSettings: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,42 +6,42 @@ part of 'nullable_player_settings.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$NullablePlayerSettingsImpl _$$NullablePlayerSettingsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$NullablePlayerSettingsImpl(
|
||||
miniPlayerSettings: json['miniPlayerSettings'] == null
|
||||
? null
|
||||
: MinimizedPlayerSettings.fromJson(
|
||||
json['miniPlayerSettings'] as Map<String, dynamic>),
|
||||
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
||||
? null
|
||||
: ExpandedPlayerSettings.fromJson(
|
||||
json['expandedPlayerSettings'] as Map<String, dynamic>),
|
||||
preferredDefaultVolume:
|
||||
(json['preferredDefaultVolume'] as num?)?.toDouble(),
|
||||
preferredDefaultSpeed:
|
||||
(json['preferredDefaultSpeed'] as num?)?.toDouble(),
|
||||
speedOptions: (json['speedOptions'] as List<dynamic>?)
|
||||
?.map((e) => (e as num).toDouble())
|
||||
.toList(),
|
||||
sleepTimerSettings: json['sleepTimerSettings'] == null
|
||||
? null
|
||||
: SleepTimerSettings.fromJson(
|
||||
json['sleepTimerSettings'] as Map<String, dynamic>),
|
||||
playbackReportInterval: json['playbackReportInterval'] == null
|
||||
? null
|
||||
: Duration(
|
||||
microseconds: (json['playbackReportInterval'] as num).toInt()),
|
||||
);
|
||||
_NullablePlayerSettings _$NullablePlayerSettingsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _NullablePlayerSettings(
|
||||
miniPlayerSettings: json['miniPlayerSettings'] == null
|
||||
? null
|
||||
: MinimizedPlayerSettings.fromJson(
|
||||
json['miniPlayerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
||||
? null
|
||||
: ExpandedPlayerSettings.fromJson(
|
||||
json['expandedPlayerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
preferredDefaultVolume: (json['preferredDefaultVolume'] as num?)?.toDouble(),
|
||||
preferredDefaultSpeed: (json['preferredDefaultSpeed'] as num?)?.toDouble(),
|
||||
speedOptions: (json['speedOptions'] as List<dynamic>?)
|
||||
?.map((e) => (e as num).toDouble())
|
||||
.toList(),
|
||||
sleepTimerSettings: json['sleepTimerSettings'] == null
|
||||
? null
|
||||
: SleepTimerSettings.fromJson(
|
||||
json['sleepTimerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
playbackReportInterval: json['playbackReportInterval'] == null
|
||||
? null
|
||||
: Duration(microseconds: (json['playbackReportInterval'] as num).toInt()),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$NullablePlayerSettingsImplToJson(
|
||||
_$NullablePlayerSettingsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'miniPlayerSettings': instance.miniPlayerSettings,
|
||||
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
||||
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
||||
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
||||
'speedOptions': instance.speedOptions,
|
||||
'sleepTimerSettings': instance.sleepTimerSettings,
|
||||
'playbackReportInterval': instance.playbackReportInterval?.inMicroseconds,
|
||||
};
|
||||
Map<String, dynamic> _$NullablePlayerSettingsToJson(
|
||||
_NullablePlayerSettings instance,
|
||||
) => <String, dynamic>{
|
||||
'miniPlayerSettings': instance.miniPlayerSettings,
|
||||
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
||||
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
||||
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
||||
'speedOptions': instance.speedOptions,
|
||||
'sleepTimerSettings': instance.sleepTimerSettings,
|
||||
'playbackReportInterval': instance.playbackReportInterval?.inMicroseconds,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,171 +6,102 @@ part of 'book_settings_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$bookSettingsHash() => r'b976df954edf98ec6ccb3eb41e9d07dd4a9193eb';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _$BookSettings
|
||||
extends BuildlessAutoDisposeNotifier<model.BookSettings> {
|
||||
late final String bookId;
|
||||
|
||||
model.BookSettings build(
|
||||
String bookId,
|
||||
);
|
||||
}
|
||||
|
||||
/// See also [BookSettings].
|
||||
@ProviderFor(BookSettings)
|
||||
const bookSettingsProvider = BookSettingsFamily();
|
||||
final bookSettingsProvider = BookSettingsFamily._();
|
||||
|
||||
/// See also [BookSettings].
|
||||
class BookSettingsFamily extends Family<model.BookSettings> {
|
||||
/// See also [BookSettings].
|
||||
const BookSettingsFamily();
|
||||
final class BookSettingsProvider
|
||||
extends $NotifierProvider<BookSettings, model.BookSettings> {
|
||||
BookSettingsProvider._({
|
||||
required BookSettingsFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'bookSettingsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [BookSettings].
|
||||
BookSettingsProvider call(
|
||||
String bookId,
|
||||
) {
|
||||
return BookSettingsProvider(
|
||||
bookId,
|
||||
);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$bookSettingsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'bookSettingsProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
BookSettingsProvider getProviderOverride(
|
||||
covariant BookSettingsProvider provider,
|
||||
) {
|
||||
return call(
|
||||
provider.bookId,
|
||||
);
|
||||
}
|
||||
BookSettings create() => BookSettings();
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'bookSettingsProvider';
|
||||
}
|
||||
|
||||
/// See also [BookSettings].
|
||||
class BookSettingsProvider
|
||||
extends AutoDisposeNotifierProviderImpl<BookSettings, model.BookSettings> {
|
||||
/// See also [BookSettings].
|
||||
BookSettingsProvider(
|
||||
String bookId,
|
||||
) : this._internal(
|
||||
() => BookSettings()..bookId = bookId,
|
||||
from: bookSettingsProvider,
|
||||
name: r'bookSettingsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bookSettingsHash,
|
||||
dependencies: BookSettingsFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
BookSettingsFamily._allTransitiveDependencies,
|
||||
bookId: bookId,
|
||||
);
|
||||
|
||||
BookSettingsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.bookId,
|
||||
}) : super.internal();
|
||||
|
||||
final String bookId;
|
||||
|
||||
@override
|
||||
model.BookSettings runNotifierBuild(
|
||||
covariant BookSettings notifier,
|
||||
) {
|
||||
return notifier.build(
|
||||
bookId,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Override overrideWith(BookSettings Function() create) {
|
||||
return ProviderOverride(
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(model.BookSettings value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
override: BookSettingsProvider._internal(
|
||||
() => create()..bookId = bookId,
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
bookId: bookId,
|
||||
),
|
||||
providerOverride: $SyncValueProvider<model.BookSettings>(value),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeNotifierProviderElement<BookSettings, model.BookSettings>
|
||||
createElement() {
|
||||
return _BookSettingsProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is BookSettingsProvider && other.bookId == bookId;
|
||||
return other is BookSettingsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, bookId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin BookSettingsRef on AutoDisposeNotifierProviderRef<model.BookSettings> {
|
||||
/// The parameter `bookId` of this provider.
|
||||
String get bookId;
|
||||
}
|
||||
String _$bookSettingsHash() => r'b976df954edf98ec6ccb3eb41e9d07dd4a9193eb';
|
||||
|
||||
class _BookSettingsProviderElement
|
||||
extends AutoDisposeNotifierProviderElement<BookSettings, model.BookSettings>
|
||||
with BookSettingsRef {
|
||||
_BookSettingsProviderElement(super.provider);
|
||||
final class BookSettingsFamily extends $Family
|
||||
with
|
||||
$ClassFamilyOverride<
|
||||
BookSettings,
|
||||
model.BookSettings,
|
||||
model.BookSettings,
|
||||
model.BookSettings,
|
||||
String
|
||||
> {
|
||||
BookSettingsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'bookSettingsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
BookSettingsProvider call(String bookId) =>
|
||||
BookSettingsProvider._(argument: bookId, from: this);
|
||||
|
||||
@override
|
||||
String get bookId => (origin as BookSettingsProvider).bookId;
|
||||
String toString() => r'bookSettingsProvider';
|
||||
}
|
||||
|
||||
abstract class _$BookSettings extends $Notifier<model.BookSettings> {
|
||||
late final _$args = ref.$arg as String;
|
||||
String get bookId => _$args;
|
||||
|
||||
model.BookSettings build(String bookId);
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref = this.ref as $Ref<model.BookSettings, model.BookSettings>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<model.BookSettings, model.BookSettings>,
|
||||
model.BookSettings,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, () => build(_$args));
|
||||
}
|
||||
}
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
|
|
|||
|
|
@ -6,21 +6,55 @@ part of 'playback_reporter_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(PlaybackReporter)
|
||||
final playbackReporterProvider = PlaybackReporterProvider._();
|
||||
|
||||
final class PlaybackReporterProvider
|
||||
extends $AsyncNotifierProvider<PlaybackReporter, core.PlaybackReporter> {
|
||||
PlaybackReporterProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'playbackReporterProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$playbackReporterHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
PlaybackReporter create() => PlaybackReporter();
|
||||
}
|
||||
|
||||
String _$playbackReporterHash() => r'f5436d652e51c37bcc684acdaec94e17a97e68e5';
|
||||
|
||||
/// See also [PlaybackReporter].
|
||||
@ProviderFor(PlaybackReporter)
|
||||
final playbackReporterProvider =
|
||||
AsyncNotifierProvider<PlaybackReporter, core.PlaybackReporter>.internal(
|
||||
PlaybackReporter.new,
|
||||
name: r'playbackReporterProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$playbackReporterHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$PlaybackReporter = AsyncNotifier<core.PlaybackReporter>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
abstract class _$PlaybackReporter
|
||||
extends $AsyncNotifier<core.PlaybackReporter> {
|
||||
FutureOr<core.PlaybackReporter> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref =
|
||||
this.ref
|
||||
as $Ref<AsyncValue<core.PlaybackReporter>, core.PlaybackReporter>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<
|
||||
AsyncValue<core.PlaybackReporter>,
|
||||
core.PlaybackReporter
|
||||
>,
|
||||
AsyncValue<core.PlaybackReporter>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, build);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,20 +6,57 @@ part of 'playlist_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(Playlist)
|
||||
final playlistProvider = PlaylistProvider._();
|
||||
|
||||
final class PlaylistProvider
|
||||
extends $NotifierProvider<Playlist, AudiobookPlaylist> {
|
||||
PlaylistProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'playlistProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$playlistHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
Playlist create() => Playlist();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(AudiobookPlaylist value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<AudiobookPlaylist>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$playlistHash() => r'bed4642e4c2de829e4d0630cb5bf92bffeeb1f60';
|
||||
|
||||
/// See also [Playlist].
|
||||
@ProviderFor(Playlist)
|
||||
final playlistProvider =
|
||||
AutoDisposeNotifierProvider<Playlist, AudiobookPlaylist>.internal(
|
||||
Playlist.new,
|
||||
name: r'playlistProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$playlistHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$Playlist = AutoDisposeNotifier<AudiobookPlaylist>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
abstract class _$Playlist extends $Notifier<AudiobookPlaylist> {
|
||||
AudiobookPlaylist build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref = this.ref as $Ref<AudiobookPlaylist, AudiobookPlaylist>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<AudiobookPlaylist, AudiobookPlaylist>,
|
||||
AudiobookPlaylist,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, build);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,41 +6,119 @@ part of 'audiobook_player.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
/// Simple because it doesn't rebuild when the player state changes
|
||||
/// it only rebuilds when the token changes
|
||||
|
||||
@ProviderFor(SimpleAudiobookPlayer)
|
||||
final simpleAudiobookPlayerProvider = SimpleAudiobookPlayerProvider._();
|
||||
|
||||
/// Simple because it doesn't rebuild when the player state changes
|
||||
/// it only rebuilds when the token changes
|
||||
final class SimpleAudiobookPlayerProvider
|
||||
extends $NotifierProvider<SimpleAudiobookPlayer, core.AudiobookPlayer> {
|
||||
/// Simple because it doesn't rebuild when the player state changes
|
||||
/// it only rebuilds when the token changes
|
||||
SimpleAudiobookPlayerProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'simpleAudiobookPlayerProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$simpleAudiobookPlayerHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
SimpleAudiobookPlayer create() => SimpleAudiobookPlayer();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(core.AudiobookPlayer value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<core.AudiobookPlayer>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$simpleAudiobookPlayerHash() =>
|
||||
r'5e94bbff4314adceb5affa704fc4d079d4016afa';
|
||||
|
||||
/// Simple because it doesn't rebuild when the player state changes
|
||||
/// it only rebuilds when the token changes
|
||||
///
|
||||
/// Copied from [SimpleAudiobookPlayer].
|
||||
@ProviderFor(SimpleAudiobookPlayer)
|
||||
final simpleAudiobookPlayerProvider =
|
||||
NotifierProvider<SimpleAudiobookPlayer, core.AudiobookPlayer>.internal(
|
||||
SimpleAudiobookPlayer.new,
|
||||
name: r'simpleAudiobookPlayerProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$simpleAudiobookPlayerHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$SimpleAudiobookPlayer = Notifier<core.AudiobookPlayer>;
|
||||
abstract class _$SimpleAudiobookPlayer extends $Notifier<core.AudiobookPlayer> {
|
||||
core.AudiobookPlayer build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref = this.ref as $Ref<core.AudiobookPlayer, core.AudiobookPlayer>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<core.AudiobookPlayer, core.AudiobookPlayer>,
|
||||
core.AudiobookPlayer,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, build);
|
||||
}
|
||||
}
|
||||
|
||||
@ProviderFor(AudiobookPlayer)
|
||||
final audiobookPlayerProvider = AudiobookPlayerProvider._();
|
||||
|
||||
final class AudiobookPlayerProvider
|
||||
extends $NotifierProvider<AudiobookPlayer, core.AudiobookPlayer> {
|
||||
AudiobookPlayerProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'audiobookPlayerProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$audiobookPlayerHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
AudiobookPlayer create() => AudiobookPlayer();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(core.AudiobookPlayer value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<core.AudiobookPlayer>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$audiobookPlayerHash() => r'0f180308067486896fec6a65a6afb0e6686ac4a0';
|
||||
|
||||
/// See also [AudiobookPlayer].
|
||||
@ProviderFor(AudiobookPlayer)
|
||||
final audiobookPlayerProvider =
|
||||
NotifierProvider<AudiobookPlayer, core.AudiobookPlayer>.internal(
|
||||
AudiobookPlayer.new,
|
||||
name: r'audiobookPlayerProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$audiobookPlayerHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$AudiobookPlayer = Notifier<core.AudiobookPlayer>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
abstract class _$AudiobookPlayer extends $Notifier<core.AudiobookPlayer> {
|
||||
core.AudiobookPlayer build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref = this.ref as $Ref<core.AudiobookPlayer, core.AudiobookPlayer>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<core.AudiobookPlayer, core.AudiobookPlayer>,
|
||||
core.AudiobookPlayer,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, build);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,66 +6,147 @@ part of 'currently_playing_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(currentlyPlayingBook)
|
||||
final currentlyPlayingBookProvider = CurrentlyPlayingBookProvider._();
|
||||
|
||||
final class CurrentlyPlayingBookProvider
|
||||
extends $FunctionalProvider<BookExpanded?, BookExpanded?, BookExpanded?>
|
||||
with $Provider<BookExpanded?> {
|
||||
CurrentlyPlayingBookProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'currentlyPlayingBookProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$currentlyPlayingBookHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<BookExpanded?> $createElement($ProviderPointer pointer) =>
|
||||
$ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
BookExpanded? create(Ref ref) {
|
||||
return currentlyPlayingBook(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(BookExpanded? value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<BookExpanded?>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$currentlyPlayingBookHash() =>
|
||||
r'e4258694c8f0d1e89651b330fae0f672ca13a484';
|
||||
|
||||
/// See also [currentlyPlayingBook].
|
||||
@ProviderFor(currentlyPlayingBook)
|
||||
final currentlyPlayingBookProvider =
|
||||
AutoDisposeProvider<BookExpanded?>.internal(
|
||||
currentlyPlayingBook,
|
||||
name: r'currentlyPlayingBookProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$currentlyPlayingBookHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
/// provided the current chapter of the book being played
|
||||
|
||||
@ProviderFor(currentPlayingChapter)
|
||||
final currentPlayingChapterProvider = CurrentPlayingChapterProvider._();
|
||||
|
||||
/// provided the current chapter of the book being played
|
||||
|
||||
final class CurrentPlayingChapterProvider
|
||||
extends $FunctionalProvider<BookChapter?, BookChapter?, BookChapter?>
|
||||
with $Provider<BookChapter?> {
|
||||
/// provided the current chapter of the book being played
|
||||
CurrentPlayingChapterProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'currentPlayingChapterProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$currentPlayingChapterHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<BookChapter?> $createElement($ProviderPointer pointer) =>
|
||||
$ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
BookChapter? create(Ref ref) {
|
||||
return currentPlayingChapter(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(BookChapter? value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<BookChapter?>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef CurrentlyPlayingBookRef = AutoDisposeProviderRef<BookExpanded?>;
|
||||
String _$currentPlayingChapterHash() =>
|
||||
r'73db8b8a9058573bb0c68ec5d5f8aba9306f3d24';
|
||||
|
||||
/// provided the current chapter of the book being played
|
||||
///
|
||||
/// Copied from [currentPlayingChapter].
|
||||
@ProviderFor(currentPlayingChapter)
|
||||
final currentPlayingChapterProvider =
|
||||
AutoDisposeProvider<BookChapter?>.internal(
|
||||
currentPlayingChapter,
|
||||
name: r'currentPlayingChapterProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$currentPlayingChapterHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
/// provides the book metadata of the currently playing book
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef CurrentPlayingChapterRef = AutoDisposeProviderRef<BookChapter?>;
|
||||
String _$currentBookMetadataHash() =>
|
||||
r'f537ef4ef19280bc952de658ecf6520c535ae344';
|
||||
@ProviderFor(currentBookMetadata)
|
||||
final currentBookMetadataProvider = CurrentBookMetadataProvider._();
|
||||
|
||||
/// provides the book metadata of the currently playing book
|
||||
///
|
||||
/// Copied from [currentBookMetadata].
|
||||
@ProviderFor(currentBookMetadata)
|
||||
final currentBookMetadataProvider =
|
||||
AutoDisposeProvider<BookMetadataExpanded?>.internal(
|
||||
currentBookMetadata,
|
||||
name: r'currentBookMetadataProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$currentBookMetadataHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef CurrentBookMetadataRef = AutoDisposeProviderRef<BookMetadataExpanded?>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
final class CurrentBookMetadataProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
BookMetadataExpanded?,
|
||||
BookMetadataExpanded?,
|
||||
BookMetadataExpanded?
|
||||
>
|
||||
with $Provider<BookMetadataExpanded?> {
|
||||
/// provides the book metadata of the currently playing book
|
||||
CurrentBookMetadataProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'currentBookMetadataProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$currentBookMetadataHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<BookMetadataExpanded?> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
BookMetadataExpanded? create(Ref ref) {
|
||||
return currentBookMetadata(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(BookMetadataExpanded? value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<BookMetadataExpanded?>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$currentBookMetadataHash() =>
|
||||
r'f537ef4ef19280bc952de658ecf6520c535ae344';
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Raw<ValueNotifier<double>> playerExpandProgressNotifier(
|
|||
double playerHeight(
|
||||
Ref ref,
|
||||
) {
|
||||
final playerExpandProgress = ref.watch(playerExpandProgressNotifierProvider);
|
||||
final playerExpandProgress = ref.watch(playerExpandProgressProvider);
|
||||
|
||||
// on change of the playerExpandProgress invalidate
|
||||
playerExpandProgress.addListener(() {
|
||||
|
|
|
|||
|
|
@ -6,58 +6,134 @@ part of 'player_form.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(playerExpandProgressNotifier)
|
||||
final playerExpandProgressProvider = PlayerExpandProgressNotifierProvider._();
|
||||
|
||||
final class PlayerExpandProgressNotifierProvider
|
||||
extends
|
||||
$FunctionalProvider<
|
||||
Raw<ValueNotifier<double>>,
|
||||
Raw<ValueNotifier<double>>,
|
||||
Raw<ValueNotifier<double>>
|
||||
>
|
||||
with $Provider<Raw<ValueNotifier<double>>> {
|
||||
PlayerExpandProgressNotifierProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'playerExpandProgressProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$playerExpandProgressNotifierHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<Raw<ValueNotifier<double>>> $createElement(
|
||||
$ProviderPointer pointer,
|
||||
) => $ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
Raw<ValueNotifier<double>> create(Ref ref) {
|
||||
return playerExpandProgressNotifier(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(Raw<ValueNotifier<double>> value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<Raw<ValueNotifier<double>>>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$playerExpandProgressNotifierHash() =>
|
||||
r'1ac7172d90a070f96222286edd1a176be197f378';
|
||||
|
||||
/// See also [playerExpandProgressNotifier].
|
||||
@ProviderFor(playerExpandProgressNotifier)
|
||||
final playerExpandProgressNotifierProvider =
|
||||
Provider<Raw<ValueNotifier<double>>>.internal(
|
||||
playerExpandProgressNotifier,
|
||||
name: r'playerExpandProgressNotifierProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$playerExpandProgressNotifierHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef PlayerExpandProgressNotifierRef
|
||||
= ProviderRef<Raw<ValueNotifier<double>>>;
|
||||
String _$playerHeightHash() => r'3f031eaffdffbb2c6ddf7eb1aba31bf1619260fc';
|
||||
|
||||
/// See also [playerHeight].
|
||||
@ProviderFor(playerHeight)
|
||||
final playerHeightProvider = Provider<double>.internal(
|
||||
playerHeight,
|
||||
name: r'playerHeightProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$playerHeightHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
final playerHeightProvider = PlayerHeightProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef PlayerHeightRef = ProviderRef<double>;
|
||||
String _$isPlayerActiveHash() => r'2c7ca125423126fb5f0ef218d37bc8fe0ca9ec98';
|
||||
final class PlayerHeightProvider
|
||||
extends $FunctionalProvider<double, double, double>
|
||||
with $Provider<double> {
|
||||
PlayerHeightProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'playerHeightProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$playerHeightHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<double> $createElement($ProviderPointer pointer) =>
|
||||
$ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
double create(Ref ref) {
|
||||
return playerHeight(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(double value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<double>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$playerHeightHash() => r'41144a733b5ffd1c872a237ed7c9ea5f450dd0d4';
|
||||
|
||||
/// See also [isPlayerActive].
|
||||
@ProviderFor(isPlayerActive)
|
||||
final isPlayerActiveProvider = Provider<bool>.internal(
|
||||
isPlayerActive,
|
||||
name: r'isPlayerActiveProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$isPlayerActiveHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
final isPlayerActiveProvider = IsPlayerActiveProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef IsPlayerActiveRef = ProviderRef<bool>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
final class IsPlayerActiveProvider extends $FunctionalProvider<bool, bool, bool>
|
||||
with $Provider<bool> {
|
||||
IsPlayerActiveProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'isPlayerActiveProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$isPlayerActiveHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<bool> $createElement($ProviderPointer pointer) =>
|
||||
$ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
bool create(Ref ref) {
|
||||
return isPlayerActive(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(bool value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<bool>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$isPlayerActiveHash() => r'2c7ca125423126fb5f0ef218d37bc8fe0ca9ec98';
|
||||
|
|
|
|||
|
|
@ -34,14 +34,14 @@ class AudiobookPlayer extends HookConsumerWidget {
|
|||
final itemBeingPlayed =
|
||||
ref.watch(libraryItemProvider(currentBook.libraryItemId));
|
||||
final player = ref.watch(audiobookPlayerProvider);
|
||||
final imageOfItemBeingPlayed = itemBeingPlayed.valueOrNull != null
|
||||
final imageOfItemBeingPlayed = itemBeingPlayed.value != null
|
||||
? ref.watch(
|
||||
coverImageProvider(itemBeingPlayed.valueOrNull!.id),
|
||||
coverImageProvider(itemBeingPlayed.value!.id),
|
||||
)
|
||||
: null;
|
||||
final imgWidget = imageOfItemBeingPlayed?.valueOrNull != null
|
||||
final imgWidget = imageOfItemBeingPlayed?.value != null
|
||||
? Image.memory(
|
||||
imageOfItemBeingPlayed!.valueOrNull!,
|
||||
imageOfItemBeingPlayed!.value!,
|
||||
fit: BoxFit.cover,
|
||||
)
|
||||
: const BookCoverSkeleton();
|
||||
|
|
@ -63,7 +63,7 @@ class AudiobookPlayer extends HookConsumerWidget {
|
|||
// theme from image
|
||||
final imageTheme = ref.watch(
|
||||
themeOfLibraryItemProvider(
|
||||
itemBeingPlayed.valueOrNull?.id,
|
||||
itemBeingPlayed.value?.id,
|
||||
brightness: Theme.of(context).brightness,
|
||||
highContrast: appSettings.themeSettings.highContrast ||
|
||||
MediaQuery.of(context).highContrast,
|
||||
|
|
@ -81,10 +81,10 @@ class AudiobookPlayer extends HookConsumerWidget {
|
|||
final preferredVolume = appSettings.playerSettings.preferredDefaultVolume;
|
||||
return Theme(
|
||||
data: ThemeData(
|
||||
colorScheme: imageTheme.valueOrNull ?? Theme.of(context).colorScheme,
|
||||
colorScheme: imageTheme.value ?? Theme.of(context).colorScheme,
|
||||
),
|
||||
child: Miniplayer(
|
||||
valueNotifier: ref.watch(playerExpandProgressNotifierProvider),
|
||||
valueNotifier: ref.watch(playerExpandProgressProvider),
|
||||
onDragDown: (percentage) async {
|
||||
// preferred volume
|
||||
// set volume to 0 when dragging down
|
||||
|
|
|
|||
|
|
@ -6,21 +6,57 @@ part of 'shake_detector.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(ShakeDetector)
|
||||
final shakeDetectorProvider = ShakeDetectorProvider._();
|
||||
|
||||
final class ShakeDetectorProvider
|
||||
extends $NotifierProvider<ShakeDetector, core.ShakeDetector?> {
|
||||
ShakeDetectorProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'shakeDetectorProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$shakeDetectorHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
ShakeDetector create() => ShakeDetector();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(core.ShakeDetector? value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<core.ShakeDetector?>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$shakeDetectorHash() => r'2a380bab1d4021d05d2ae40fec964a5f33d3730c';
|
||||
|
||||
/// See also [ShakeDetector].
|
||||
@ProviderFor(ShakeDetector)
|
||||
final shakeDetectorProvider =
|
||||
AutoDisposeNotifierProvider<ShakeDetector, core.ShakeDetector?>.internal(
|
||||
ShakeDetector.new,
|
||||
name: r'shakeDetectorProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$shakeDetectorHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$ShakeDetector = AutoDisposeNotifier<core.ShakeDetector?>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
abstract class _$ShakeDetector extends $Notifier<core.ShakeDetector?> {
|
||||
core.ShakeDetector? build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref = this.ref as $Ref<core.ShakeDetector?, core.ShakeDetector?>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<core.ShakeDetector?, core.ShakeDetector?>,
|
||||
core.ShakeDetector?,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, build);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,20 +6,57 @@ part of 'sleep_timer_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(SleepTimer)
|
||||
final sleepTimerProvider = SleepTimerProvider._();
|
||||
|
||||
final class SleepTimerProvider
|
||||
extends $NotifierProvider<SleepTimer, core.SleepTimer?> {
|
||||
SleepTimerProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'sleepTimerProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$sleepTimerHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
SleepTimer create() => SleepTimer();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(core.SleepTimer? value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<core.SleepTimer?>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$sleepTimerHash() => r'2679454a217d0630a833d730557ab4e4feac2e56';
|
||||
|
||||
/// See also [SleepTimer].
|
||||
@ProviderFor(SleepTimer)
|
||||
final sleepTimerProvider =
|
||||
NotifierProvider<SleepTimer, core.SleepTimer?>.internal(
|
||||
SleepTimer.new,
|
||||
name: r'sleepTimerProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$sleepTimerHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$SleepTimer = Notifier<core.SleepTimer?>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
abstract class _$SleepTimer extends $Notifier<core.SleepTimer?> {
|
||||
core.SleepTimer? build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref = this.ref as $Ref<core.SleepTimer?, core.SleepTimer?>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<core.SleepTimer?, core.SleepTimer?>,
|
||||
core.SleepTimer?,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, build);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue