mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-03-06 07:09:37 +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
2
.fvmrc
2
.fvmrc
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"flutter": "3.32.8"
|
"flutter": "3.38.6"
|
||||||
}
|
}
|
||||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
|
@ -22,7 +22,7 @@
|
||||||
"utsname",
|
"utsname",
|
||||||
"Vaani"
|
"Vaani"
|
||||||
],
|
],
|
||||||
"dart.flutterSdkPath": ".fvm/versions/3.32.8",
|
"dart.flutterSdkPath": ".fvm/versions/3.38.6",
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"**/*.freezed.dart": true,
|
"**/*.freezed.dart": true,
|
||||||
"**/*.g.dart": true
|
"**/*.g.dart": true
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,11 @@ if (keystorePropertiesFile.exists()) {
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "dr.blank.vaani"
|
namespace "dr.blank.vaani"
|
||||||
compileSdk 36
|
compileSdk flutter.compileSdkVersion
|
||||||
// ndkVersion flutter.ndkVersion
|
ndkVersion flutter.ndkVersion
|
||||||
// The NDK version is set to a specific version since it was not building
|
// The NDK version is set to a specific version since it was not building
|
||||||
// TODO remove when https://github.com/flutter/flutter/issues/139427 is closed
|
// TODO remove when https://github.com/flutter/flutter/issues/139427 is closed
|
||||||
ndkVersion = "29.0.13113456"
|
// ndkVersion = "29.0.13113456"
|
||||||
|
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
|
|
@ -64,8 +64,8 @@ android {
|
||||||
applicationId "dr.blank.vaani"
|
applicationId "dr.blank.vaani"
|
||||||
// You can update the following values to match your application needs.
|
// You can update the following values to match your application needs.
|
||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 23
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 36
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
|
@ -100,4 +100,4 @@ configurations.all {
|
||||||
force "androidx.core:core:1.13.1"
|
force "androidx.core:core:1.13.1"
|
||||||
force "androidx.core:core-ktx:1.13.1"
|
force "androidx.core:core-ktx:1.13.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ pluginManagement {
|
||||||
plugins {
|
plugins {
|
||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
id "com.android.application" version '8.10.0' apply false
|
id "com.android.application" version '8.10.0' apply false
|
||||||
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
|
id "org.jetbrains.kotlin.android" version "2.1.10" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
include ":app"
|
include ":app"
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -19,7 +19,7 @@ final _logger = Logger('authenticated_users_provider');
|
||||||
class AuthenticatedUsers extends _$AuthenticatedUsers {
|
class AuthenticatedUsers extends _$AuthenticatedUsers {
|
||||||
@override
|
@override
|
||||||
Set<model.AuthenticatedUser> build() {
|
Set<model.AuthenticatedUser> build() {
|
||||||
ref.listenSelf((_, __) {
|
listenSelf((_, __) {
|
||||||
writeStateToBox();
|
writeStateToBox();
|
||||||
});
|
});
|
||||||
// get the app settings
|
// get the app settings
|
||||||
|
|
|
||||||
|
|
@ -6,25 +6,70 @@ part of 'authenticated_users_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$authenticatedUsersHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'5fdd472f62fc3b73ff8417cdce9f02e86c33d00f';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
/// provides with a set of authenticated users
|
||||||
|
|
||||||
|
@ProviderFor(AuthenticatedUsers)
|
||||||
|
final authenticatedUsersProvider = AuthenticatedUsersProvider._();
|
||||||
|
|
||||||
/// provides with a set of authenticated users
|
/// provides with a set of authenticated users
|
||||||
///
|
final class AuthenticatedUsersProvider
|
||||||
/// Copied from [AuthenticatedUsers].
|
extends
|
||||||
@ProviderFor(AuthenticatedUsers)
|
$NotifierProvider<AuthenticatedUsers, Set<model.AuthenticatedUser>> {
|
||||||
final authenticatedUsersProvider = AutoDisposeNotifierProvider<
|
/// provides with a set of authenticated users
|
||||||
AuthenticatedUsers, Set<model.AuthenticatedUser>>.internal(
|
AuthenticatedUsersProvider._()
|
||||||
AuthenticatedUsers.new,
|
: super(
|
||||||
name: r'authenticatedUsersProvider',
|
from: null,
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
argument: null,
|
||||||
? null
|
retry: null,
|
||||||
: _$authenticatedUsersHash,
|
name: r'authenticatedUsersProvider',
|
||||||
dependencies: null,
|
isAutoDispose: true,
|
||||||
allTransitiveDependencies: null,
|
dependencies: null,
|
||||||
);
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
typedef _$AuthenticatedUsers
|
@override
|
||||||
= AutoDisposeNotifier<Set<model.AuthenticatedUser>>;
|
String debugGetCreateSourceHash() => _$authenticatedUsersHash();
|
||||||
// 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
|
@$internal
|
||||||
|
@override
|
||||||
|
AuthenticatedUsers create() => AuthenticatedUsers();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Set<model.AuthenticatedUser> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<Set<model.AuthenticatedUser>>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$authenticatedUsersHash() =>
|
||||||
|
r'c5e82cc70ffc31a0d315e3db9e07a141c583471e';
|
||||||
|
|
||||||
|
/// provides with a set of authenticated users
|
||||||
|
|
||||||
|
abstract class _$AuthenticatedUsers
|
||||||
|
extends $Notifier<Set<model.AuthenticatedUser>> {
|
||||||
|
Set<model.AuthenticatedUser> build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final ref =
|
||||||
|
this.ref
|
||||||
|
as $Ref<Set<model.AuthenticatedUser>, Set<model.AuthenticatedUser>>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<
|
||||||
|
Set<model.AuthenticatedUser>,
|
||||||
|
Set<model.AuthenticatedUser>
|
||||||
|
>,
|
||||||
|
Set<model.AuthenticatedUser>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleCreate(ref, build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,169 +6,94 @@ part of 'image_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$coverImageHash() => r'89cc4783cbc76bb41beae34384d92fb277135c75';
|
// 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 _$CoverImage extends BuildlessStreamNotifier<Uint8List> {
|
|
||||||
late final String itemId;
|
|
||||||
|
|
||||||
Stream<Uint8List> build(
|
|
||||||
String itemId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [CoverImage].
|
|
||||||
@ProviderFor(CoverImage)
|
@ProviderFor(CoverImage)
|
||||||
const coverImageProvider = CoverImageFamily();
|
final coverImageProvider = CoverImageFamily._();
|
||||||
|
|
||||||
/// See also [CoverImage].
|
final class CoverImageProvider
|
||||||
class CoverImageFamily extends Family<AsyncValue<Uint8List>> {
|
extends $StreamNotifierProvider<CoverImage, Uint8List> {
|
||||||
/// See also [CoverImage].
|
CoverImageProvider._({
|
||||||
const CoverImageFamily();
|
required CoverImageFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'coverImageProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [CoverImage].
|
@override
|
||||||
CoverImageProvider call(
|
String debugGetCreateSourceHash() => _$coverImageHash();
|
||||||
String itemId,
|
|
||||||
) {
|
@override
|
||||||
return CoverImageProvider(
|
String toString() {
|
||||||
itemId,
|
return r'coverImageProvider'
|
||||||
);
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
CoverImageProvider getProviderOverride(
|
CoverImage create() => CoverImage();
|
||||||
covariant CoverImageProvider provider,
|
|
||||||
) {
|
|
||||||
return call(
|
|
||||||
provider.itemId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
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'coverImageProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [CoverImage].
|
|
||||||
class CoverImageProvider
|
|
||||||
extends StreamNotifierProviderImpl<CoverImage, Uint8List> {
|
|
||||||
/// See also [CoverImage].
|
|
||||||
CoverImageProvider(
|
|
||||||
String itemId,
|
|
||||||
) : this._internal(
|
|
||||||
() => CoverImage()..itemId = itemId,
|
|
||||||
from: coverImageProvider,
|
|
||||||
name: r'coverImageProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$coverImageHash,
|
|
||||||
dependencies: CoverImageFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
CoverImageFamily._allTransitiveDependencies,
|
|
||||||
itemId: itemId,
|
|
||||||
);
|
|
||||||
|
|
||||||
CoverImageProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.itemId,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String itemId;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Stream<Uint8List> runNotifierBuild(
|
|
||||||
covariant CoverImage notifier,
|
|
||||||
) {
|
|
||||||
return notifier.build(
|
|
||||||
itemId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(CoverImage Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: CoverImageProvider._internal(
|
|
||||||
() => create()..itemId = itemId,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
itemId: itemId,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
StreamNotifierProviderElement<CoverImage, Uint8List> createElement() {
|
|
||||||
return _CoverImageProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is CoverImageProvider && other.itemId == itemId;
|
return other is CoverImageProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, itemId.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$coverImageHash() => r'89cc4783cbc76bb41beae34384d92fb277135c75';
|
||||||
// ignore: unused_element
|
|
||||||
mixin CoverImageRef on StreamNotifierProviderRef<Uint8List> {
|
|
||||||
/// The parameter `itemId` of this provider.
|
|
||||||
String get itemId;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _CoverImageProviderElement
|
final class CoverImageFamily extends $Family
|
||||||
extends StreamNotifierProviderElement<CoverImage, Uint8List>
|
with
|
||||||
with CoverImageRef {
|
$ClassFamilyOverride<
|
||||||
_CoverImageProviderElement(super.provider);
|
CoverImage,
|
||||||
|
AsyncValue<Uint8List>,
|
||||||
|
Uint8List,
|
||||||
|
Stream<Uint8List>,
|
||||||
|
String
|
||||||
|
> {
|
||||||
|
CoverImageFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'coverImageProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
CoverImageProvider call(String itemId) =>
|
||||||
|
CoverImageProvider._(argument: itemId, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get itemId => (origin as CoverImageProvider).itemId;
|
String toString() => r'coverImageProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class _$CoverImage extends $StreamNotifier<Uint8List> {
|
||||||
|
late final _$args = ref.$arg as String;
|
||||||
|
String get itemId => _$args;
|
||||||
|
|
||||||
|
Stream<Uint8List> build(String itemId);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final ref = this.ref as $Ref<AsyncValue<Uint8List>, Uint8List>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<AsyncValue<Uint8List>, Uint8List>,
|
||||||
|
AsyncValue<Uint8List>,
|
||||||
|
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,184 +6,112 @@ part of 'library_item_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$libraryItemHash() => r'a3cfa7f912e9498a70b5782899018b6964d6445c';
|
// 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 _$LibraryItem
|
|
||||||
extends BuildlessStreamNotifier<shelfsdk.LibraryItemExpanded> {
|
|
||||||
late final String id;
|
|
||||||
|
|
||||||
Stream<shelfsdk.LibraryItemExpanded> build(
|
|
||||||
String id,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// provides the library item for the given id
|
/// provides the library item for the given id
|
||||||
///
|
|
||||||
/// Copied from [LibraryItem].
|
|
||||||
@ProviderFor(LibraryItem)
|
@ProviderFor(LibraryItem)
|
||||||
const libraryItemProvider = LibraryItemFamily();
|
final libraryItemProvider = LibraryItemFamily._();
|
||||||
|
|
||||||
/// provides the library item for the given id
|
/// provides the library item for the given id
|
||||||
///
|
final class LibraryItemProvider
|
||||||
/// Copied from [LibraryItem].
|
extends $StreamNotifierProvider<LibraryItem, shelfsdk.LibraryItemExpanded> {
|
||||||
class LibraryItemFamily
|
|
||||||
extends Family<AsyncValue<shelfsdk.LibraryItemExpanded>> {
|
|
||||||
/// provides the library item for the given id
|
/// provides the library item for the given id
|
||||||
///
|
LibraryItemProvider._({
|
||||||
/// Copied from [LibraryItem].
|
required LibraryItemFamily super.from,
|
||||||
const LibraryItemFamily();
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'libraryItemProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// provides the library item for the given id
|
@override
|
||||||
///
|
String debugGetCreateSourceHash() => _$libraryItemHash();
|
||||||
/// Copied from [LibraryItem].
|
|
||||||
LibraryItemProvider call(
|
@override
|
||||||
String id,
|
String toString() {
|
||||||
) {
|
return r'libraryItemProvider'
|
||||||
return LibraryItemProvider(
|
''
|
||||||
id,
|
'($argument)';
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
LibraryItemProvider getProviderOverride(
|
LibraryItem create() => LibraryItem();
|
||||||
covariant LibraryItemProvider provider,
|
|
||||||
) {
|
|
||||||
return call(
|
|
||||||
provider.id,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
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'libraryItemProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// provides the library item for the given id
|
|
||||||
///
|
|
||||||
/// Copied from [LibraryItem].
|
|
||||||
class LibraryItemProvider extends StreamNotifierProviderImpl<LibraryItem,
|
|
||||||
shelfsdk.LibraryItemExpanded> {
|
|
||||||
/// provides the library item for the given id
|
|
||||||
///
|
|
||||||
/// Copied from [LibraryItem].
|
|
||||||
LibraryItemProvider(
|
|
||||||
String id,
|
|
||||||
) : this._internal(
|
|
||||||
() => LibraryItem()..id = id,
|
|
||||||
from: libraryItemProvider,
|
|
||||||
name: r'libraryItemProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$libraryItemHash,
|
|
||||||
dependencies: LibraryItemFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
LibraryItemFamily._allTransitiveDependencies,
|
|
||||||
id: id,
|
|
||||||
);
|
|
||||||
|
|
||||||
LibraryItemProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.id,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String id;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Stream<shelfsdk.LibraryItemExpanded> runNotifierBuild(
|
|
||||||
covariant LibraryItem notifier,
|
|
||||||
) {
|
|
||||||
return notifier.build(
|
|
||||||
id,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(LibraryItem Function() create) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: LibraryItemProvider._internal(
|
|
||||||
() => create()..id = id,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
id: id,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
StreamNotifierProviderElement<LibraryItem, shelfsdk.LibraryItemExpanded>
|
|
||||||
createElement() {
|
|
||||||
return _LibraryItemProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is LibraryItemProvider && other.id == id;
|
return other is LibraryItemProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, id.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$libraryItemHash() => r'a3cfa7f912e9498a70b5782899018b6964d6445c';
|
||||||
// ignore: unused_element
|
|
||||||
mixin LibraryItemRef
|
|
||||||
on StreamNotifierProviderRef<shelfsdk.LibraryItemExpanded> {
|
|
||||||
/// The parameter `id` of this provider.
|
|
||||||
String get id;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _LibraryItemProviderElement extends StreamNotifierProviderElement<
|
/// provides the library item for the given id
|
||||||
LibraryItem, shelfsdk.LibraryItemExpanded> with LibraryItemRef {
|
|
||||||
_LibraryItemProviderElement(super.provider);
|
final class LibraryItemFamily extends $Family
|
||||||
|
with
|
||||||
|
$ClassFamilyOverride<
|
||||||
|
LibraryItem,
|
||||||
|
AsyncValue<shelfsdk.LibraryItemExpanded>,
|
||||||
|
shelfsdk.LibraryItemExpanded,
|
||||||
|
Stream<shelfsdk.LibraryItemExpanded>,
|
||||||
|
String
|
||||||
|
> {
|
||||||
|
LibraryItemFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'libraryItemProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
/// provides the library item for the given id
|
||||||
|
|
||||||
|
LibraryItemProvider call(String id) =>
|
||||||
|
LibraryItemProvider._(argument: id, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get id => (origin as LibraryItemProvider).id;
|
String toString() => r'libraryItemProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
/// provides the library item for the given id
|
||||||
|
|
||||||
|
abstract class _$LibraryItem
|
||||||
|
extends $StreamNotifier<shelfsdk.LibraryItemExpanded> {
|
||||||
|
late final _$args = ref.$arg as String;
|
||||||
|
String get id => _$args;
|
||||||
|
|
||||||
|
Stream<shelfsdk.LibraryItemExpanded> build(String id);
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final ref =
|
||||||
|
this.ref
|
||||||
|
as $Ref<
|
||||||
|
AsyncValue<shelfsdk.LibraryItemExpanded>,
|
||||||
|
shelfsdk.LibraryItemExpanded
|
||||||
|
>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<
|
||||||
|
AsyncValue<shelfsdk.LibraryItemExpanded>,
|
||||||
|
shelfsdk.LibraryItemExpanded
|
||||||
|
>,
|
||||||
|
AsyncValue<shelfsdk.LibraryItemExpanded>,
|
||||||
|
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
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart' show Ref;
|
import 'package:hooks_riverpod/hooks_riverpod.dart'
|
||||||
|
show Ref, ProviderListenableSelect;
|
||||||
import 'package:logging/logging.dart' show Logger;
|
import 'package:logging/logging.dart' show Logger;
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,187 +6,153 @@ part of 'library_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$libraryHash() => r'f8a34100acb58f02fa958c71a629577bf815710e';
|
// 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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [library].
|
|
||||||
@ProviderFor(library)
|
@ProviderFor(library)
|
||||||
const libraryProvider = LibraryFamily();
|
final libraryProvider = LibraryFamily._();
|
||||||
|
|
||||||
/// See also [library].
|
final class LibraryProvider
|
||||||
class LibraryFamily extends Family<AsyncValue<Library?>> {
|
extends
|
||||||
/// See also [library].
|
$FunctionalProvider<AsyncValue<Library?>, Library?, FutureOr<Library?>>
|
||||||
const LibraryFamily();
|
with $FutureModifier<Library?>, $FutureProvider<Library?> {
|
||||||
|
LibraryProvider._({
|
||||||
|
required LibraryFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'libraryProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [library].
|
@override
|
||||||
LibraryProvider call(
|
String debugGetCreateSourceHash() => _$libraryHash();
|
||||||
String id,
|
|
||||||
) {
|
@override
|
||||||
return LibraryProvider(
|
String toString() {
|
||||||
id,
|
return r'libraryProvider'
|
||||||
);
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
LibraryProvider getProviderOverride(
|
$FutureProviderElement<Library?> $createElement($ProviderPointer pointer) =>
|
||||||
covariant LibraryProvider provider,
|
$FutureProviderElement(pointer);
|
||||||
) {
|
|
||||||
return call(
|
|
||||||
provider.id,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
FutureOr<Library?> create(Ref ref) {
|
||||||
|
final argument = this.argument as String;
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
return library(ref, argument);
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'libraryProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [library].
|
|
||||||
class LibraryProvider extends AutoDisposeFutureProvider<Library?> {
|
|
||||||
/// See also [library].
|
|
||||||
LibraryProvider(
|
|
||||||
String id,
|
|
||||||
) : this._internal(
|
|
||||||
(ref) => library(
|
|
||||||
ref as LibraryRef,
|
|
||||||
id,
|
|
||||||
),
|
|
||||||
from: libraryProvider,
|
|
||||||
name: r'libraryProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$libraryHash,
|
|
||||||
dependencies: LibraryFamily._dependencies,
|
|
||||||
allTransitiveDependencies: LibraryFamily._allTransitiveDependencies,
|
|
||||||
id: id,
|
|
||||||
);
|
|
||||||
|
|
||||||
LibraryProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.id,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String id;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(
|
|
||||||
FutureOr<Library?> Function(LibraryRef provider) create,
|
|
||||||
) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: LibraryProvider._internal(
|
|
||||||
(ref) => create(ref as LibraryRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
id: id,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeFutureProviderElement<Library?> createElement() {
|
|
||||||
return _LibraryProviderElement(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is LibraryProvider && other.id == id;
|
return other is LibraryProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, id.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$libraryHash() => r'f8a34100acb58f02fa958c71a629577bf815710e';
|
||||||
// ignore: unused_element
|
|
||||||
mixin LibraryRef on AutoDisposeFutureProviderRef<Library?> {
|
|
||||||
/// The parameter `id` of this provider.
|
|
||||||
String get id;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _LibraryProviderElement extends AutoDisposeFutureProviderElement<Library?>
|
final class LibraryFamily extends $Family
|
||||||
with LibraryRef {
|
with $FunctionalFamilyOverride<FutureOr<Library?>, String> {
|
||||||
_LibraryProviderElement(super.provider);
|
LibraryFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'libraryProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
LibraryProvider call(String id) =>
|
||||||
|
LibraryProvider._(argument: id, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get id => (origin as LibraryProvider).id;
|
String toString() => r'libraryProvider';
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(currentLibrary)
|
||||||
|
final currentLibraryProvider = CurrentLibraryProvider._();
|
||||||
|
|
||||||
|
final class CurrentLibraryProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<AsyncValue<Library?>, Library?, FutureOr<Library?>>
|
||||||
|
with $FutureModifier<Library?>, $FutureProvider<Library?> {
|
||||||
|
CurrentLibraryProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'currentLibraryProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$currentLibraryHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<Library?> $createElement($ProviderPointer pointer) =>
|
||||||
|
$FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<Library?> create(Ref ref) {
|
||||||
|
return currentLibrary(ref);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$currentLibraryHash() => r'658498a531e04a01e2b3915a3319101285601118';
|
String _$currentLibraryHash() => r'658498a531e04a01e2b3915a3319101285601118';
|
||||||
|
|
||||||
/// See also [currentLibrary].
|
@ProviderFor(Libraries)
|
||||||
@ProviderFor(currentLibrary)
|
final librariesProvider = LibrariesProvider._();
|
||||||
final currentLibraryProvider = AutoDisposeFutureProvider<Library?>.internal(
|
|
||||||
currentLibrary,
|
final class LibrariesProvider
|
||||||
name: r'currentLibraryProvider',
|
extends $AsyncNotifierProvider<Libraries, List<Library>> {
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
LibrariesProvider._()
|
||||||
? null
|
: super(
|
||||||
: _$currentLibraryHash,
|
from: null,
|
||||||
dependencies: null,
|
argument: null,
|
||||||
allTransitiveDependencies: null,
|
retry: null,
|
||||||
);
|
name: r'librariesProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$librariesHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
Libraries create() => Libraries();
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef CurrentLibraryRef = AutoDisposeFutureProviderRef<Library?>;
|
|
||||||
String _$librariesHash() => r'95ebd4d1ac0cc2acf7617dc22895eff0ca30600f';
|
String _$librariesHash() => r'95ebd4d1ac0cc2acf7617dc22895eff0ca30600f';
|
||||||
|
|
||||||
/// See also [Libraries].
|
abstract class _$Libraries extends $AsyncNotifier<List<Library>> {
|
||||||
@ProviderFor(Libraries)
|
FutureOr<List<Library>> build();
|
||||||
final librariesProvider =
|
@$mustCallSuper
|
||||||
AutoDisposeAsyncNotifierProvider<Libraries, List<Library>>.internal(
|
@override
|
||||||
Libraries.new,
|
void runBuild() {
|
||||||
name: r'librariesProvider',
|
final ref = this.ref as $Ref<AsyncValue<List<Library>>, List<Library>>;
|
||||||
debugGetCreateSourceHash:
|
final element =
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$librariesHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<AsyncValue<List<Library>>, List<Library>>,
|
||||||
);
|
AsyncValue<List<Library>>,
|
||||||
|
Object?,
|
||||||
typedef _$Libraries = AutoDisposeAsyncNotifier<List<Library>>;
|
Object?
|
||||||
// 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
|
element.handleCreate(ref, build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class ServerAlreadyExistsException implements Exception {
|
||||||
class AudiobookShelfServer extends _$AudiobookShelfServer {
|
class AudiobookShelfServer extends _$AudiobookShelfServer {
|
||||||
@override
|
@override
|
||||||
Set<model.AudiobookShelfServer> build() {
|
Set<model.AudiobookShelfServer> build() {
|
||||||
ref.listenSelf((_, __) {
|
listenSelf((_, __) {
|
||||||
writeStateToBox();
|
writeStateToBox();
|
||||||
});
|
});
|
||||||
// get the app settings
|
// get the app settings
|
||||||
|
|
|
||||||
|
|
@ -6,25 +6,78 @@ part of 'server_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$audiobookShelfServerHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'31a96b431221965cd586aad670a32ca901539e41';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
/// provides with a set of servers added by the user
|
||||||
|
|
||||||
|
@ProviderFor(AudiobookShelfServer)
|
||||||
|
final audiobookShelfServerProvider = AudiobookShelfServerProvider._();
|
||||||
|
|
||||||
/// provides with a set of servers added by the user
|
/// provides with a set of servers added by the user
|
||||||
///
|
final class AudiobookShelfServerProvider
|
||||||
/// Copied from [AudiobookShelfServer].
|
extends
|
||||||
@ProviderFor(AudiobookShelfServer)
|
$NotifierProvider<
|
||||||
final audiobookShelfServerProvider = AutoDisposeNotifierProvider<
|
AudiobookShelfServer,
|
||||||
AudiobookShelfServer, Set<model.AudiobookShelfServer>>.internal(
|
Set<model.AudiobookShelfServer>
|
||||||
AudiobookShelfServer.new,
|
> {
|
||||||
name: r'audiobookShelfServerProvider',
|
/// provides with a set of servers added by the user
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
AudiobookShelfServerProvider._()
|
||||||
? null
|
: super(
|
||||||
: _$audiobookShelfServerHash,
|
from: null,
|
||||||
dependencies: null,
|
argument: null,
|
||||||
allTransitiveDependencies: null,
|
retry: null,
|
||||||
);
|
name: r'audiobookShelfServerProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
typedef _$AudiobookShelfServer
|
@override
|
||||||
= AutoDisposeNotifier<Set<model.AudiobookShelfServer>>;
|
String debugGetCreateSourceHash() => _$audiobookShelfServerHash();
|
||||||
// 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
|
@$internal
|
||||||
|
@override
|
||||||
|
AudiobookShelfServer create() => AudiobookShelfServer();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(Set<model.AudiobookShelfServer> value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<Set<model.AudiobookShelfServer>>(
|
||||||
|
value,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$audiobookShelfServerHash() =>
|
||||||
|
r'144817dcb3704b80c5b60763167fcf932f00c29c';
|
||||||
|
|
||||||
|
/// provides with a set of servers added by the user
|
||||||
|
|
||||||
|
abstract class _$AudiobookShelfServer
|
||||||
|
extends $Notifier<Set<model.AudiobookShelfServer>> {
|
||||||
|
Set<model.AudiobookShelfServer> build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final ref =
|
||||||
|
this.ref
|
||||||
|
as $Ref<
|
||||||
|
Set<model.AudiobookShelfServer>,
|
||||||
|
Set<model.AudiobookShelfServer>
|
||||||
|
>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<
|
||||||
|
Set<model.AudiobookShelfServer>,
|
||||||
|
Set<model.AudiobookShelfServer>
|
||||||
|
>,
|
||||||
|
Set<model.AudiobookShelfServer>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleCreate(ref, build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:flutter/foundation.dart' show immutable;
|
import 'package:flutter/foundation.dart' show immutable;
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive_plus_secure/hive_plus_secure.dart';
|
||||||
import 'package:vaani/features/per_book_settings/models/book_settings.dart';
|
import 'package:vaani/features/per_book_settings/models/book_settings.dart';
|
||||||
import 'package:vaani/settings/models/models.dart';
|
import 'package:vaani/settings/models/models.dart';
|
||||||
|
|
||||||
|
|
|
||||||
1009
lib/db/cache/schemas/image.g.dart
vendored
1009
lib/db/cache/schemas/image.g.dart
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive_plus_secure/hive_plus_secure.dart';
|
||||||
import 'package:path/path.dart' as p;
|
import 'package:path/path.dart' as p;
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:vaani/main.dart';
|
import 'package:vaani/main.dart';
|
||||||
|
|
|
||||||
|
|
@ -1,496 +0,0 @@
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'book_prefs.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// _IsarCollectionGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
// coverage:ignore-file
|
|
||||||
// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
|
|
||||||
extension GetBookPrefsCollection on Isar {
|
|
||||||
IsarCollection<int, BookPrefs> get bookPrefs => this.collection();
|
|
||||||
}
|
|
||||||
|
|
||||||
const BookPrefsSchema = IsarGeneratedSchema(
|
|
||||||
schema: IsarSchema(
|
|
||||||
name: 'BookPrefs',
|
|
||||||
idName: 'libItemId',
|
|
||||||
embedded: false,
|
|
||||||
properties: [
|
|
||||||
IsarPropertySchema(
|
|
||||||
name: 'speed',
|
|
||||||
type: IsarType.double,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
indexes: [],
|
|
||||||
),
|
|
||||||
converter: IsarObjectConverter<int, BookPrefs>(
|
|
||||||
serialize: serializeBookPrefs,
|
|
||||||
deserialize: deserializeBookPrefs,
|
|
||||||
deserializeProperty: deserializeBookPrefsProp,
|
|
||||||
),
|
|
||||||
embeddedSchemas: [],
|
|
||||||
);
|
|
||||||
|
|
||||||
@isarProtected
|
|
||||||
int serializeBookPrefs(IsarWriter writer, BookPrefs object) {
|
|
||||||
IsarCore.writeDouble(writer, 1, object.speed ?? double.nan);
|
|
||||||
return object.libItemId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@isarProtected
|
|
||||||
BookPrefs deserializeBookPrefs(IsarReader reader) {
|
|
||||||
final int _libItemId;
|
|
||||||
_libItemId = IsarCore.readId(reader);
|
|
||||||
final double? _speed;
|
|
||||||
{
|
|
||||||
final value = IsarCore.readDouble(reader, 1);
|
|
||||||
if (value.isNaN) {
|
|
||||||
_speed = null;
|
|
||||||
} else {
|
|
||||||
_speed = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
final object = BookPrefs(
|
|
||||||
libItemId: _libItemId,
|
|
||||||
speed: _speed,
|
|
||||||
);
|
|
||||||
return object;
|
|
||||||
}
|
|
||||||
|
|
||||||
@isarProtected
|
|
||||||
dynamic deserializeBookPrefsProp(IsarReader reader, int property) {
|
|
||||||
switch (property) {
|
|
||||||
case 0:
|
|
||||||
return IsarCore.readId(reader);
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
final value = IsarCore.readDouble(reader, 1);
|
|
||||||
if (value.isNaN) {
|
|
||||||
return null;
|
|
||||||
} else {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
throw ArgumentError('Unknown property: $property');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sealed class _BookPrefsUpdate {
|
|
||||||
bool call({
|
|
||||||
required int libItemId,
|
|
||||||
double? speed,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
class _BookPrefsUpdateImpl implements _BookPrefsUpdate {
|
|
||||||
const _BookPrefsUpdateImpl(this.collection);
|
|
||||||
|
|
||||||
final IsarCollection<int, BookPrefs> collection;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool call({
|
|
||||||
required int libItemId,
|
|
||||||
Object? speed = ignore,
|
|
||||||
}) {
|
|
||||||
return collection.updateProperties([
|
|
||||||
libItemId
|
|
||||||
], {
|
|
||||||
if (speed != ignore) 1: speed as double?,
|
|
||||||
}) >
|
|
||||||
0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sealed class _BookPrefsUpdateAll {
|
|
||||||
int call({
|
|
||||||
required List<int> libItemId,
|
|
||||||
double? speed,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
class _BookPrefsUpdateAllImpl implements _BookPrefsUpdateAll {
|
|
||||||
const _BookPrefsUpdateAllImpl(this.collection);
|
|
||||||
|
|
||||||
final IsarCollection<int, BookPrefs> collection;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int call({
|
|
||||||
required List<int> libItemId,
|
|
||||||
Object? speed = ignore,
|
|
||||||
}) {
|
|
||||||
return collection.updateProperties(libItemId, {
|
|
||||||
if (speed != ignore) 1: speed as double?,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension BookPrefsUpdate on IsarCollection<int, BookPrefs> {
|
|
||||||
_BookPrefsUpdate get update => _BookPrefsUpdateImpl(this);
|
|
||||||
|
|
||||||
_BookPrefsUpdateAll get updateAll => _BookPrefsUpdateAllImpl(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
sealed class _BookPrefsQueryUpdate {
|
|
||||||
int call({
|
|
||||||
double? speed,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
class _BookPrefsQueryUpdateImpl implements _BookPrefsQueryUpdate {
|
|
||||||
const _BookPrefsQueryUpdateImpl(this.query, {this.limit});
|
|
||||||
|
|
||||||
final IsarQuery<BookPrefs> query;
|
|
||||||
final int? limit;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int call({
|
|
||||||
Object? speed = ignore,
|
|
||||||
}) {
|
|
||||||
return query.updateProperties(limit: limit, {
|
|
||||||
if (speed != ignore) 1: speed as double?,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension BookPrefsQueryUpdate on IsarQuery<BookPrefs> {
|
|
||||||
_BookPrefsQueryUpdate get updateFirst =>
|
|
||||||
_BookPrefsQueryUpdateImpl(this, limit: 1);
|
|
||||||
|
|
||||||
_BookPrefsQueryUpdate get updateAll => _BookPrefsQueryUpdateImpl(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
class _BookPrefsQueryBuilderUpdateImpl implements _BookPrefsQueryUpdate {
|
|
||||||
const _BookPrefsQueryBuilderUpdateImpl(this.query, {this.limit});
|
|
||||||
|
|
||||||
final QueryBuilder<BookPrefs, BookPrefs, QOperations> query;
|
|
||||||
final int? limit;
|
|
||||||
|
|
||||||
@override
|
|
||||||
int call({
|
|
||||||
Object? speed = ignore,
|
|
||||||
}) {
|
|
||||||
final q = query.build();
|
|
||||||
try {
|
|
||||||
return q.updateProperties(limit: limit, {
|
|
||||||
if (speed != ignore) 1: speed as double?,
|
|
||||||
});
|
|
||||||
} finally {
|
|
||||||
q.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension BookPrefsQueryBuilderUpdate
|
|
||||||
on QueryBuilder<BookPrefs, BookPrefs, QOperations> {
|
|
||||||
_BookPrefsQueryUpdate get updateFirst =>
|
|
||||||
_BookPrefsQueryBuilderUpdateImpl(this, limit: 1);
|
|
||||||
|
|
||||||
_BookPrefsQueryUpdate get updateAll => _BookPrefsQueryBuilderUpdateImpl(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
extension BookPrefsQueryFilter
|
|
||||||
on QueryBuilder<BookPrefs, BookPrefs, QFilterCondition> {
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> libItemIdEqualTo(
|
|
||||||
int value,
|
|
||||||
) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
EqualCondition(
|
|
||||||
property: 0,
|
|
||||||
value: value,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition>
|
|
||||||
libItemIdGreaterThan(
|
|
||||||
int value,
|
|
||||||
) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
GreaterCondition(
|
|
||||||
property: 0,
|
|
||||||
value: value,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition>
|
|
||||||
libItemIdGreaterThanOrEqualTo(
|
|
||||||
int value,
|
|
||||||
) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
GreaterOrEqualCondition(
|
|
||||||
property: 0,
|
|
||||||
value: value,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> libItemIdLessThan(
|
|
||||||
int value,
|
|
||||||
) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
LessCondition(
|
|
||||||
property: 0,
|
|
||||||
value: value,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition>
|
|
||||||
libItemIdLessThanOrEqualTo(
|
|
||||||
int value,
|
|
||||||
) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
LessOrEqualCondition(
|
|
||||||
property: 0,
|
|
||||||
value: value,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> libItemIdBetween(
|
|
||||||
int lower,
|
|
||||||
int upper,
|
|
||||||
) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
BetweenCondition(
|
|
||||||
property: 0,
|
|
||||||
lower: lower,
|
|
||||||
upper: upper,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedIsNull() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(const IsNullCondition(property: 1));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedIsNotNull() {
|
|
||||||
return QueryBuilder.apply(not(), (query) {
|
|
||||||
return query.addFilterCondition(const IsNullCondition(property: 1));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedEqualTo(
|
|
||||||
double? value, {
|
|
||||||
double epsilon = Filter.epsilon,
|
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
EqualCondition(
|
|
||||||
property: 1,
|
|
||||||
value: value,
|
|
||||||
epsilon: epsilon,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedGreaterThan(
|
|
||||||
double? value, {
|
|
||||||
double epsilon = Filter.epsilon,
|
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
GreaterCondition(
|
|
||||||
property: 1,
|
|
||||||
value: value,
|
|
||||||
epsilon: epsilon,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition>
|
|
||||||
speedGreaterThanOrEqualTo(
|
|
||||||
double? value, {
|
|
||||||
double epsilon = Filter.epsilon,
|
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
GreaterOrEqualCondition(
|
|
||||||
property: 1,
|
|
||||||
value: value,
|
|
||||||
epsilon: epsilon,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedLessThan(
|
|
||||||
double? value, {
|
|
||||||
double epsilon = Filter.epsilon,
|
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
LessCondition(
|
|
||||||
property: 1,
|
|
||||||
value: value,
|
|
||||||
epsilon: epsilon,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition>
|
|
||||||
speedLessThanOrEqualTo(
|
|
||||||
double? value, {
|
|
||||||
double epsilon = Filter.epsilon,
|
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
LessOrEqualCondition(
|
|
||||||
property: 1,
|
|
||||||
value: value,
|
|
||||||
epsilon: epsilon,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterFilterCondition> speedBetween(
|
|
||||||
double? lower,
|
|
||||||
double? upper, {
|
|
||||||
double epsilon = Filter.epsilon,
|
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
BetweenCondition(
|
|
||||||
property: 1,
|
|
||||||
lower: lower,
|
|
||||||
upper: upper,
|
|
||||||
epsilon: epsilon,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension BookPrefsQueryObject
|
|
||||||
on QueryBuilder<BookPrefs, BookPrefs, QFilterCondition> {}
|
|
||||||
|
|
||||||
extension BookPrefsQuerySortBy on QueryBuilder<BookPrefs, BookPrefs, QSortBy> {
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> sortByLibItemId() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addSortBy(0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> sortByLibItemIdDesc() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addSortBy(0, sort: Sort.desc);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> sortBySpeed() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addSortBy(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> sortBySpeedDesc() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addSortBy(1, sort: Sort.desc);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension BookPrefsQuerySortThenBy
|
|
||||||
on QueryBuilder<BookPrefs, BookPrefs, QSortThenBy> {
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> thenByLibItemId() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addSortBy(0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> thenByLibItemIdDesc() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addSortBy(0, sort: Sort.desc);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> thenBySpeed() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addSortBy(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterSortBy> thenBySpeedDesc() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addSortBy(1, sort: Sort.desc);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension BookPrefsQueryWhereDistinct
|
|
||||||
on QueryBuilder<BookPrefs, BookPrefs, QDistinct> {
|
|
||||||
QueryBuilder<BookPrefs, BookPrefs, QAfterDistinct> distinctBySpeed() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addDistinctBy(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension BookPrefsQueryProperty1
|
|
||||||
on QueryBuilder<BookPrefs, BookPrefs, QProperty> {
|
|
||||||
QueryBuilder<BookPrefs, int, QAfterProperty> libItemIdProperty() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addProperty(0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, double?, QAfterProperty> speedProperty() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addProperty(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension BookPrefsQueryProperty2<R>
|
|
||||||
on QueryBuilder<BookPrefs, R, QAfterProperty> {
|
|
||||||
QueryBuilder<BookPrefs, (R, int), QAfterProperty> libItemIdProperty() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addProperty(0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, (R, double?), QAfterProperty> speedProperty() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addProperty(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension BookPrefsQueryProperty3<R1, R2>
|
|
||||||
on QueryBuilder<BookPrefs, (R1, R2), QAfterProperty> {
|
|
||||||
QueryBuilder<BookPrefs, (R1, R2, int), QOperations> libItemIdProperty() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addProperty(0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<BookPrefs, (R1, R2, double?), QOperations> speedProperty() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addProperty(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive_plus_secure/hive_plus_secure.dart';
|
||||||
import 'package:vaani/features/per_book_settings/models/book_settings.dart';
|
import 'package:vaani/features/per_book_settings/models/book_settings.dart';
|
||||||
import 'package:vaani/settings/models/models.dart';
|
import 'package:vaani/settings/models/models.dart';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ class ItemDownloadProgress extends _$ItemDownloadProgress {
|
||||||
final totalDownloadedSize = downloadedSize + inProgressFileSize;
|
final totalDownloadedSize = downloadedSize + inProgressFileSize;
|
||||||
final progress = totalDownloadedSize / totalSize;
|
final progress = totalDownloadedSize / totalSize;
|
||||||
// if current progress is more than calculated progress, do not update
|
// if current progress is more than calculated progress, do not update
|
||||||
if (progress < (state.valueOrNull ?? 0.0)) {
|
if (progress < (state.value ?? 0.0)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -6,24 +6,64 @@ part of 'search_controller.dart';
|
||||||
// RiverpodGenerator
|
// 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() =>
|
String _$globalSearchControllerHash() =>
|
||||||
r'd854ace6f2e00a10fc33aba63051375f82ad1b10';
|
r'd854ace6f2e00a10fc33aba63051375f82ad1b10';
|
||||||
|
|
||||||
/// The controller for the search bar.
|
/// 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>>;
|
abstract class _$GlobalSearchController
|
||||||
// ignore_for_file: type=lint
|
extends $Notifier<Raw<SearchController>> {
|
||||||
// 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
|
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
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$searchResultHash() => r'33785de298ad0d53c9d21e8fec88ba2f22f1363f';
|
// 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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The provider for the search result.
|
/// The provider for the search result.
|
||||||
///
|
|
||||||
/// Copied from [searchResult].
|
|
||||||
@ProviderFor(searchResult)
|
@ProviderFor(searchResult)
|
||||||
const searchResultProvider = SearchResultFamily();
|
final searchResultProvider = SearchResultFamily._();
|
||||||
|
|
||||||
/// The provider for the search result.
|
/// 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.
|
/// The provider for the search result.
|
||||||
///
|
SearchResultProvider._({
|
||||||
/// Copied from [searchResult].
|
required SearchResultFamily super.from,
|
||||||
SearchResultProvider call(
|
required (String, {int limit}) super.argument,
|
||||||
String query, {
|
}) : super(
|
||||||
int limit = 25,
|
retry: null,
|
||||||
}) {
|
name: r'searchResultProvider',
|
||||||
return SearchResultProvider(
|
isAutoDispose: true,
|
||||||
query,
|
dependencies: null,
|
||||||
limit: limit,
|
$allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$searchResultHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'searchResultProvider'
|
||||||
|
''
|
||||||
|
'$argument';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
SearchResultProvider getProviderOverride(
|
$FutureProviderElement<LibrarySearchResponse?> $createElement(
|
||||||
covariant SearchResultProvider provider,
|
$ProviderPointer pointer,
|
||||||
) {
|
) => $FutureProviderElement(pointer);
|
||||||
return call(
|
|
||||||
provider.query,
|
|
||||||
limit: provider.limit,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
FutureOr<LibrarySearchResponse?> create(Ref ref) {
|
||||||
|
final argument = this.argument as (String, {int limit});
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
return searchResult(ref, argument.$1, limit: argument.limit);
|
||||||
|
|
||||||
@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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is SearchResultProvider &&
|
return other is SearchResultProvider && other.argument == argument;
|
||||||
other.query == query &&
|
|
||||||
other.limit == limit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, query.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, limit.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$searchResultHash() => r'33785de298ad0d53c9d21e8fec88ba2f22f1363f';
|
||||||
// ignore: unused_element
|
|
||||||
mixin SearchResultRef on AutoDisposeFutureProviderRef<LibrarySearchResponse?> {
|
|
||||||
/// The parameter `query` of this provider.
|
|
||||||
String get query;
|
|
||||||
|
|
||||||
/// The parameter `limit` of this provider.
|
/// The provider for the search result.
|
||||||
int get limit;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SearchResultProviderElement
|
final class SearchResultFamily extends $Family
|
||||||
extends AutoDisposeFutureProviderElement<LibrarySearchResponse?>
|
with
|
||||||
with SearchResultRef {
|
$FunctionalFamilyOverride<
|
||||||
_SearchResultProviderElement(super.provider);
|
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
|
@override
|
||||||
String get query => (origin as SearchResultProvider).query;
|
String toString() => r'searchResultProvider';
|
||||||
@override
|
|
||||||
int get limit => (origin as SearchResultProvider).limit;
|
|
||||||
}
|
}
|
||||||
// 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
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
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
|
final image = item == null
|
||||||
? const AsyncValue.loading()
|
? const AsyncValue.loading()
|
||||||
: ref.watch(coverImageProvider(item.id));
|
: ref.watch(coverImageProvider(item.id));
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class LibraryItemActions extends HookConsumerWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
final item = ref.watch(libraryItemProvider(id)).value;
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
@ -216,7 +216,7 @@ class LibItemDownloadButton extends HookConsumerWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final isItemDownloaded = ref.watch(isItemDownloadedProvider(item));
|
final isItemDownloaded = ref.watch(isItemDownloadedProvider(item));
|
||||||
if (isItemDownloaded.valueOrNull ?? false) {
|
if (isItemDownloaded.value ?? false) {
|
||||||
return AlreadyItemDownloadedButton(item: item);
|
return AlreadyItemDownloadedButton(item: item);
|
||||||
}
|
}
|
||||||
final isItemDownloading = ref.watch(isItemDownloadingProvider(item.id));
|
final isItemDownloading = ref.watch(isItemDownloadingProvider(item.id));
|
||||||
|
|
@ -252,7 +252,7 @@ class ItemCurrentlyInDownloadQueue extends HookConsumerWidget {
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final progress = ref
|
final progress = ref
|
||||||
.watch(itemDownloadProgressProvider(item.id))
|
.watch(itemDownloadProgressProvider(item.id))
|
||||||
.valueOrNull
|
.value
|
||||||
?.clamp(0.05, 1.0);
|
?.clamp(0.05, 1.0);
|
||||||
|
|
||||||
if (progress == 1) {
|
if (progress == 1) {
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ class _BookDetails extends HookConsumerWidget {
|
||||||
final itemFromApi = ref.watch(libraryItemProvider(id));
|
final itemFromApi = ref.watch(libraryItemProvider(id));
|
||||||
|
|
||||||
final itemBookMetadata =
|
final itemBookMetadata =
|
||||||
itemFromApi.valueOrNull?.media.metadata.asBookMetadataExpanded;
|
itemFromApi.value?.media.metadata.asBookMetadataExpanded;
|
||||||
|
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -143,7 +143,7 @@ class _LibraryItemProgressIndicator extends HookConsumerWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final player = ref.watch(audiobookPlayerProvider);
|
final player = ref.watch(audiobookPlayerProvider);
|
||||||
final libraryItem = ref.watch(libraryItemProvider(id)).valueOrNull;
|
final libraryItem = ref.watch(libraryItemProvider(id)).value;
|
||||||
if (libraryItem == null) {
|
if (libraryItem == null) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
@ -362,7 +362,7 @@ class _BookCover extends HookConsumerWidget {
|
||||||
MediaQuery.of(context).highContrast,
|
MediaQuery.of(context).highContrast,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.valueOrNull;
|
.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ThemeSwitcher(
|
return ThemeSwitcher(
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ class LibraryItemMetadata extends HookConsumerWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
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`
|
/// formats the duration of the book as `10h 30m`
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ class LibraryItemDescription extends HookConsumerWidget {
|
||||||
final String id;
|
final String id;
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
final item = ref.watch(libraryItemProvider(id)).value;
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class LibraryItemSliverAppBar extends HookConsumerWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final item = ref.watch(libraryItemProvider(id)).valueOrNull;
|
final item = ref.watch(libraryItemProvider(id)).value;
|
||||||
|
|
||||||
final showTitle = useState(false);
|
final showTitle = useState(false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ class LibraryBrowserPage extends HookConsumerWidget {
|
||||||
const LibraryBrowserPage({super.key});
|
const LibraryBrowserPage({super.key});
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
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
|
// Determine the icon to use, with a fallback
|
||||||
final IconData libraryIconData =
|
final IconData libraryIconData =
|
||||||
|
|
|
||||||
|
|
@ -6,20 +6,48 @@ part of 'logs_provider.dart';
|
||||||
// RiverpodGenerator
|
// 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';
|
String _$logsHash() => r'aa9d3d56586cba6ddf69615320ea605d071ea5e2';
|
||||||
|
|
||||||
/// See also [Logs].
|
abstract class _$Logs extends $AsyncNotifier<List<LogRecord>> {
|
||||||
@ProviderFor(Logs)
|
FutureOr<List<LogRecord>> build();
|
||||||
final logsProvider =
|
@$mustCallSuper
|
||||||
AutoDisposeAsyncNotifierProvider<Logs, List<LogRecord>>.internal(
|
@override
|
||||||
Logs.new,
|
void runBuild() {
|
||||||
name: r'logsProvider',
|
final ref = this.ref as $Ref<AsyncValue<List<LogRecord>>, List<LogRecord>>;
|
||||||
debugGetCreateSourceHash:
|
final element =
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$logsHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<AsyncValue<List<LogRecord>>, List<LogRecord>>,
|
||||||
);
|
AsyncValue<List<LogRecord>>,
|
||||||
|
Object?,
|
||||||
typedef _$Logs = AutoDisposeAsyncNotifier<List<LogRecord>>;
|
Object?
|
||||||
// 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
|
element.handleCreate(ref, build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
part 'flow.freezed.dart';
|
part 'flow.freezed.dart';
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class Flow with _$Flow {
|
sealed class Flow with _$Flow {
|
||||||
const factory Flow({
|
const factory Flow({
|
||||||
required Uri serverUri,
|
required Uri serverUri,
|
||||||
required String state,
|
required String state,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// coverage:ignore-file
|
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
// ignore_for_file: type=lint
|
// 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
|
// 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
|
// FreezedGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
T _$identity<T>(T value) => value;
|
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
|
/// @nodoc
|
||||||
mixin _$Flow {
|
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
|
Uri get serverUri; String get state; String get verifier; Cookie get cookie; bool get isFlowComplete; String? get authToken;
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// Create a copy of Flow
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
$FlowCopyWith<Flow> get copyWith => throw _privateConstructorUsedError;
|
@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
|
/// @nodoc
|
||||||
abstract class $FlowCopyWith<$Res> {
|
abstract mixin class $FlowCopyWith<$Res> {
|
||||||
factory $FlowCopyWith(Flow value, $Res Function(Flow) then) =
|
factory $FlowCopyWith(Flow value, $Res Function(Flow) _then) = _$FlowCopyWithImpl;
|
||||||
_$FlowCopyWithImpl<$Res, Flow>;
|
@useResult
|
||||||
@useResult
|
$Res call({
|
||||||
$Res call(
|
Uri serverUri, String state, String verifier, Cookie cookie, bool isFlowComplete, String? authToken
|
||||||
{Uri serverUri,
|
});
|
||||||
String state,
|
|
||||||
String verifier,
|
|
||||||
Cookie cookie,
|
|
||||||
bool isFlowComplete,
|
|
||||||
String? authToken});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$FlowCopyWithImpl<$Res, $Val extends Flow>
|
class _$FlowCopyWithImpl<$Res>
|
||||||
implements $FlowCopyWith<$Res> {
|
implements $FlowCopyWith<$Res> {
|
||||||
_$FlowCopyWithImpl(this._value, this._then);
|
_$FlowCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
// ignore: unused_field
|
final Flow _self;
|
||||||
final $Val _value;
|
final $Res Function(Flow) _then;
|
||||||
// ignore: unused_field
|
|
||||||
final $Res Function($Val) _then;
|
|
||||||
|
|
||||||
/// Create a copy of Flow
|
/// Create a copy of Flow
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@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,}) {
|
||||||
@override
|
return _then(_self.copyWith(
|
||||||
$Res call({
|
serverUri: null == serverUri ? _self.serverUri : serverUri // ignore: cast_nullable_to_non_nullable
|
||||||
Object? serverUri = null,
|
as Uri,state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
|
||||||
Object? state = null,
|
as String,verifier: null == verifier ? _self.verifier : verifier // ignore: cast_nullable_to_non_nullable
|
||||||
Object? verifier = null,
|
as String,cookie: null == cookie ? _self.cookie : cookie // ignore: cast_nullable_to_non_nullable
|
||||||
Object? cookie = null,
|
as Cookie,isFlowComplete: null == isFlowComplete ? _self.isFlowComplete : isFlowComplete // ignore: cast_nullable_to_non_nullable
|
||||||
Object? isFlowComplete = null,
|
as bool,authToken: freezed == authToken ? _self.authToken : authToken // ignore: cast_nullable_to_non_nullable
|
||||||
Object? authToken = freezed,
|
as String?,
|
||||||
}) {
|
));
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @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
|
/// Adds pattern-matching-related methods to [Flow].
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
extension FlowPatterns on Flow {
|
||||||
@pragma('vm:prefer-inline')
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
@override
|
///
|
||||||
$Res call({
|
/// It is equivalent to doing:
|
||||||
Object? serverUri = null,
|
/// ```dart
|
||||||
Object? state = null,
|
/// switch (sealedClass) {
|
||||||
Object? verifier = null,
|
/// case final Subclass value:
|
||||||
Object? cookie = null,
|
/// return ...;
|
||||||
Object? isFlowComplete = null,
|
/// case _:
|
||||||
Object? authToken = freezed,
|
/// return orElse();
|
||||||
}) {
|
/// }
|
||||||
return _then(_$FlowImpl(
|
/// ```
|
||||||
serverUri: null == serverUri
|
|
||||||
? _value.serverUri
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Flow value)? $default,{required TResult orElse(),}){
|
||||||
: serverUri // ignore: cast_nullable_to_non_nullable
|
final _that = this;
|
||||||
as Uri,
|
switch (_that) {
|
||||||
state: null == state
|
case _Flow() when $default != null:
|
||||||
? _value.state
|
return $default(_that);case _:
|
||||||
: state // ignore: cast_nullable_to_non_nullable
|
return orElse();
|
||||||
as String,
|
|
||||||
verifier: null == verifier
|
}
|
||||||
? _value.verifier
|
}
|
||||||
: verifier // ignore: cast_nullable_to_non_nullable
|
/// A `switch`-like method, using callbacks.
|
||||||
as String,
|
///
|
||||||
cookie: null == cookie
|
/// Callbacks receives the raw object, upcasted.
|
||||||
? _value.cookie
|
/// It is equivalent to doing:
|
||||||
: cookie // ignore: cast_nullable_to_non_nullable
|
/// ```dart
|
||||||
as Cookie,
|
/// switch (sealedClass) {
|
||||||
isFlowComplete: null == isFlowComplete
|
/// case final Subclass value:
|
||||||
? _value.isFlowComplete
|
/// return ...;
|
||||||
: isFlowComplete // ignore: cast_nullable_to_non_nullable
|
/// case final Subclass2 value:
|
||||||
as bool,
|
/// return ...;
|
||||||
authToken: freezed == authToken
|
/// }
|
||||||
? _value.authToken
|
/// ```
|
||||||
: authToken // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String?,
|
@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
|
/// @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
|
class _Flow implements Flow {
|
||||||
final Uri serverUri;
|
const _Flow({required this.serverUri, required this.state, required this.verifier, required this.cookie, this.isFlowComplete = false, this.authToken});
|
||||||
@override
|
|
||||||
final String state;
|
|
||||||
@override
|
|
||||||
final String verifier;
|
|
||||||
@override
|
|
||||||
final Cookie cookie;
|
|
||||||
@override
|
|
||||||
@JsonKey()
|
|
||||||
final bool isFlowComplete;
|
|
||||||
@override
|
|
||||||
final String? authToken;
|
|
||||||
|
|
||||||
@override
|
@override final Uri serverUri;
|
||||||
String toString() {
|
@override final String state;
|
||||||
return 'Flow(serverUri: $serverUri, state: $state, verifier: $verifier, cookie: $cookie, isFlowComplete: $isFlowComplete, authToken: $authToken)';
|
@override final String verifier;
|
||||||
}
|
@override final Cookie cookie;
|
||||||
|
@override@JsonKey() final bool isFlowComplete;
|
||||||
|
@override final String? authToken;
|
||||||
|
|
||||||
@override
|
/// Create a copy of Flow
|
||||||
bool operator ==(Object other) {
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
return identical(this, other) ||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
(other.runtimeType == runtimeType &&
|
@pragma('vm:prefer-inline')
|
||||||
other is _$FlowImpl &&
|
_$FlowCopyWith<_Flow> get copyWith => __$FlowCopyWithImpl<_Flow>(this, _$identity);
|
||||||
(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);
|
|
||||||
|
|
||||||
/// Create a copy of Flow
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
@override
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
bool operator ==(Object other) {
|
||||||
@override
|
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));
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
_$$FlowImplCopyWith<_$FlowImpl> get copyWith =>
|
|
||||||
__$$FlowImplCopyWithImpl<_$FlowImpl>(this, _$identity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
@override
|
||||||
Uri get serverUri;
|
int get hashCode => Object.hash(runtimeType,serverUri,state,verifier,cookie,isFlowComplete,authToken);
|
||||||
@override
|
|
||||||
String get state;
|
|
||||||
@override
|
|
||||||
String get verifier;
|
|
||||||
@override
|
|
||||||
Cookie get cookie;
|
|
||||||
@override
|
|
||||||
bool get isFlowComplete;
|
|
||||||
@override
|
|
||||||
String? get authToken;
|
|
||||||
|
|
||||||
/// Create a copy of Flow
|
@override
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
String toString() {
|
||||||
@override
|
return 'Flow(serverUri: $serverUri, state: $state, verifier: $verifier, cookie: $cookie, isFlowComplete: $isFlowComplete, authToken: $authToken)';
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
_$$FlowImplCopyWith<_$FlowImpl> get copyWith =>
|
|
||||||
throw _privateConstructorUsedError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @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
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$loginInExchangeForCodeHash() =>
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
r'bfc3945529048a0f536052fd5579b76457560fcd';
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// Copied from Dart SDK
|
@ProviderFor(OauthFlows)
|
||||||
class _SystemHash {
|
final oauthFlowsProvider = OauthFlowsProvider._();
|
||||||
_SystemHash._();
|
|
||||||
|
|
||||||
static int combine(int hash, int value) {
|
final class OauthFlowsProvider
|
||||||
// ignore: parameter_assignments
|
extends $NotifierProvider<OauthFlows, Map<State, Flow>> {
|
||||||
hash = 0x1fffffff & (hash + value);
|
OauthFlowsProvider._()
|
||||||
// ignore: parameter_assignments
|
: super(
|
||||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
from: null,
|
||||||
return hash ^ (hash >> 6);
|
argument: null,
|
||||||
}
|
retry: null,
|
||||||
|
name: r'oauthFlowsProvider',
|
||||||
static int finish(int hash) {
|
isAutoDispose: false,
|
||||||
// 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,
|
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
$allTransitiveDependencies: null,
|
||||||
debugGetCreateSourceHash: null,
|
);
|
||||||
oauthState: oauthState,
|
|
||||||
code: code,
|
|
||||||
responseHandler: responseHandler,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
AutoDisposeFutureProviderElement<String?> createElement() {
|
String debugGetCreateSourceHash() => _$oauthFlowsHash();
|
||||||
return _LoginInExchangeForCodeProviderElement(this);
|
|
||||||
|
@$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
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is LoginInExchangeForCodeProvider &&
|
return other is LoginInExchangeForCodeProvider &&
|
||||||
other.oauthState == oauthState &&
|
other.argument == argument;
|
||||||
other.code == code &&
|
|
||||||
other.responseHandler == responseHandler;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, oauthState.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, code.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, responseHandler.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$loginInExchangeForCodeHash() =>
|
||||||
// ignore: unused_element
|
r'bfc3945529048a0f536052fd5579b76457560fcd';
|
||||||
mixin LoginInExchangeForCodeRef on AutoDisposeFutureProviderRef<String?> {
|
|
||||||
/// The parameter `oauthState` of this provider.
|
|
||||||
String get oauthState;
|
|
||||||
|
|
||||||
/// The parameter `code` of this provider.
|
/// the code returned by the server in exchange for the verifier
|
||||||
String get code;
|
|
||||||
|
|
||||||
/// The parameter `responseHandler` of this provider.
|
final class LoginInExchangeForCodeFamily extends $Family
|
||||||
ErrorResponseHandler? get responseHandler;
|
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
|
/// per book settings
|
||||||
@freezed
|
@freezed
|
||||||
class BookSettings with _$BookSettings {
|
sealed class BookSettings with _$BookSettings {
|
||||||
const factory BookSettings({
|
const factory BookSettings({
|
||||||
required String bookId,
|
required String bookId,
|
||||||
@Default(NullablePlayerSettings()) NullablePlayerSettings playerSettings,
|
@Default(NullablePlayerSettings()) NullablePlayerSettings playerSettings,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// coverage:ignore-file
|
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
// ignore_for_file: type=lint
|
// 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
|
// 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
|
// FreezedGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
T _$identity<T>(T value) => value;
|
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
|
/// @nodoc
|
||||||
mixin _$BookSettings {
|
mixin _$BookSettings {
|
||||||
String get bookId => throw _privateConstructorUsedError;
|
|
||||||
NullablePlayerSettings get playerSettings =>
|
String get bookId; NullablePlayerSettings get playerSettings;
|
||||||
throw _privateConstructorUsedError;
|
/// 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.
|
/// 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
|
/// @nodoc
|
||||||
abstract class $BookSettingsCopyWith<$Res> {
|
abstract mixin class $BookSettingsCopyWith<$Res> {
|
||||||
factory $BookSettingsCopyWith(
|
factory $BookSettingsCopyWith(BookSettings value, $Res Function(BookSettings) _then) = _$BookSettingsCopyWithImpl;
|
||||||
BookSettings value, $Res Function(BookSettings) then) =
|
@useResult
|
||||||
_$BookSettingsCopyWithImpl<$Res, BookSettings>;
|
$Res call({
|
||||||
@useResult
|
String bookId, NullablePlayerSettings playerSettings
|
||||||
$Res call({String bookId, NullablePlayerSettings playerSettings});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
||||||
|
|
||||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$BookSettingsCopyWithImpl<$Res, $Val extends BookSettings>
|
class _$BookSettingsCopyWithImpl<$Res>
|
||||||
implements $BookSettingsCopyWith<$Res> {
|
implements $BookSettingsCopyWith<$Res> {
|
||||||
_$BookSettingsCopyWithImpl(this._value, this._then);
|
_$BookSettingsCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
// ignore: unused_field
|
final BookSettings _self;
|
||||||
final $Val _value;
|
final $Res Function(BookSettings) _then;
|
||||||
// ignore: unused_field
|
|
||||||
final $Res Function($Val) _then;
|
|
||||||
|
|
||||||
/// Create a copy of BookSettings
|
/// Create a copy of BookSettings
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline') @override $Res call({Object? bookId = null,Object? playerSettings = null,}) {
|
||||||
@override
|
return _then(_self.copyWith(
|
||||||
$Res call({
|
bookId: null == bookId ? _self.bookId : bookId // ignore: cast_nullable_to_non_nullable
|
||||||
Object? bookId = null,
|
as String,playerSettings: null == playerSettings ? _self.playerSettings : playerSettings // ignore: cast_nullable_to_non_nullable
|
||||||
Object? playerSettings = null,
|
as NullablePlayerSettings,
|
||||||
}) {
|
));
|
||||||
return _then(_value.copyWith(
|
}
|
||||||
bookId: null == bookId
|
/// Create a copy of BookSettings
|
||||||
? _value.bookId
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
: bookId // ignore: cast_nullable_to_non_nullable
|
@override
|
||||||
as String,
|
@pragma('vm:prefer-inline')
|
||||||
playerSettings: null == playerSettings
|
$NullablePlayerSettingsCopyWith<$Res> get playerSettings {
|
||||||
? _value.playerSettings
|
|
||||||
: playerSettings // ignore: cast_nullable_to_non_nullable
|
return $NullablePlayerSettingsCopyWith<$Res>(_self.playerSettings, (value) {
|
||||||
as NullablePlayerSettings,
|
return _then(_self.copyWith(playerSettings: value));
|
||||||
) 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);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @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
|
/// Adds pattern-matching-related methods to [BookSettings].
|
||||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
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
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class _$BookSettingsImpl implements _BookSettings {
|
|
||||||
const _$BookSettingsImpl(
|
|
||||||
{required this.bookId,
|
|
||||||
this.playerSettings = const NullablePlayerSettings()});
|
|
||||||
|
|
||||||
factory _$BookSettingsImpl.fromJson(Map<String, dynamic> json) =>
|
class _BookSettings implements BookSettings {
|
||||||
_$$BookSettingsImplFromJson(json);
|
const _BookSettings({required this.bookId, this.playerSettings = const NullablePlayerSettings()});
|
||||||
|
factory _BookSettings.fromJson(Map<String, dynamic> json) => _$BookSettingsFromJson(json);
|
||||||
|
|
||||||
@override
|
@override final String bookId;
|
||||||
final String bookId;
|
@override@JsonKey() final NullablePlayerSettings playerSettings;
|
||||||
@override
|
|
||||||
@JsonKey()
|
|
||||||
final NullablePlayerSettings playerSettings;
|
|
||||||
|
|
||||||
@override
|
/// Create a copy of BookSettings
|
||||||
String toString() {
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
return 'BookSettings(bookId: $bookId, playerSettings: $playerSettings)';
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
}
|
@pragma('vm:prefer-inline')
|
||||||
|
_$BookSettingsCopyWith<_BookSettings> get copyWith => __$BookSettingsCopyWithImpl<_BookSettings>(this, _$identity);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
Map<String, dynamic> toJson() {
|
||||||
return identical(this, other) ||
|
return _$BookSettingsToJson(this, );
|
||||||
(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,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _BookSettings implements BookSettings {
|
@override
|
||||||
const factory _BookSettings(
|
bool operator ==(Object other) {
|
||||||
{required final String bookId,
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BookSettings&&(identical(other.bookId, bookId) || other.bookId == bookId)&&(identical(other.playerSettings, playerSettings) || other.playerSettings == playerSettings));
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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
|
// JsonSerializableGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
_$BookSettingsImpl _$$BookSettingsImplFromJson(Map<String, dynamic> json) =>
|
_BookSettings _$BookSettingsFromJson(Map<String, dynamic> json) =>
|
||||||
_$BookSettingsImpl(
|
_BookSettings(
|
||||||
bookId: json['bookId'] as String,
|
bookId: json['bookId'] as String,
|
||||||
playerSettings: json['playerSettings'] == null
|
playerSettings: json['playerSettings'] == null
|
||||||
? const NullablePlayerSettings()
|
? const NullablePlayerSettings()
|
||||||
: NullablePlayerSettings.fromJson(
|
: 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>{
|
<String, dynamic>{
|
||||||
'bookId': instance.bookId,
|
'bookId': instance.bookId,
|
||||||
'playerSettings': instance.playerSettings,
|
'playerSettings': instance.playerSettings,
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ part 'nullable_player_settings.freezed.dart';
|
||||||
part 'nullable_player_settings.g.dart';
|
part 'nullable_player_settings.g.dart';
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class NullablePlayerSettings with _$NullablePlayerSettings {
|
sealed class NullablePlayerSettings with _$NullablePlayerSettings {
|
||||||
const factory NullablePlayerSettings({
|
const factory NullablePlayerSettings({
|
||||||
MinimizedPlayerSettings? miniPlayerSettings,
|
MinimizedPlayerSettings? miniPlayerSettings,
|
||||||
ExpandedPlayerSettings? expandedPlayerSettings,
|
ExpandedPlayerSettings? expandedPlayerSettings,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// coverage:ignore-file
|
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
// ignore_for_file: type=lint
|
// 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
|
// 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
|
// FreezedGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
T _$identity<T>(T value) => value;
|
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
|
/// @nodoc
|
||||||
mixin _$NullablePlayerSettings {
|
mixin _$NullablePlayerSettings {
|
||||||
MinimizedPlayerSettings? get miniPlayerSettings =>
|
|
||||||
throw _privateConstructorUsedError;
|
MinimizedPlayerSettings? get miniPlayerSettings; ExpandedPlayerSettings? get expandedPlayerSettings; double? get preferredDefaultVolume; double? get preferredDefaultSpeed; List<double>? get speedOptions; SleepTimerSettings? get sleepTimerSettings; Duration? get playbackReportInterval;
|
||||||
ExpandedPlayerSettings? get expandedPlayerSettings =>
|
/// Create a copy of NullablePlayerSettings
|
||||||
throw _privateConstructorUsedError;
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
double? get preferredDefaultVolume => throw _privateConstructorUsedError;
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
double? get preferredDefaultSpeed => throw _privateConstructorUsedError;
|
@pragma('vm:prefer-inline')
|
||||||
List<double>? get speedOptions => throw _privateConstructorUsedError;
|
$NullablePlayerSettingsCopyWith<NullablePlayerSettings> get copyWith => _$NullablePlayerSettingsCopyWithImpl<NullablePlayerSettings>(this as NullablePlayerSettings, _$identity);
|
||||||
SleepTimerSettings? get sleepTimerSettings =>
|
|
||||||
throw _privateConstructorUsedError;
|
|
||||||
Duration? get playbackReportInterval => throw _privateConstructorUsedError;
|
|
||||||
|
|
||||||
/// Serializes this NullablePlayerSettings to a JSON map.
|
/// 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
|
/// @nodoc
|
||||||
abstract class $NullablePlayerSettingsCopyWith<$Res> {
|
abstract mixin class $NullablePlayerSettingsCopyWith<$Res> {
|
||||||
factory $NullablePlayerSettingsCopyWith(NullablePlayerSettings value,
|
factory $NullablePlayerSettingsCopyWith(NullablePlayerSettings value, $Res Function(NullablePlayerSettings) _then) = _$NullablePlayerSettingsCopyWithImpl;
|
||||||
$Res Function(NullablePlayerSettings) then) =
|
@useResult
|
||||||
_$NullablePlayerSettingsCopyWithImpl<$Res, NullablePlayerSettings>;
|
$Res call({
|
||||||
@useResult
|
MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval
|
||||||
$Res call(
|
});
|
||||||
{MinimizedPlayerSettings? miniPlayerSettings,
|
|
||||||
ExpandedPlayerSettings? expandedPlayerSettings,
|
|
||||||
double? preferredDefaultVolume,
|
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
||||||
double? preferredDefaultSpeed,
|
|
||||||
List<double>? speedOptions,
|
|
||||||
SleepTimerSettings? sleepTimerSettings,
|
|
||||||
Duration? playbackReportInterval});
|
|
||||||
|
|
||||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;
|
|
||||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;
|
|
||||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$NullablePlayerSettingsCopyWithImpl<$Res,
|
class _$NullablePlayerSettingsCopyWithImpl<$Res>
|
||||||
$Val extends NullablePlayerSettings>
|
|
||||||
implements $NullablePlayerSettingsCopyWith<$Res> {
|
implements $NullablePlayerSettingsCopyWith<$Res> {
|
||||||
_$NullablePlayerSettingsCopyWithImpl(this._value, this._then);
|
_$NullablePlayerSettingsCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
// ignore: unused_field
|
final NullablePlayerSettings _self;
|
||||||
final $Val _value;
|
final $Res Function(NullablePlayerSettings) _then;
|
||||||
// ignore: unused_field
|
|
||||||
final $Res Function($Val) _then;
|
|
||||||
|
|
||||||
/// Create a copy of NullablePlayerSettings
|
/// Create a copy of NullablePlayerSettings
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@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,}) {
|
||||||
@override
|
return _then(_self.copyWith(
|
||||||
$Res call({
|
miniPlayerSettings: freezed == miniPlayerSettings ? _self.miniPlayerSettings : miniPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||||
Object? miniPlayerSettings = freezed,
|
as MinimizedPlayerSettings?,expandedPlayerSettings: freezed == expandedPlayerSettings ? _self.expandedPlayerSettings : expandedPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||||
Object? expandedPlayerSettings = freezed,
|
as ExpandedPlayerSettings?,preferredDefaultVolume: freezed == preferredDefaultVolume ? _self.preferredDefaultVolume : preferredDefaultVolume // ignore: cast_nullable_to_non_nullable
|
||||||
Object? preferredDefaultVolume = freezed,
|
as double?,preferredDefaultSpeed: freezed == preferredDefaultSpeed ? _self.preferredDefaultSpeed : preferredDefaultSpeed // ignore: cast_nullable_to_non_nullable
|
||||||
Object? preferredDefaultSpeed = freezed,
|
as double?,speedOptions: freezed == speedOptions ? _self.speedOptions : speedOptions // ignore: cast_nullable_to_non_nullable
|
||||||
Object? speedOptions = freezed,
|
as List<double>?,sleepTimerSettings: freezed == sleepTimerSettings ? _self.sleepTimerSettings : sleepTimerSettings // ignore: cast_nullable_to_non_nullable
|
||||||
Object? sleepTimerSettings = freezed,
|
as SleepTimerSettings?,playbackReportInterval: freezed == playbackReportInterval ? _self.playbackReportInterval : playbackReportInterval // ignore: cast_nullable_to_non_nullable
|
||||||
Object? playbackReportInterval = freezed,
|
as Duration?,
|
||||||
}) {
|
));
|
||||||
return _then(_value.copyWith(
|
}
|
||||||
miniPlayerSettings: freezed == miniPlayerSettings
|
/// Create a copy of NullablePlayerSettings
|
||||||
? _value.miniPlayerSettings
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
: miniPlayerSettings // ignore: cast_nullable_to_non_nullable
|
@override
|
||||||
as MinimizedPlayerSettings?,
|
@pragma('vm:prefer-inline')
|
||||||
expandedPlayerSettings: freezed == expandedPlayerSettings
|
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings {
|
||||||
? _value.expandedPlayerSettings
|
if (_self.miniPlayerSettings == null) {
|
||||||
: expandedPlayerSettings // ignore: cast_nullable_to_non_nullable
|
return null;
|
||||||
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
|
return $MinimizedPlayerSettingsCopyWith<$Res>(_self.miniPlayerSettings!, (value) {
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
return _then(_self.copyWith(miniPlayerSettings: value));
|
||||||
@override
|
});
|
||||||
@pragma('vm:prefer-inline')
|
}/// Create a copy of NullablePlayerSettings
|
||||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings {
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
if (_value.miniPlayerSettings == null) {
|
@override
|
||||||
return null;
|
@pragma('vm:prefer-inline')
|
||||||
}
|
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings {
|
||||||
|
if (_self.expandedPlayerSettings == null) {
|
||||||
return $MinimizedPlayerSettingsCopyWith<$Res>(_value.miniPlayerSettings!,
|
return null;
|
||||||
(value) {
|
|
||||||
return _then(_value.copyWith(miniPlayerSettings: value) as $Val);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a copy of NullablePlayerSettings
|
return $ExpandedPlayerSettingsCopyWith<$Res>(_self.expandedPlayerSettings!, (value) {
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
return _then(_self.copyWith(expandedPlayerSettings: value));
|
||||||
@override
|
});
|
||||||
@pragma('vm:prefer-inline')
|
}/// Create a copy of NullablePlayerSettings
|
||||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings {
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
if (_value.expandedPlayerSettings == null) {
|
@override
|
||||||
return null;
|
@pragma('vm:prefer-inline')
|
||||||
}
|
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings {
|
||||||
|
if (_self.sleepTimerSettings == null) {
|
||||||
return $ExpandedPlayerSettingsCopyWith<$Res>(_value.expandedPlayerSettings!,
|
return null;
|
||||||
(value) {
|
|
||||||
return _then(_value.copyWith(expandedPlayerSettings: value) as $Val);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a copy of NullablePlayerSettings
|
return $SleepTimerSettingsCopyWith<$Res>(_self.sleepTimerSettings!, (value) {
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
return _then(_self.copyWith(sleepTimerSettings: value));
|
||||||
@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);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @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
|
/// Adds pattern-matching-related methods to [NullablePlayerSettings].
|
||||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;
|
extension NullablePlayerSettingsPatterns on NullablePlayerSettings {
|
||||||
@override
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;
|
///
|
||||||
@override
|
/// It is equivalent to doing:
|
||||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
/// ```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
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@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) =>
|
class _NullablePlayerSettings implements NullablePlayerSettings {
|
||||||
_$$NullablePlayerSettingsImplFromJson(json);
|
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
|
@override final MinimizedPlayerSettings? miniPlayerSettings;
|
||||||
final MinimizedPlayerSettings? miniPlayerSettings;
|
@override final ExpandedPlayerSettings? expandedPlayerSettings;
|
||||||
@override
|
@override final double? preferredDefaultVolume;
|
||||||
final ExpandedPlayerSettings? expandedPlayerSettings;
|
@override final double? preferredDefaultSpeed;
|
||||||
@override
|
final List<double>? _speedOptions;
|
||||||
final double? preferredDefaultVolume;
|
@override List<double>? get speedOptions {
|
||||||
@override
|
final value = _speedOptions;
|
||||||
final double? preferredDefaultSpeed;
|
if (value == null) return null;
|
||||||
final List<double>? _speedOptions;
|
if (_speedOptions is EqualUnmodifiableListView) return _speedOptions;
|
||||||
@override
|
// ignore: implicit_dynamic_type
|
||||||
List<double>? get speedOptions {
|
return EqualUnmodifiableListView(value);
|
||||||
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,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _NullablePlayerSettings implements NullablePlayerSettings {
|
@override final SleepTimerSettings? sleepTimerSettings;
|
||||||
const factory _NullablePlayerSettings(
|
@override final Duration? playbackReportInterval;
|
||||||
{final MinimizedPlayerSettings? miniPlayerSettings,
|
|
||||||
final ExpandedPlayerSettings? expandedPlayerSettings,
|
|
||||||
final double? preferredDefaultVolume,
|
|
||||||
final double? preferredDefaultSpeed,
|
|
||||||
final List<double>? speedOptions,
|
|
||||||
final SleepTimerSettings? sleepTimerSettings,
|
|
||||||
final Duration? playbackReportInterval}) = _$NullablePlayerSettingsImpl;
|
|
||||||
|
|
||||||
factory _NullablePlayerSettings.fromJson(Map<String, dynamic> json) =
|
/// Create a copy of NullablePlayerSettings
|
||||||
_$NullablePlayerSettingsImpl.fromJson;
|
/// 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
|
@override
|
||||||
MinimizedPlayerSettings? get miniPlayerSettings;
|
Map<String, dynamic> toJson() {
|
||||||
@override
|
return _$NullablePlayerSettingsToJson(this, );
|
||||||
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
|
||||||
|
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
|
// JsonSerializableGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
_$NullablePlayerSettingsImpl _$$NullablePlayerSettingsImplFromJson(
|
_NullablePlayerSettings _$NullablePlayerSettingsFromJson(
|
||||||
Map<String, dynamic> json) =>
|
Map<String, dynamic> json,
|
||||||
_$NullablePlayerSettingsImpl(
|
) => _NullablePlayerSettings(
|
||||||
miniPlayerSettings: json['miniPlayerSettings'] == null
|
miniPlayerSettings: json['miniPlayerSettings'] == null
|
||||||
? null
|
? null
|
||||||
: MinimizedPlayerSettings.fromJson(
|
: MinimizedPlayerSettings.fromJson(
|
||||||
json['miniPlayerSettings'] as Map<String, dynamic>),
|
json['miniPlayerSettings'] as Map<String, dynamic>,
|
||||||
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
),
|
||||||
? null
|
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
||||||
: ExpandedPlayerSettings.fromJson(
|
? null
|
||||||
json['expandedPlayerSettings'] as Map<String, dynamic>),
|
: ExpandedPlayerSettings.fromJson(
|
||||||
preferredDefaultVolume:
|
json['expandedPlayerSettings'] as Map<String, dynamic>,
|
||||||
(json['preferredDefaultVolume'] as num?)?.toDouble(),
|
),
|
||||||
preferredDefaultSpeed:
|
preferredDefaultVolume: (json['preferredDefaultVolume'] as num?)?.toDouble(),
|
||||||
(json['preferredDefaultSpeed'] as num?)?.toDouble(),
|
preferredDefaultSpeed: (json['preferredDefaultSpeed'] as num?)?.toDouble(),
|
||||||
speedOptions: (json['speedOptions'] as List<dynamic>?)
|
speedOptions: (json['speedOptions'] as List<dynamic>?)
|
||||||
?.map((e) => (e as num).toDouble())
|
?.map((e) => (e as num).toDouble())
|
||||||
.toList(),
|
.toList(),
|
||||||
sleepTimerSettings: json['sleepTimerSettings'] == null
|
sleepTimerSettings: json['sleepTimerSettings'] == null
|
||||||
? null
|
? null
|
||||||
: SleepTimerSettings.fromJson(
|
: SleepTimerSettings.fromJson(
|
||||||
json['sleepTimerSettings'] as Map<String, dynamic>),
|
json['sleepTimerSettings'] as Map<String, dynamic>,
|
||||||
playbackReportInterval: json['playbackReportInterval'] == null
|
),
|
||||||
? null
|
playbackReportInterval: json['playbackReportInterval'] == null
|
||||||
: Duration(
|
? null
|
||||||
microseconds: (json['playbackReportInterval'] as num).toInt()),
|
: Duration(microseconds: (json['playbackReportInterval'] as num).toInt()),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$NullablePlayerSettingsImplToJson(
|
Map<String, dynamic> _$NullablePlayerSettingsToJson(
|
||||||
_$NullablePlayerSettingsImpl instance) =>
|
_NullablePlayerSettings instance,
|
||||||
<String, dynamic>{
|
) => <String, dynamic>{
|
||||||
'miniPlayerSettings': instance.miniPlayerSettings,
|
'miniPlayerSettings': instance.miniPlayerSettings,
|
||||||
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
||||||
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
||||||
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
||||||
'speedOptions': instance.speedOptions,
|
'speedOptions': instance.speedOptions,
|
||||||
'sleepTimerSettings': instance.sleepTimerSettings,
|
'sleepTimerSettings': instance.sleepTimerSettings,
|
||||||
'playbackReportInterval': instance.playbackReportInterval?.inMicroseconds,
|
'playbackReportInterval': instance.playbackReportInterval?.inMicroseconds,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,171 +6,102 @@ part of 'book_settings_provider.dart';
|
||||||
// RiverpodGenerator
|
// 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)
|
@ProviderFor(BookSettings)
|
||||||
const bookSettingsProvider = BookSettingsFamily();
|
final bookSettingsProvider = BookSettingsFamily._();
|
||||||
|
|
||||||
/// See also [BookSettings].
|
final class BookSettingsProvider
|
||||||
class BookSettingsFamily extends Family<model.BookSettings> {
|
extends $NotifierProvider<BookSettings, model.BookSettings> {
|
||||||
/// See also [BookSettings].
|
BookSettingsProvider._({
|
||||||
const BookSettingsFamily();
|
required BookSettingsFamily super.from,
|
||||||
|
required String super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'bookSettingsProvider',
|
||||||
|
isAutoDispose: true,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [BookSettings].
|
@override
|
||||||
BookSettingsProvider call(
|
String debugGetCreateSourceHash() => _$bookSettingsHash();
|
||||||
String bookId,
|
|
||||||
) {
|
@override
|
||||||
return BookSettingsProvider(
|
String toString() {
|
||||||
bookId,
|
return r'bookSettingsProvider'
|
||||||
);
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
BookSettingsProvider getProviderOverride(
|
BookSettings create() => BookSettings();
|
||||||
covariant BookSettingsProvider provider,
|
|
||||||
) {
|
|
||||||
return call(
|
|
||||||
provider.bookId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(model.BookSettings value) {
|
||||||
@override
|
return $ProviderOverride(
|
||||||
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(
|
|
||||||
origin: this,
|
origin: this,
|
||||||
override: BookSettingsProvider._internal(
|
providerOverride: $SyncValueProvider<model.BookSettings>(value),
|
||||||
() => create()..bookId = bookId,
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
bookId: bookId,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
AutoDisposeNotifierProviderElement<BookSettings, model.BookSettings>
|
|
||||||
createElement() {
|
|
||||||
return _BookSettingsProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is BookSettingsProvider && other.bookId == bookId;
|
return other is BookSettingsProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, bookId.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$bookSettingsHash() => r'b976df954edf98ec6ccb3eb41e9d07dd4a9193eb';
|
||||||
// ignore: unused_element
|
|
||||||
mixin BookSettingsRef on AutoDisposeNotifierProviderRef<model.BookSettings> {
|
|
||||||
/// The parameter `bookId` of this provider.
|
|
||||||
String get bookId;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _BookSettingsProviderElement
|
final class BookSettingsFamily extends $Family
|
||||||
extends AutoDisposeNotifierProviderElement<BookSettings, model.BookSettings>
|
with
|
||||||
with BookSettingsRef {
|
$ClassFamilyOverride<
|
||||||
_BookSettingsProviderElement(super.provider);
|
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
|
@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
|
// 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';
|
String _$playbackReporterHash() => r'f5436d652e51c37bcc684acdaec94e17a97e68e5';
|
||||||
|
|
||||||
/// See also [PlaybackReporter].
|
abstract class _$PlaybackReporter
|
||||||
@ProviderFor(PlaybackReporter)
|
extends $AsyncNotifier<core.PlaybackReporter> {
|
||||||
final playbackReporterProvider =
|
FutureOr<core.PlaybackReporter> build();
|
||||||
AsyncNotifierProvider<PlaybackReporter, core.PlaybackReporter>.internal(
|
@$mustCallSuper
|
||||||
PlaybackReporter.new,
|
@override
|
||||||
name: r'playbackReporterProvider',
|
void runBuild() {
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref =
|
||||||
? null
|
this.ref
|
||||||
: _$playbackReporterHash,
|
as $Ref<AsyncValue<core.PlaybackReporter>, core.PlaybackReporter>;
|
||||||
dependencies: null,
|
final element =
|
||||||
allTransitiveDependencies: null,
|
ref.element
|
||||||
);
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<
|
||||||
typedef _$PlaybackReporter = AsyncNotifier<core.PlaybackReporter>;
|
AsyncValue<core.PlaybackReporter>,
|
||||||
// ignore_for_file: type=lint
|
core.PlaybackReporter
|
||||||
// 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
|
>,
|
||||||
|
AsyncValue<core.PlaybackReporter>,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleCreate(ref, build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,20 +6,57 @@ part of 'playlist_provider.dart';
|
||||||
// RiverpodGenerator
|
// 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';
|
String _$playlistHash() => r'bed4642e4c2de829e4d0630cb5bf92bffeeb1f60';
|
||||||
|
|
||||||
/// See also [Playlist].
|
abstract class _$Playlist extends $Notifier<AudiobookPlaylist> {
|
||||||
@ProviderFor(Playlist)
|
AudiobookPlaylist build();
|
||||||
final playlistProvider =
|
@$mustCallSuper
|
||||||
AutoDisposeNotifierProvider<Playlist, AudiobookPlaylist>.internal(
|
@override
|
||||||
Playlist.new,
|
void runBuild() {
|
||||||
name: r'playlistProvider',
|
final ref = this.ref as $Ref<AudiobookPlaylist, AudiobookPlaylist>;
|
||||||
debugGetCreateSourceHash:
|
final element =
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$playlistHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<AudiobookPlaylist, AudiobookPlaylist>,
|
||||||
);
|
AudiobookPlaylist,
|
||||||
|
Object?,
|
||||||
typedef _$Playlist = AutoDisposeNotifier<AudiobookPlaylist>;
|
Object?
|
||||||
// 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
|
element.handleCreate(ref, build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,41 +6,119 @@ part of 'audiobook_player.dart';
|
||||||
// RiverpodGenerator
|
// 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() =>
|
String _$simpleAudiobookPlayerHash() =>
|
||||||
r'5e94bbff4314adceb5affa704fc4d079d4016afa';
|
r'5e94bbff4314adceb5affa704fc4d079d4016afa';
|
||||||
|
|
||||||
/// Simple because it doesn't rebuild when the player state changes
|
/// Simple because it doesn't rebuild when the player state changes
|
||||||
/// it only rebuilds when the token 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';
|
String _$audiobookPlayerHash() => r'0f180308067486896fec6a65a6afb0e6686ac4a0';
|
||||||
|
|
||||||
/// See also [AudiobookPlayer].
|
abstract class _$AudiobookPlayer extends $Notifier<core.AudiobookPlayer> {
|
||||||
@ProviderFor(AudiobookPlayer)
|
core.AudiobookPlayer build();
|
||||||
final audiobookPlayerProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<AudiobookPlayer, core.AudiobookPlayer>.internal(
|
@override
|
||||||
AudiobookPlayer.new,
|
void runBuild() {
|
||||||
name: r'audiobookPlayerProvider',
|
final ref = this.ref as $Ref<core.AudiobookPlayer, core.AudiobookPlayer>;
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final element =
|
||||||
? null
|
ref.element
|
||||||
: _$audiobookPlayerHash,
|
as $ClassProviderElement<
|
||||||
dependencies: null,
|
AnyNotifier<core.AudiobookPlayer, core.AudiobookPlayer>,
|
||||||
allTransitiveDependencies: null,
|
core.AudiobookPlayer,
|
||||||
);
|
Object?,
|
||||||
|
Object?
|
||||||
typedef _$AudiobookPlayer = Notifier<core.AudiobookPlayer>;
|
>;
|
||||||
// ignore_for_file: type=lint
|
element.handleCreate(ref, build);
|
||||||
// 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,66 +6,147 @@ part of 'currently_playing_provider.dart';
|
||||||
// RiverpodGenerator
|
// 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() =>
|
String _$currentlyPlayingBookHash() =>
|
||||||
r'e4258694c8f0d1e89651b330fae0f672ca13a484';
|
r'e4258694c8f0d1e89651b330fae0f672ca13a484';
|
||||||
|
|
||||||
/// See also [currentlyPlayingBook].
|
/// provided the current chapter of the book being played
|
||||||
@ProviderFor(currentlyPlayingBook)
|
|
||||||
final currentlyPlayingBookProvider =
|
@ProviderFor(currentPlayingChapter)
|
||||||
AutoDisposeProvider<BookExpanded?>.internal(
|
final currentPlayingChapterProvider = CurrentPlayingChapterProvider._();
|
||||||
currentlyPlayingBook,
|
|
||||||
name: r'currentlyPlayingBookProvider',
|
/// provided the current chapter of the book being played
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
final class CurrentPlayingChapterProvider
|
||||||
: _$currentlyPlayingBookHash,
|
extends $FunctionalProvider<BookChapter?, BookChapter?, BookChapter?>
|
||||||
dependencies: null,
|
with $Provider<BookChapter?> {
|
||||||
allTransitiveDependencies: null,
|
/// 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() =>
|
String _$currentPlayingChapterHash() =>
|
||||||
r'73db8b8a9058573bb0c68ec5d5f8aba9306f3d24';
|
r'73db8b8a9058573bb0c68ec5d5f8aba9306f3d24';
|
||||||
|
|
||||||
/// provided the current chapter of the book being played
|
/// provides the book metadata of the currently playing book
|
||||||
///
|
|
||||||
/// 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,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
@ProviderFor(currentBookMetadata)
|
||||||
// ignore: unused_element
|
final currentBookMetadataProvider = CurrentBookMetadataProvider._();
|
||||||
typedef CurrentPlayingChapterRef = AutoDisposeProviderRef<BookChapter?>;
|
|
||||||
String _$currentBookMetadataHash() =>
|
|
||||||
r'f537ef4ef19280bc952de658ecf6520c535ae344';
|
|
||||||
|
|
||||||
/// provides the book metadata of the currently playing book
|
/// 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')
|
final class CurrentBookMetadataProvider
|
||||||
// ignore: unused_element
|
extends
|
||||||
typedef CurrentBookMetadataRef = AutoDisposeProviderRef<BookMetadataExpanded?>;
|
$FunctionalProvider<
|
||||||
// ignore_for_file: type=lint
|
BookMetadataExpanded?,
|
||||||
// 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
|
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(
|
double playerHeight(
|
||||||
Ref ref,
|
Ref ref,
|
||||||
) {
|
) {
|
||||||
final playerExpandProgress = ref.watch(playerExpandProgressNotifierProvider);
|
final playerExpandProgress = ref.watch(playerExpandProgressProvider);
|
||||||
|
|
||||||
// on change of the playerExpandProgress invalidate
|
// on change of the playerExpandProgress invalidate
|
||||||
playerExpandProgress.addListener(() {
|
playerExpandProgress.addListener(() {
|
||||||
|
|
|
||||||
|
|
@ -6,58 +6,134 @@ part of 'player_form.dart';
|
||||||
// RiverpodGenerator
|
// 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() =>
|
String _$playerExpandProgressNotifierHash() =>
|
||||||
r'1ac7172d90a070f96222286edd1a176be197f378';
|
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)
|
@ProviderFor(playerHeight)
|
||||||
final playerHeightProvider = Provider<double>.internal(
|
final playerHeightProvider = PlayerHeightProvider._();
|
||||||
playerHeight,
|
|
||||||
name: r'playerHeightProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$playerHeightHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
final class PlayerHeightProvider
|
||||||
// ignore: unused_element
|
extends $FunctionalProvider<double, double, double>
|
||||||
typedef PlayerHeightRef = ProviderRef<double>;
|
with $Provider<double> {
|
||||||
String _$isPlayerActiveHash() => r'2c7ca125423126fb5f0ef218d37bc8fe0ca9ec98';
|
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)
|
@ProviderFor(isPlayerActive)
|
||||||
final isPlayerActiveProvider = Provider<bool>.internal(
|
final isPlayerActiveProvider = IsPlayerActiveProvider._();
|
||||||
isPlayerActive,
|
|
||||||
name: r'isPlayerActiveProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$isPlayerActiveHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
final class IsPlayerActiveProvider extends $FunctionalProvider<bool, bool, bool>
|
||||||
// ignore: unused_element
|
with $Provider<bool> {
|
||||||
typedef IsPlayerActiveRef = ProviderRef<bool>;
|
IsPlayerActiveProvider._()
|
||||||
// ignore_for_file: type=lint
|
: super(
|
||||||
// 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
|
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 =
|
final itemBeingPlayed =
|
||||||
ref.watch(libraryItemProvider(currentBook.libraryItemId));
|
ref.watch(libraryItemProvider(currentBook.libraryItemId));
|
||||||
final player = ref.watch(audiobookPlayerProvider);
|
final player = ref.watch(audiobookPlayerProvider);
|
||||||
final imageOfItemBeingPlayed = itemBeingPlayed.valueOrNull != null
|
final imageOfItemBeingPlayed = itemBeingPlayed.value != null
|
||||||
? ref.watch(
|
? ref.watch(
|
||||||
coverImageProvider(itemBeingPlayed.valueOrNull!.id),
|
coverImageProvider(itemBeingPlayed.value!.id),
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
final imgWidget = imageOfItemBeingPlayed?.valueOrNull != null
|
final imgWidget = imageOfItemBeingPlayed?.value != null
|
||||||
? Image.memory(
|
? Image.memory(
|
||||||
imageOfItemBeingPlayed!.valueOrNull!,
|
imageOfItemBeingPlayed!.value!,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
)
|
)
|
||||||
: const BookCoverSkeleton();
|
: const BookCoverSkeleton();
|
||||||
|
|
@ -63,7 +63,7 @@ class AudiobookPlayer extends HookConsumerWidget {
|
||||||
// theme from image
|
// theme from image
|
||||||
final imageTheme = ref.watch(
|
final imageTheme = ref.watch(
|
||||||
themeOfLibraryItemProvider(
|
themeOfLibraryItemProvider(
|
||||||
itemBeingPlayed.valueOrNull?.id,
|
itemBeingPlayed.value?.id,
|
||||||
brightness: Theme.of(context).brightness,
|
brightness: Theme.of(context).brightness,
|
||||||
highContrast: appSettings.themeSettings.highContrast ||
|
highContrast: appSettings.themeSettings.highContrast ||
|
||||||
MediaQuery.of(context).highContrast,
|
MediaQuery.of(context).highContrast,
|
||||||
|
|
@ -81,10 +81,10 @@ class AudiobookPlayer extends HookConsumerWidget {
|
||||||
final preferredVolume = appSettings.playerSettings.preferredDefaultVolume;
|
final preferredVolume = appSettings.playerSettings.preferredDefaultVolume;
|
||||||
return Theme(
|
return Theme(
|
||||||
data: ThemeData(
|
data: ThemeData(
|
||||||
colorScheme: imageTheme.valueOrNull ?? Theme.of(context).colorScheme,
|
colorScheme: imageTheme.value ?? Theme.of(context).colorScheme,
|
||||||
),
|
),
|
||||||
child: Miniplayer(
|
child: Miniplayer(
|
||||||
valueNotifier: ref.watch(playerExpandProgressNotifierProvider),
|
valueNotifier: ref.watch(playerExpandProgressProvider),
|
||||||
onDragDown: (percentage) async {
|
onDragDown: (percentage) async {
|
||||||
// preferred volume
|
// preferred volume
|
||||||
// set volume to 0 when dragging down
|
// set volume to 0 when dragging down
|
||||||
|
|
|
||||||
|
|
@ -6,21 +6,57 @@ part of 'shake_detector.dart';
|
||||||
// RiverpodGenerator
|
// 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';
|
String _$shakeDetectorHash() => r'2a380bab1d4021d05d2ae40fec964a5f33d3730c';
|
||||||
|
|
||||||
/// See also [ShakeDetector].
|
abstract class _$ShakeDetector extends $Notifier<core.ShakeDetector?> {
|
||||||
@ProviderFor(ShakeDetector)
|
core.ShakeDetector? build();
|
||||||
final shakeDetectorProvider =
|
@$mustCallSuper
|
||||||
AutoDisposeNotifierProvider<ShakeDetector, core.ShakeDetector?>.internal(
|
@override
|
||||||
ShakeDetector.new,
|
void runBuild() {
|
||||||
name: r'shakeDetectorProvider',
|
final ref = this.ref as $Ref<core.ShakeDetector?, core.ShakeDetector?>;
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final element =
|
||||||
? null
|
ref.element
|
||||||
: _$shakeDetectorHash,
|
as $ClassProviderElement<
|
||||||
dependencies: null,
|
AnyNotifier<core.ShakeDetector?, core.ShakeDetector?>,
|
||||||
allTransitiveDependencies: null,
|
core.ShakeDetector?,
|
||||||
);
|
Object?,
|
||||||
|
Object?
|
||||||
typedef _$ShakeDetector = AutoDisposeNotifier<core.ShakeDetector?>;
|
>;
|
||||||
// ignore_for_file: type=lint
|
element.handleCreate(ref, build);
|
||||||
// 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,20 +6,57 @@ part of 'sleep_timer_provider.dart';
|
||||||
// RiverpodGenerator
|
// 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';
|
String _$sleepTimerHash() => r'2679454a217d0630a833d730557ab4e4feac2e56';
|
||||||
|
|
||||||
/// See also [SleepTimer].
|
abstract class _$SleepTimer extends $Notifier<core.SleepTimer?> {
|
||||||
@ProviderFor(SleepTimer)
|
core.SleepTimer? build();
|
||||||
final sleepTimerProvider =
|
@$mustCallSuper
|
||||||
NotifierProvider<SleepTimer, core.SleepTimer?>.internal(
|
@override
|
||||||
SleepTimer.new,
|
void runBuild() {
|
||||||
name: r'sleepTimerProvider',
|
final ref = this.ref as $Ref<core.SleepTimer?, core.SleepTimer?>;
|
||||||
debugGetCreateSourceHash:
|
final element =
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$sleepTimerHash,
|
ref.element
|
||||||
dependencies: null,
|
as $ClassProviderElement<
|
||||||
allTransitiveDependencies: null,
|
AnyNotifier<core.SleepTimer?, core.SleepTimer?>,
|
||||||
);
|
core.SleepTimer?,
|
||||||
|
Object?,
|
||||||
typedef _$SleepTimer = Notifier<core.SleepTimer?>;
|
Object?
|
||||||
// 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
|
element.handleCreate(ref, build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,9 +76,9 @@ class MyApp extends ConsumerWidget {
|
||||||
if (themeSettings.useMaterialThemeFromSystem) {
|
if (themeSettings.useMaterialThemeFromSystem) {
|
||||||
var themes =
|
var themes =
|
||||||
ref.watch(systemThemeProvider(highContrast: shouldUseHighContrast));
|
ref.watch(systemThemeProvider(highContrast: shouldUseHighContrast));
|
||||||
if (themes.valueOrNull != null) {
|
if (themes.value != null) {
|
||||||
lightColorScheme = themes.valueOrNull!.$1;
|
lightColorScheme = themes.value!.$1;
|
||||||
darkColorScheme = themes.valueOrNull!.$2;
|
darkColorScheme = themes.value!.$2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -100,9 +100,9 @@ class MyApp extends ConsumerWidget {
|
||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (themeLight.valueOrNull != null && themeDark.valueOrNull != null) {
|
if (themeLight.value != null && themeDark.value != null) {
|
||||||
lightColorScheme = themeLight.valueOrNull!;
|
lightColorScheme = themeLight.value!;
|
||||||
darkColorScheme = themeDark.valueOrNull!;
|
darkColorScheme = themeDark.value!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ part 'library_item_extras.freezed.dart';
|
||||||
/// [book] is the book that the item represents
|
/// [book] is the book that the item represents
|
||||||
/// [heroTagSuffix] is the suffix to use for the hero tag to avoid conflicts
|
/// [heroTagSuffix] is the suffix to use for the hero tag to avoid conflicts
|
||||||
@freezed
|
@freezed
|
||||||
class LibraryItemExtras with _$LibraryItemExtras {
|
sealed class LibraryItemExtras with _$LibraryItemExtras {
|
||||||
const factory LibraryItemExtras({
|
const factory LibraryItemExtras({
|
||||||
BookMinified? book,
|
BookMinified? book,
|
||||||
@Default('') String heroTagSuffix,
|
@Default('') String heroTagSuffix,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// coverage:ignore-file
|
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
// ignore_for_file: type=lint
|
// 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
|
// 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,156 +9,260 @@ part of 'library_item_extras.dart';
|
||||||
// FreezedGenerator
|
// FreezedGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
T _$identity<T>(T value) => value;
|
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
|
/// @nodoc
|
||||||
mixin _$LibraryItemExtras {
|
mixin _$LibraryItemExtras {
|
||||||
BookMinified? get book => throw _privateConstructorUsedError;
|
|
||||||
String get heroTagSuffix => throw _privateConstructorUsedError;
|
|
||||||
|
|
||||||
/// Create a copy of LibraryItemExtras
|
BookMinified? get book; String get heroTagSuffix;
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// Create a copy of LibraryItemExtras
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
$LibraryItemExtrasCopyWith<LibraryItemExtras> get copyWith =>
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
throw _privateConstructorUsedError;
|
@pragma('vm:prefer-inline')
|
||||||
|
$LibraryItemExtrasCopyWith<LibraryItemExtras> get copyWith => _$LibraryItemExtrasCopyWithImpl<LibraryItemExtras>(this as LibraryItemExtras, _$identity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is LibraryItemExtras&&(identical(other.book, book) || other.book == book)&&(identical(other.heroTagSuffix, heroTagSuffix) || other.heroTagSuffix == heroTagSuffix));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,book,heroTagSuffix);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'LibraryItemExtras(book: $book, heroTagSuffix: $heroTagSuffix)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract class $LibraryItemExtrasCopyWith<$Res> {
|
abstract mixin class $LibraryItemExtrasCopyWith<$Res> {
|
||||||
factory $LibraryItemExtrasCopyWith(
|
factory $LibraryItemExtrasCopyWith(LibraryItemExtras value, $Res Function(LibraryItemExtras) _then) = _$LibraryItemExtrasCopyWithImpl;
|
||||||
LibraryItemExtras value, $Res Function(LibraryItemExtras) then) =
|
@useResult
|
||||||
_$LibraryItemExtrasCopyWithImpl<$Res, LibraryItemExtras>;
|
$Res call({
|
||||||
@useResult
|
BookMinified? book, String heroTagSuffix
|
||||||
$Res call({BookMinified? book, String heroTagSuffix});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$LibraryItemExtrasCopyWithImpl<$Res, $Val extends LibraryItemExtras>
|
class _$LibraryItemExtrasCopyWithImpl<$Res>
|
||||||
implements $LibraryItemExtrasCopyWith<$Res> {
|
implements $LibraryItemExtrasCopyWith<$Res> {
|
||||||
_$LibraryItemExtrasCopyWithImpl(this._value, this._then);
|
_$LibraryItemExtrasCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
// ignore: unused_field
|
final LibraryItemExtras _self;
|
||||||
final $Val _value;
|
final $Res Function(LibraryItemExtras) _then;
|
||||||
// ignore: unused_field
|
|
||||||
final $Res Function($Val) _then;
|
|
||||||
|
|
||||||
/// Create a copy of LibraryItemExtras
|
/// Create a copy of LibraryItemExtras
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline') @override $Res call({Object? book = freezed,Object? heroTagSuffix = null,}) {
|
||||||
@override
|
return _then(_self.copyWith(
|
||||||
$Res call({
|
book: freezed == book ? _self.book : book // ignore: cast_nullable_to_non_nullable
|
||||||
Object? book = freezed,
|
as BookMinified?,heroTagSuffix: null == heroTagSuffix ? _self.heroTagSuffix : heroTagSuffix // ignore: cast_nullable_to_non_nullable
|
||||||
Object? heroTagSuffix = null,
|
as String,
|
||||||
}) {
|
));
|
||||||
return _then(_value.copyWith(
|
|
||||||
book: freezed == book
|
|
||||||
? _value.book
|
|
||||||
: book // ignore: cast_nullable_to_non_nullable
|
|
||||||
as BookMinified?,
|
|
||||||
heroTagSuffix: null == heroTagSuffix
|
|
||||||
? _value.heroTagSuffix
|
|
||||||
: heroTagSuffix // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String,
|
|
||||||
) as $Val);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
abstract class _$$LibraryItemExtrasImplCopyWith<$Res>
|
|
||||||
implements $LibraryItemExtrasCopyWith<$Res> {
|
|
||||||
factory _$$LibraryItemExtrasImplCopyWith(_$LibraryItemExtrasImpl value,
|
|
||||||
$Res Function(_$LibraryItemExtrasImpl) then) =
|
|
||||||
__$$LibraryItemExtrasImplCopyWithImpl<$Res>;
|
|
||||||
@override
|
|
||||||
@useResult
|
|
||||||
$Res call({BookMinified? book, String heroTagSuffix});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
class __$$LibraryItemExtrasImplCopyWithImpl<$Res>
|
|
||||||
extends _$LibraryItemExtrasCopyWithImpl<$Res, _$LibraryItemExtrasImpl>
|
|
||||||
implements _$$LibraryItemExtrasImplCopyWith<$Res> {
|
|
||||||
__$$LibraryItemExtrasImplCopyWithImpl(_$LibraryItemExtrasImpl _value,
|
|
||||||
$Res Function(_$LibraryItemExtrasImpl) _then)
|
|
||||||
: super(_value, _then);
|
|
||||||
|
|
||||||
/// Create a copy of LibraryItemExtras
|
/// Adds pattern-matching-related methods to [LibraryItemExtras].
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
extension LibraryItemExtrasPatterns on LibraryItemExtras {
|
||||||
@pragma('vm:prefer-inline')
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
@override
|
///
|
||||||
$Res call({
|
/// It is equivalent to doing:
|
||||||
Object? book = freezed,
|
/// ```dart
|
||||||
Object? heroTagSuffix = null,
|
/// switch (sealedClass) {
|
||||||
}) {
|
/// case final Subclass value:
|
||||||
return _then(_$LibraryItemExtrasImpl(
|
/// return ...;
|
||||||
book: freezed == book
|
/// case _:
|
||||||
? _value.book
|
/// return orElse();
|
||||||
: book // ignore: cast_nullable_to_non_nullable
|
/// }
|
||||||
as BookMinified?,
|
/// ```
|
||||||
heroTagSuffix: null == heroTagSuffix
|
|
||||||
? _value.heroTagSuffix
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _LibraryItemExtras value)? $default,{required TResult orElse(),}){
|
||||||
: heroTagSuffix // ignore: cast_nullable_to_non_nullable
|
final _that = this;
|
||||||
as String,
|
switch (_that) {
|
||||||
));
|
case _LibraryItemExtras() 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( _LibraryItemExtras value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LibraryItemExtras():
|
||||||
|
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( _LibraryItemExtras value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LibraryItemExtras() 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( BookMinified? book, String heroTagSuffix)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LibraryItemExtras() when $default != null:
|
||||||
|
return $default(_that.book,_that.heroTagSuffix);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( BookMinified? book, String heroTagSuffix) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LibraryItemExtras():
|
||||||
|
return $default(_that.book,_that.heroTagSuffix);}
|
||||||
|
}
|
||||||
|
/// 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( BookMinified? book, String heroTagSuffix)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _LibraryItemExtras() when $default != null:
|
||||||
|
return $default(_that.book,_that.heroTagSuffix);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
|
|
||||||
class _$LibraryItemExtrasImpl implements _LibraryItemExtras {
|
|
||||||
const _$LibraryItemExtrasImpl({this.book, this.heroTagSuffix = ''});
|
|
||||||
|
|
||||||
@override
|
class _LibraryItemExtras implements LibraryItemExtras {
|
||||||
final BookMinified? book;
|
const _LibraryItemExtras({this.book, this.heroTagSuffix = ''});
|
||||||
@override
|
|
||||||
@JsonKey()
|
|
||||||
final String heroTagSuffix;
|
|
||||||
|
|
||||||
@override
|
@override final BookMinified? book;
|
||||||
String toString() {
|
@override@JsonKey() final String heroTagSuffix;
|
||||||
return 'LibraryItemExtras(book: $book, heroTagSuffix: $heroTagSuffix)';
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
/// Create a copy of LibraryItemExtras
|
||||||
bool operator ==(Object other) {
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
return identical(this, other) ||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
(other.runtimeType == runtimeType &&
|
@pragma('vm:prefer-inline')
|
||||||
other is _$LibraryItemExtrasImpl &&
|
_$LibraryItemExtrasCopyWith<_LibraryItemExtras> get copyWith => __$LibraryItemExtrasCopyWithImpl<_LibraryItemExtras>(this, _$identity);
|
||||||
(identical(other.book, book) || other.book == book) &&
|
|
||||||
(identical(other.heroTagSuffix, heroTagSuffix) ||
|
|
||||||
other.heroTagSuffix == heroTagSuffix));
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode => Object.hash(runtimeType, book, heroTagSuffix);
|
|
||||||
|
|
||||||
/// Create a copy of LibraryItemExtras
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
@override
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
bool operator ==(Object other) {
|
||||||
@override
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LibraryItemExtras&&(identical(other.book, book) || other.book == book)&&(identical(other.heroTagSuffix, heroTagSuffix) || other.heroTagSuffix == heroTagSuffix));
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
_$$LibraryItemExtrasImplCopyWith<_$LibraryItemExtrasImpl> get copyWith =>
|
|
||||||
__$$LibraryItemExtrasImplCopyWithImpl<_$LibraryItemExtrasImpl>(
|
|
||||||
this, _$identity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _LibraryItemExtras implements LibraryItemExtras {
|
|
||||||
const factory _LibraryItemExtras(
|
|
||||||
{final BookMinified? book,
|
|
||||||
final String heroTagSuffix}) = _$LibraryItemExtrasImpl;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BookMinified? get book;
|
int get hashCode => Object.hash(runtimeType,book,heroTagSuffix);
|
||||||
@override
|
|
||||||
String get heroTagSuffix;
|
|
||||||
|
|
||||||
/// Create a copy of LibraryItemExtras
|
@override
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
String toString() {
|
||||||
@override
|
return 'LibraryItemExtras(book: $book, heroTagSuffix: $heroTagSuffix)';
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
_$$LibraryItemExtrasImplCopyWith<_$LibraryItemExtrasImpl> get copyWith =>
|
|
||||||
throw _privateConstructorUsedError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$LibraryItemExtrasCopyWith<$Res> implements $LibraryItemExtrasCopyWith<$Res> {
|
||||||
|
factory _$LibraryItemExtrasCopyWith(_LibraryItemExtras value, $Res Function(_LibraryItemExtras) _then) = __$LibraryItemExtrasCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
BookMinified? book, String heroTagSuffix
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$LibraryItemExtrasCopyWithImpl<$Res>
|
||||||
|
implements _$LibraryItemExtrasCopyWith<$Res> {
|
||||||
|
__$LibraryItemExtrasCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _LibraryItemExtras _self;
|
||||||
|
final $Res Function(_LibraryItemExtras) _then;
|
||||||
|
|
||||||
|
/// Create a copy of LibraryItemExtras
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? book = freezed,Object? heroTagSuffix = null,}) {
|
||||||
|
return _then(_LibraryItemExtras(
|
||||||
|
book: freezed == book ? _self.book : book // ignore: cast_nullable_to_non_nullable
|
||||||
|
as BookMinified?,heroTagSuffix: null == heroTagSuffix ? _self.heroTagSuffix : heroTagSuffix // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,8 @@ const bottomBarHeight = 64;
|
||||||
/// BottomNavigationBar, where [child] is placed in the body of the Scaffold.
|
/// BottomNavigationBar, where [child] is placed in the body of the Scaffold.
|
||||||
class ScaffoldWithNavBar extends HookConsumerWidget {
|
class ScaffoldWithNavBar extends HookConsumerWidget {
|
||||||
/// Constructs an [ScaffoldWithNavBar].
|
/// Constructs an [ScaffoldWithNavBar].
|
||||||
const ScaffoldWithNavBar({
|
const ScaffoldWithNavBar({required this.navigationShell, Key? key})
|
||||||
required this.navigationShell,
|
: super(key: key ?? const ValueKey<String>('ScaffoldWithNavBar'));
|
||||||
Key? key,
|
|
||||||
}) : super(key: key ?? const ValueKey<String>('ScaffoldWithNavBar'));
|
|
||||||
|
|
||||||
/// The navigation shell and container for the branch Navigators.
|
/// The navigation shell and container for the branch Navigators.
|
||||||
final StatefulNavigationShell navigationShell;
|
final StatefulNavigationShell navigationShell;
|
||||||
|
|
@ -35,10 +33,11 @@ class ScaffoldWithNavBar extends HookConsumerWidget {
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
// playerExpandProgress is used to animate bottom navigation bar to opacity 0 and slide down when player is expanded
|
// playerExpandProgress is used to animate bottom navigation bar to opacity 0 and slide down when player is expanded
|
||||||
// final playerProgress =
|
// final playerProgress =
|
||||||
// useValueListenable(ref.watch(playerExpandProgressNotifierProvider));
|
// useValueListenable(ref.watch(playerExpandProgressProvider));
|
||||||
final playerProgress = ref.watch(playerHeightProvider);
|
final playerProgress = ref.watch(playerHeightProvider);
|
||||||
final playerMaxHeight = MediaQuery.of(context).size.height;
|
final playerMaxHeight = MediaQuery.of(context).size.height;
|
||||||
var percentExpandedMiniPlayer = (playerProgress - playerMinHeight) /
|
var percentExpandedMiniPlayer =
|
||||||
|
(playerProgress - playerMinHeight) /
|
||||||
(playerMaxHeight - playerMinHeight);
|
(playerMaxHeight - playerMinHeight);
|
||||||
// Clamp the value between 0 and 1
|
// Clamp the value between 0 and 1
|
||||||
percentExpandedMiniPlayer = percentExpandedMiniPlayer.clamp(0.0, 1.0);
|
percentExpandedMiniPlayer = percentExpandedMiniPlayer.clamp(0.0, 1.0);
|
||||||
|
|
@ -52,9 +51,7 @@ class ScaffoldWithNavBar extends HookConsumerWidget {
|
||||||
|
|
||||||
// close miniplayer if it is open
|
// close miniplayer if it is open
|
||||||
if (isPlayerExpanded && pendingPlayerModals == 0) {
|
if (isPlayerExpanded && pendingPlayerModals == 0) {
|
||||||
appLogger.fine(
|
appLogger.fine('BackButtonListener: closing the player');
|
||||||
'BackButtonListener: closing the player',
|
|
||||||
);
|
|
||||||
audioBookMiniplayerController.animateToHeight(state: PanelState.MIN);
|
audioBookMiniplayerController.animateToHeight(state: PanelState.MIN);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -96,12 +93,7 @@ class ScaffoldWithNavBar extends HookConsumerWidget {
|
||||||
return BackButtonListener(
|
return BackButtonListener(
|
||||||
onBackButtonPressed: onBackButtonPressed,
|
onBackButtonPressed: onBackButtonPressed,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: Stack(
|
body: Stack(children: [navigationShell, const AudiobookPlayer()]),
|
||||||
children: [
|
|
||||||
navigationShell,
|
|
||||||
const AudiobookPlayer(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
bottomNavigationBar: Opacity(
|
bottomNavigationBar: Opacity(
|
||||||
// Opacity is interpolated from 1 to 0 when player is expanded
|
// Opacity is interpolated from 1 to 0 when player is expanded
|
||||||
opacity: 1 - percentExpandedMiniPlayer,
|
opacity: 1 - percentExpandedMiniPlayer,
|
||||||
|
|
@ -116,11 +108,8 @@ class ScaffoldWithNavBar extends HookConsumerWidget {
|
||||||
// `navigationShell.route.branches`.
|
// `navigationShell.route.branches`.
|
||||||
destinations: _navigationItems.map((item) {
|
destinations: _navigationItems.map((item) {
|
||||||
final isDestinationLibrary = item.name == 'Library';
|
final isDestinationLibrary = item.name == 'Library';
|
||||||
var currentLibrary =
|
var currentLibrary = ref.watch(currentLibraryProvider).value;
|
||||||
ref.watch(currentLibraryProvider).valueOrNull;
|
final libraryIcon = AbsIcons.getIconByName(currentLibrary?.icon);
|
||||||
final libraryIcon = AbsIcons.getIconByName(
|
|
||||||
currentLibrary?.icon,
|
|
||||||
);
|
|
||||||
final destinationWidget = NavigationDestination(
|
final destinationWidget = NavigationDestination(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
isDestinationLibrary ? libraryIcon ?? item.icon : item.icon,
|
isDestinationLibrary ? libraryIcon ?? item.icon : item.icon,
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class ApiSettings extends _$ApiSettings {
|
||||||
@override
|
@override
|
||||||
model.ApiSettings build() {
|
model.ApiSettings build() {
|
||||||
state = readFromBoxOrCreate();
|
state = readFromBoxOrCreate();
|
||||||
ref.listenSelf((_, __) {
|
listenSelf((_, __) {
|
||||||
writeToBox();
|
writeToBox();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,20 +6,57 @@ part of 'api_settings_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$apiSettingsHash() => r'5bc1e16e9d72b77fb10637aabadf08e8947da580';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [ApiSettings].
|
|
||||||
@ProviderFor(ApiSettings)
|
@ProviderFor(ApiSettings)
|
||||||
final apiSettingsProvider =
|
final apiSettingsProvider = ApiSettingsProvider._();
|
||||||
NotifierProvider<ApiSettings, model.ApiSettings>.internal(
|
|
||||||
ApiSettings.new,
|
|
||||||
name: r'apiSettingsProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$apiSettingsHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef _$ApiSettings = Notifier<model.ApiSettings>;
|
final class ApiSettingsProvider
|
||||||
// ignore_for_file: type=lint
|
extends $NotifierProvider<ApiSettings, model.ApiSettings> {
|
||||||
// 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
|
ApiSettingsProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'apiSettingsProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$apiSettingsHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
ApiSettings create() => ApiSettings();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(model.ApiSettings value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<model.ApiSettings>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$apiSettingsHash() => r'02af850985338eade33d76fc9965808bed548290';
|
||||||
|
|
||||||
|
abstract class _$ApiSettings extends $Notifier<model.ApiSettings> {
|
||||||
|
model.ApiSettings build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final ref = this.ref as $Ref<model.ApiSettings, model.ApiSettings>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<model.ApiSettings, model.ApiSettings>,
|
||||||
|
model.ApiSettings,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleCreate(ref, build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class AppSettings extends _$AppSettings {
|
||||||
@override
|
@override
|
||||||
model.AppSettings build() {
|
model.AppSettings build() {
|
||||||
state = loadOrCreateAppSettings();
|
state = loadOrCreateAppSettings();
|
||||||
ref.listenSelf((_, __) {
|
listenSelf((_, __) {
|
||||||
writeToBox();
|
writeToBox();
|
||||||
});
|
});
|
||||||
return state;
|
return state;
|
||||||
|
|
|
||||||
|
|
@ -6,37 +6,112 @@ part of 'app_settings_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$appSettingsHash() => r'314d7936f54550f57d308056a99230402342a6d0';
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
/// See also [AppSettings].
|
|
||||||
@ProviderFor(AppSettings)
|
@ProviderFor(AppSettings)
|
||||||
final appSettingsProvider =
|
final appSettingsProvider = AppSettingsProvider._();
|
||||||
NotifierProvider<AppSettings, model.AppSettings>.internal(
|
|
||||||
AppSettings.new,
|
final class AppSettingsProvider
|
||||||
name: r'appSettingsProvider',
|
extends $NotifierProvider<AppSettings, model.AppSettings> {
|
||||||
debugGetCreateSourceHash:
|
AppSettingsProvider._()
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$appSettingsHash,
|
: super(
|
||||||
dependencies: null,
|
from: null,
|
||||||
allTransitiveDependencies: null,
|
argument: null,
|
||||||
);
|
retry: null,
|
||||||
|
name: r'appSettingsProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$appSettingsHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
AppSettings create() => AppSettings();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(model.AppSettings value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<model.AppSettings>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String _$appSettingsHash() => r'744d7e0157eb3b089c4187b35b845fc78547a44e';
|
||||||
|
|
||||||
|
abstract class _$AppSettings extends $Notifier<model.AppSettings> {
|
||||||
|
model.AppSettings build();
|
||||||
|
@$mustCallSuper
|
||||||
|
@override
|
||||||
|
void runBuild() {
|
||||||
|
final ref = this.ref as $Ref<model.AppSettings, model.AppSettings>;
|
||||||
|
final element =
|
||||||
|
ref.element
|
||||||
|
as $ClassProviderElement<
|
||||||
|
AnyNotifier<model.AppSettings, model.AppSettings>,
|
||||||
|
model.AppSettings,
|
||||||
|
Object?,
|
||||||
|
Object?
|
||||||
|
>;
|
||||||
|
element.handleCreate(ref, build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProviderFor(SleepTimerSettings)
|
||||||
|
final sleepTimerSettingsProvider = SleepTimerSettingsProvider._();
|
||||||
|
|
||||||
|
final class SleepTimerSettingsProvider
|
||||||
|
extends $NotifierProvider<SleepTimerSettings, model.SleepTimerSettings> {
|
||||||
|
SleepTimerSettingsProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'sleepTimerSettingsProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$sleepTimerSettingsHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
SleepTimerSettings create() => SleepTimerSettings();
|
||||||
|
|
||||||
|
/// {@macro riverpod.override_with_value}
|
||||||
|
Override overrideWithValue(model.SleepTimerSettings value) {
|
||||||
|
return $ProviderOverride(
|
||||||
|
origin: this,
|
||||||
|
providerOverride: $SyncValueProvider<model.SleepTimerSettings>(value),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
typedef _$AppSettings = Notifier<model.AppSettings>;
|
|
||||||
String _$sleepTimerSettingsHash() =>
|
String _$sleepTimerSettingsHash() =>
|
||||||
r'85bb3d3fb292b9a3a5b771d86e5fc57718519c69';
|
r'85bb3d3fb292b9a3a5b771d86e5fc57718519c69';
|
||||||
|
|
||||||
/// See also [SleepTimerSettings].
|
abstract class _$SleepTimerSettings
|
||||||
@ProviderFor(SleepTimerSettings)
|
extends $Notifier<model.SleepTimerSettings> {
|
||||||
final sleepTimerSettingsProvider =
|
model.SleepTimerSettings build();
|
||||||
NotifierProvider<SleepTimerSettings, model.SleepTimerSettings>.internal(
|
@$mustCallSuper
|
||||||
SleepTimerSettings.new,
|
@override
|
||||||
name: r'sleepTimerSettingsProvider',
|
void runBuild() {
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
final ref =
|
||||||
? null
|
this.ref as $Ref<model.SleepTimerSettings, model.SleepTimerSettings>;
|
||||||
: _$sleepTimerSettingsHash,
|
final element =
|
||||||
dependencies: null,
|
ref.element
|
||||||
allTransitiveDependencies: null,
|
as $ClassProviderElement<
|
||||||
);
|
AnyNotifier<model.SleepTimerSettings, model.SleepTimerSettings>,
|
||||||
|
model.SleepTimerSettings,
|
||||||
typedef _$SleepTimerSettings = Notifier<model.SleepTimerSettings>;
|
Object?,
|
||||||
// ignore_for_file: type=lint
|
Object?
|
||||||
// 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
|
>;
|
||||||
|
element.handleCreate(ref, build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,72 +6,138 @@ part of 'metadata_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// ignore_for_file: type=lint, type=warning
|
||||||
|
|
||||||
|
@ProviderFor(deviceName)
|
||||||
|
final deviceNameProvider = DeviceNameProvider._();
|
||||||
|
|
||||||
|
final class DeviceNameProvider
|
||||||
|
extends $FunctionalProvider<AsyncValue<String>, String, FutureOr<String>>
|
||||||
|
with $FutureModifier<String>, $FutureProvider<String> {
|
||||||
|
DeviceNameProvider._()
|
||||||
|
: super(
|
||||||
|
from: null,
|
||||||
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'deviceNameProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$deviceNameHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<String> $createElement($ProviderPointer pointer) =>
|
||||||
|
$FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<String> create(Ref ref) {
|
||||||
|
return deviceName(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _$deviceNameHash() => r'9e38adda74e70a91851a682f05228bd759356dcc';
|
String _$deviceNameHash() => r'9e38adda74e70a91851a682f05228bd759356dcc';
|
||||||
|
|
||||||
/// See also [deviceName].
|
@ProviderFor(deviceModel)
|
||||||
@ProviderFor(deviceName)
|
final deviceModelProvider = DeviceModelProvider._();
|
||||||
final deviceNameProvider = FutureProvider<String>.internal(
|
|
||||||
deviceName,
|
final class DeviceModelProvider
|
||||||
name: r'deviceNameProvider',
|
extends $FunctionalProvider<AsyncValue<String>, String, FutureOr<String>>
|
||||||
debugGetCreateSourceHash:
|
with $FutureModifier<String>, $FutureProvider<String> {
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$deviceNameHash,
|
DeviceModelProvider._()
|
||||||
dependencies: null,
|
: super(
|
||||||
allTransitiveDependencies: null,
|
from: null,
|
||||||
);
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'deviceModelProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$deviceModelHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<String> $createElement($ProviderPointer pointer) =>
|
||||||
|
$FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<String> create(Ref ref) {
|
||||||
|
return deviceModel(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef DeviceNameRef = FutureProviderRef<String>;
|
|
||||||
String _$deviceModelHash() => r'922b13d9e35b5b5c5b8e96f2f2c2ae594f4f41f2';
|
String _$deviceModelHash() => r'922b13d9e35b5b5c5b8e96f2f2c2ae594f4f41f2';
|
||||||
|
|
||||||
/// See also [deviceModel].
|
@ProviderFor(deviceSdkVersion)
|
||||||
@ProviderFor(deviceModel)
|
final deviceSdkVersionProvider = DeviceSdkVersionProvider._();
|
||||||
final deviceModelProvider = FutureProvider<String>.internal(
|
|
||||||
deviceModel,
|
final class DeviceSdkVersionProvider
|
||||||
name: r'deviceModelProvider',
|
extends $FunctionalProvider<AsyncValue<String>, String, FutureOr<String>>
|
||||||
debugGetCreateSourceHash:
|
with $FutureModifier<String>, $FutureProvider<String> {
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$deviceModelHash,
|
DeviceSdkVersionProvider._()
|
||||||
dependencies: null,
|
: super(
|
||||||
allTransitiveDependencies: null,
|
from: null,
|
||||||
);
|
argument: null,
|
||||||
|
retry: null,
|
||||||
|
name: r'deviceSdkVersionProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$deviceSdkVersionHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<String> $createElement($ProviderPointer pointer) =>
|
||||||
|
$FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<String> create(Ref ref) {
|
||||||
|
return deviceSdkVersion(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef DeviceModelRef = FutureProviderRef<String>;
|
|
||||||
String _$deviceSdkVersionHash() => r'33178d80590808d1f4cca2be8a3b52c6f6724cac';
|
String _$deviceSdkVersionHash() => r'33178d80590808d1f4cca2be8a3b52c6f6724cac';
|
||||||
|
|
||||||
/// See also [deviceSdkVersion].
|
@ProviderFor(deviceManufacturer)
|
||||||
@ProviderFor(deviceSdkVersion)
|
final deviceManufacturerProvider = DeviceManufacturerProvider._();
|
||||||
final deviceSdkVersionProvider = FutureProvider<String>.internal(
|
|
||||||
deviceSdkVersion,
|
final class DeviceManufacturerProvider
|
||||||
name: r'deviceSdkVersionProvider',
|
extends $FunctionalProvider<AsyncValue<String>, String, FutureOr<String>>
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
with $FutureModifier<String>, $FutureProvider<String> {
|
||||||
? null
|
DeviceManufacturerProvider._()
|
||||||
: _$deviceSdkVersionHash,
|
: super(
|
||||||
dependencies: null,
|
from: null,
|
||||||
allTransitiveDependencies: null,
|
argument: null,
|
||||||
);
|
retry: null,
|
||||||
|
name: r'deviceManufacturerProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$deviceManufacturerHash();
|
||||||
|
|
||||||
|
@$internal
|
||||||
|
@override
|
||||||
|
$FutureProviderElement<String> $createElement($ProviderPointer pointer) =>
|
||||||
|
$FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<String> create(Ref ref) {
|
||||||
|
return deviceManufacturer(ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef DeviceSdkVersionRef = FutureProviderRef<String>;
|
|
||||||
String _$deviceManufacturerHash() =>
|
String _$deviceManufacturerHash() =>
|
||||||
r'39250767deb8635fa7c7e18bae23576b9b863e04';
|
r'39250767deb8635fa7c7e18bae23576b9b863e04';
|
||||||
|
|
||||||
/// See also [deviceManufacturer].
|
|
||||||
@ProviderFor(deviceManufacturer)
|
|
||||||
final deviceManufacturerProvider = FutureProvider<String>.internal(
|
|
||||||
deviceManufacturer,
|
|
||||||
name: r'deviceManufacturerProvider',
|
|
||||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$deviceManufacturerHash,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
);
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
typedef DeviceManufacturerRef = FutureProviderRef<String>;
|
|
||||||
// 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
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ part 'api_settings.g.dart';
|
||||||
///
|
///
|
||||||
/// all settings that are needed to interact with the server are stored here
|
/// all settings that are needed to interact with the server are stored here
|
||||||
@freezed
|
@freezed
|
||||||
class ApiSettings with _$ApiSettings {
|
sealed class ApiSettings with _$ApiSettings {
|
||||||
const factory ApiSettings({
|
const factory ApiSettings({
|
||||||
AudiobookShelfServer? activeServer,
|
AudiobookShelfServer? activeServer,
|
||||||
AuthenticatedUser? activeUser,
|
AuthenticatedUser? activeUser,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// coverage:ignore-file
|
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
// ignore_for_file: type=lint
|
// 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
|
// 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,238 +9,317 @@ part of 'api_settings.dart';
|
||||||
// FreezedGenerator
|
// FreezedGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
T _$identity<T>(T value) => value;
|
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');
|
|
||||||
|
|
||||||
ApiSettings _$ApiSettingsFromJson(Map<String, dynamic> json) {
|
|
||||||
return _ApiSettings.fromJson(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$ApiSettings {
|
mixin _$ApiSettings {
|
||||||
AudiobookShelfServer? get activeServer => throw _privateConstructorUsedError;
|
|
||||||
AuthenticatedUser? get activeUser => throw _privateConstructorUsedError;
|
AudiobookShelfServer? get activeServer; AuthenticatedUser? get activeUser; String? get activeLibraryId;
|
||||||
String? get activeLibraryId => throw _privateConstructorUsedError;
|
/// Create a copy of ApiSettings
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$ApiSettingsCopyWith<ApiSettings> get copyWith => _$ApiSettingsCopyWithImpl<ApiSettings>(this as ApiSettings, _$identity);
|
||||||
|
|
||||||
/// Serializes this ApiSettings to a JSON map.
|
/// Serializes this ApiSettings 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 ApiSettings&&(identical(other.activeServer, activeServer) || other.activeServer == activeServer)&&(identical(other.activeUser, activeUser) || other.activeUser == activeUser)&&(identical(other.activeLibraryId, activeLibraryId) || other.activeLibraryId == activeLibraryId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,activeServer,activeUser,activeLibraryId);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ApiSettings(activeServer: $activeServer, activeUser: $activeUser, activeLibraryId: $activeLibraryId)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a copy of ApiSettings
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
$ApiSettingsCopyWith<ApiSettings> get copyWith =>
|
|
||||||
throw _privateConstructorUsedError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract class $ApiSettingsCopyWith<$Res> {
|
abstract mixin class $ApiSettingsCopyWith<$Res> {
|
||||||
factory $ApiSettingsCopyWith(
|
factory $ApiSettingsCopyWith(ApiSettings value, $Res Function(ApiSettings) _then) = _$ApiSettingsCopyWithImpl;
|
||||||
ApiSettings value, $Res Function(ApiSettings) then) =
|
@useResult
|
||||||
_$ApiSettingsCopyWithImpl<$Res, ApiSettings>;
|
$Res call({
|
||||||
@useResult
|
AudiobookShelfServer? activeServer, AuthenticatedUser? activeUser, String? activeLibraryId
|
||||||
$Res call(
|
});
|
||||||
{AudiobookShelfServer? activeServer,
|
|
||||||
AuthenticatedUser? activeUser,
|
|
||||||
String? activeLibraryId});
|
$AudiobookShelfServerCopyWith<$Res>? get activeServer;$AuthenticatedUserCopyWith<$Res>? get activeUser;
|
||||||
|
|
||||||
$AudiobookShelfServerCopyWith<$Res>? get activeServer;
|
|
||||||
$AuthenticatedUserCopyWith<$Res>? get activeUser;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$ApiSettingsCopyWithImpl<$Res, $Val extends ApiSettings>
|
class _$ApiSettingsCopyWithImpl<$Res>
|
||||||
implements $ApiSettingsCopyWith<$Res> {
|
implements $ApiSettingsCopyWith<$Res> {
|
||||||
_$ApiSettingsCopyWithImpl(this._value, this._then);
|
_$ApiSettingsCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
// ignore: unused_field
|
final ApiSettings _self;
|
||||||
final $Val _value;
|
final $Res Function(ApiSettings) _then;
|
||||||
// ignore: unused_field
|
|
||||||
final $Res Function($Val) _then;
|
|
||||||
|
|
||||||
/// Create a copy of ApiSettings
|
/// Create a copy of ApiSettings
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline') @override $Res call({Object? activeServer = freezed,Object? activeUser = freezed,Object? activeLibraryId = freezed,}) {
|
||||||
@override
|
return _then(_self.copyWith(
|
||||||
$Res call({
|
activeServer: freezed == activeServer ? _self.activeServer : activeServer // ignore: cast_nullable_to_non_nullable
|
||||||
Object? activeServer = freezed,
|
as AudiobookShelfServer?,activeUser: freezed == activeUser ? _self.activeUser : activeUser // ignore: cast_nullable_to_non_nullable
|
||||||
Object? activeUser = freezed,
|
as AuthenticatedUser?,activeLibraryId: freezed == activeLibraryId ? _self.activeLibraryId : activeLibraryId // ignore: cast_nullable_to_non_nullable
|
||||||
Object? activeLibraryId = freezed,
|
as String?,
|
||||||
}) {
|
));
|
||||||
return _then(_value.copyWith(
|
}
|
||||||
activeServer: freezed == activeServer
|
/// Create a copy of ApiSettings
|
||||||
? _value.activeServer
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
: activeServer // ignore: cast_nullable_to_non_nullable
|
@override
|
||||||
as AudiobookShelfServer?,
|
@pragma('vm:prefer-inline')
|
||||||
activeUser: freezed == activeUser
|
$AudiobookShelfServerCopyWith<$Res>? get activeServer {
|
||||||
? _value.activeUser
|
if (_self.activeServer == null) {
|
||||||
: activeUser // ignore: cast_nullable_to_non_nullable
|
return null;
|
||||||
as AuthenticatedUser?,
|
|
||||||
activeLibraryId: freezed == activeLibraryId
|
|
||||||
? _value.activeLibraryId
|
|
||||||
: activeLibraryId // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String?,
|
|
||||||
) as $Val);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a copy of ApiSettings
|
return $AudiobookShelfServerCopyWith<$Res>(_self.activeServer!, (value) {
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
return _then(_self.copyWith(activeServer: value));
|
||||||
@override
|
});
|
||||||
@pragma('vm:prefer-inline')
|
}/// Create a copy of ApiSettings
|
||||||
$AudiobookShelfServerCopyWith<$Res>? get activeServer {
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
if (_value.activeServer == null) {
|
@override
|
||||||
return null;
|
@pragma('vm:prefer-inline')
|
||||||
}
|
$AuthenticatedUserCopyWith<$Res>? get activeUser {
|
||||||
|
if (_self.activeUser == null) {
|
||||||
return $AudiobookShelfServerCopyWith<$Res>(_value.activeServer!, (value) {
|
return null;
|
||||||
return _then(_value.copyWith(activeServer: value) as $Val);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a copy of ApiSettings
|
return $AuthenticatedUserCopyWith<$Res>(_self.activeUser!, (value) {
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
return _then(_self.copyWith(activeUser: value));
|
||||||
@override
|
});
|
||||||
@pragma('vm:prefer-inline')
|
}
|
||||||
$AuthenticatedUserCopyWith<$Res>? get activeUser {
|
|
||||||
if (_value.activeUser == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $AuthenticatedUserCopyWith<$Res>(_value.activeUser!, (value) {
|
|
||||||
return _then(_value.copyWith(activeUser: value) as $Val);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
abstract class _$$ApiSettingsImplCopyWith<$Res>
|
|
||||||
implements $ApiSettingsCopyWith<$Res> {
|
|
||||||
factory _$$ApiSettingsImplCopyWith(
|
|
||||||
_$ApiSettingsImpl value, $Res Function(_$ApiSettingsImpl) then) =
|
|
||||||
__$$ApiSettingsImplCopyWithImpl<$Res>;
|
|
||||||
@override
|
|
||||||
@useResult
|
|
||||||
$Res call(
|
|
||||||
{AudiobookShelfServer? activeServer,
|
|
||||||
AuthenticatedUser? activeUser,
|
|
||||||
String? activeLibraryId});
|
|
||||||
|
|
||||||
@override
|
/// Adds pattern-matching-related methods to [ApiSettings].
|
||||||
$AudiobookShelfServerCopyWith<$Res>? get activeServer;
|
extension ApiSettingsPatterns on ApiSettings {
|
||||||
@override
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
$AuthenticatedUserCopyWith<$Res>? get activeUser;
|
///
|
||||||
|
/// It is equivalent to doing:
|
||||||
|
/// ```dart
|
||||||
|
/// switch (sealedClass) {
|
||||||
|
/// case final Subclass value:
|
||||||
|
/// return ...;
|
||||||
|
/// case _:
|
||||||
|
/// return orElse();
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ApiSettings value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ApiSettings() 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( _ApiSettings value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ApiSettings():
|
||||||
|
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( _ApiSettings value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ApiSettings() 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( AudiobookShelfServer? activeServer, AuthenticatedUser? activeUser, String? activeLibraryId)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ApiSettings() when $default != null:
|
||||||
|
return $default(_that.activeServer,_that.activeUser,_that.activeLibraryId);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( AudiobookShelfServer? activeServer, AuthenticatedUser? activeUser, String? activeLibraryId) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ApiSettings():
|
||||||
|
return $default(_that.activeServer,_that.activeUser,_that.activeLibraryId);}
|
||||||
|
}
|
||||||
|
/// 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( AudiobookShelfServer? activeServer, AuthenticatedUser? activeUser, String? activeLibraryId)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _ApiSettings() when $default != null:
|
||||||
|
return $default(_that.activeServer,_that.activeUser,_that.activeLibraryId);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
class __$$ApiSettingsImplCopyWithImpl<$Res>
|
|
||||||
extends _$ApiSettingsCopyWithImpl<$Res, _$ApiSettingsImpl>
|
|
||||||
implements _$$ApiSettingsImplCopyWith<$Res> {
|
|
||||||
__$$ApiSettingsImplCopyWithImpl(
|
|
||||||
_$ApiSettingsImpl _value, $Res Function(_$ApiSettingsImpl) _then)
|
|
||||||
: super(_value, _then);
|
|
||||||
|
|
||||||
/// Create a copy of ApiSettings
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
@override
|
|
||||||
$Res call({
|
|
||||||
Object? activeServer = freezed,
|
|
||||||
Object? activeUser = freezed,
|
|
||||||
Object? activeLibraryId = freezed,
|
|
||||||
}) {
|
|
||||||
return _then(_$ApiSettingsImpl(
|
|
||||||
activeServer: freezed == activeServer
|
|
||||||
? _value.activeServer
|
|
||||||
: activeServer // ignore: cast_nullable_to_non_nullable
|
|
||||||
as AudiobookShelfServer?,
|
|
||||||
activeUser: freezed == activeUser
|
|
||||||
? _value.activeUser
|
|
||||||
: activeUser // ignore: cast_nullable_to_non_nullable
|
|
||||||
as AuthenticatedUser?,
|
|
||||||
activeLibraryId: freezed == activeLibraryId
|
|
||||||
? _value.activeLibraryId
|
|
||||||
: activeLibraryId // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String?,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class _$ApiSettingsImpl implements _ApiSettings {
|
|
||||||
const _$ApiSettingsImpl(
|
|
||||||
{this.activeServer, this.activeUser, this.activeLibraryId});
|
|
||||||
|
|
||||||
factory _$ApiSettingsImpl.fromJson(Map<String, dynamic> json) =>
|
class _ApiSettings implements ApiSettings {
|
||||||
_$$ApiSettingsImplFromJson(json);
|
const _ApiSettings({this.activeServer, this.activeUser, this.activeLibraryId});
|
||||||
|
factory _ApiSettings.fromJson(Map<String, dynamic> json) => _$ApiSettingsFromJson(json);
|
||||||
|
|
||||||
@override
|
@override final AudiobookShelfServer? activeServer;
|
||||||
final AudiobookShelfServer? activeServer;
|
@override final AuthenticatedUser? activeUser;
|
||||||
@override
|
@override final String? activeLibraryId;
|
||||||
final AuthenticatedUser? activeUser;
|
|
||||||
@override
|
|
||||||
final String? activeLibraryId;
|
|
||||||
|
|
||||||
@override
|
/// Create a copy of ApiSettings
|
||||||
String toString() {
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
return 'ApiSettings(activeServer: $activeServer, activeUser: $activeUser, activeLibraryId: $activeLibraryId)';
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
}
|
@pragma('vm:prefer-inline')
|
||||||
|
_$ApiSettingsCopyWith<_ApiSettings> get copyWith => __$ApiSettingsCopyWithImpl<_ApiSettings>(this, _$identity);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
Map<String, dynamic> toJson() {
|
||||||
return identical(this, other) ||
|
return _$ApiSettingsToJson(this, );
|
||||||
(other.runtimeType == runtimeType &&
|
|
||||||
other is _$ApiSettingsImpl &&
|
|
||||||
(identical(other.activeServer, activeServer) ||
|
|
||||||
other.activeServer == activeServer) &&
|
|
||||||
(identical(other.activeUser, activeUser) ||
|
|
||||||
other.activeUser == activeUser) &&
|
|
||||||
(identical(other.activeLibraryId, activeLibraryId) ||
|
|
||||||
other.activeLibraryId == activeLibraryId));
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
Object.hash(runtimeType, activeServer, activeUser, activeLibraryId);
|
|
||||||
|
|
||||||
/// Create a copy of ApiSettings
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@override
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
_$$ApiSettingsImplCopyWith<_$ApiSettingsImpl> get copyWith =>
|
|
||||||
__$$ApiSettingsImplCopyWithImpl<_$ApiSettingsImpl>(this, _$identity);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return _$$ApiSettingsImplToJson(
|
|
||||||
this,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _ApiSettings implements ApiSettings {
|
@override
|
||||||
const factory _ApiSettings(
|
bool operator ==(Object other) {
|
||||||
{final AudiobookShelfServer? activeServer,
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ApiSettings&&(identical(other.activeServer, activeServer) || other.activeServer == activeServer)&&(identical(other.activeUser, activeUser) || other.activeUser == activeUser)&&(identical(other.activeLibraryId, activeLibraryId) || other.activeLibraryId == activeLibraryId));
|
||||||
final AuthenticatedUser? activeUser,
|
|
||||||
final String? activeLibraryId}) = _$ApiSettingsImpl;
|
|
||||||
|
|
||||||
factory _ApiSettings.fromJson(Map<String, dynamic> json) =
|
|
||||||
_$ApiSettingsImpl.fromJson;
|
|
||||||
|
|
||||||
@override
|
|
||||||
AudiobookShelfServer? get activeServer;
|
|
||||||
@override
|
|
||||||
AuthenticatedUser? get activeUser;
|
|
||||||
@override
|
|
||||||
String? get activeLibraryId;
|
|
||||||
|
|
||||||
/// Create a copy of ApiSettings
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@override
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
_$$ApiSettingsImplCopyWith<_$ApiSettingsImpl> get copyWith =>
|
|
||||||
throw _privateConstructorUsedError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,activeServer,activeUser,activeLibraryId);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'ApiSettings(activeServer: $activeServer, activeUser: $activeUser, activeLibraryId: $activeLibraryId)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$ApiSettingsCopyWith<$Res> implements $ApiSettingsCopyWith<$Res> {
|
||||||
|
factory _$ApiSettingsCopyWith(_ApiSettings value, $Res Function(_ApiSettings) _then) = __$ApiSettingsCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
AudiobookShelfServer? activeServer, AuthenticatedUser? activeUser, String? activeLibraryId
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@override $AudiobookShelfServerCopyWith<$Res>? get activeServer;@override $AuthenticatedUserCopyWith<$Res>? get activeUser;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$ApiSettingsCopyWithImpl<$Res>
|
||||||
|
implements _$ApiSettingsCopyWith<$Res> {
|
||||||
|
__$ApiSettingsCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _ApiSettings _self;
|
||||||
|
final $Res Function(_ApiSettings) _then;
|
||||||
|
|
||||||
|
/// Create a copy of ApiSettings
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? activeServer = freezed,Object? activeUser = freezed,Object? activeLibraryId = freezed,}) {
|
||||||
|
return _then(_ApiSettings(
|
||||||
|
activeServer: freezed == activeServer ? _self.activeServer : activeServer // ignore: cast_nullable_to_non_nullable
|
||||||
|
as AudiobookShelfServer?,activeUser: freezed == activeUser ? _self.activeUser : activeUser // ignore: cast_nullable_to_non_nullable
|
||||||
|
as AuthenticatedUser?,activeLibraryId: freezed == activeLibraryId ? _self.activeLibraryId : activeLibraryId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a copy of ApiSettings
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$AudiobookShelfServerCopyWith<$Res>? get activeServer {
|
||||||
|
if (_self.activeServer == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $AudiobookShelfServerCopyWith<$Res>(_self.activeServer!, (value) {
|
||||||
|
return _then(_self.copyWith(activeServer: value));
|
||||||
|
});
|
||||||
|
}/// Create a copy of ApiSettings
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$AuthenticatedUserCopyWith<$Res>? get activeUser {
|
||||||
|
if (_self.activeUser == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $AuthenticatedUserCopyWith<$Res>(_self.activeUser!, (value) {
|
||||||
|
return _then(_self.copyWith(activeUser: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
|
|
|
||||||
|
|
@ -6,20 +6,19 @@ part of 'api_settings.dart';
|
||||||
// JsonSerializableGenerator
|
// JsonSerializableGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
_$ApiSettingsImpl _$$ApiSettingsImplFromJson(Map<String, dynamic> json) =>
|
_ApiSettings _$ApiSettingsFromJson(Map<String, dynamic> json) => _ApiSettings(
|
||||||
_$ApiSettingsImpl(
|
activeServer: json['activeServer'] == null
|
||||||
activeServer: json['activeServer'] == null
|
? null
|
||||||
? null
|
: AudiobookShelfServer.fromJson(
|
||||||
: AudiobookShelfServer.fromJson(
|
json['activeServer'] as Map<String, dynamic>,
|
||||||
json['activeServer'] as Map<String, dynamic>),
|
),
|
||||||
activeUser: json['activeUser'] == null
|
activeUser: json['activeUser'] == null
|
||||||
? null
|
? null
|
||||||
: AuthenticatedUser.fromJson(
|
: AuthenticatedUser.fromJson(json['activeUser'] as Map<String, dynamic>),
|
||||||
json['activeUser'] as Map<String, dynamic>),
|
activeLibraryId: json['activeLibraryId'] as String?,
|
||||||
activeLibraryId: json['activeLibraryId'] as String?,
|
);
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$$ApiSettingsImplToJson(_$ApiSettingsImpl instance) =>
|
Map<String, dynamic> _$ApiSettingsToJson(_ApiSettings instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'activeServer': instance.activeServer,
|
'activeServer': instance.activeServer,
|
||||||
'activeUser': instance.activeUser,
|
'activeUser': instance.activeUser,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ part 'app_settings.g.dart';
|
||||||
///
|
///
|
||||||
/// only the visual settings are stored here
|
/// only the visual settings are stored here
|
||||||
@freezed
|
@freezed
|
||||||
class AppSettings with _$AppSettings {
|
sealed class AppSettings with _$AppSettings {
|
||||||
const factory AppSettings({
|
const factory AppSettings({
|
||||||
@Default(ThemeSettings()) ThemeSettings themeSettings,
|
@Default(ThemeSettings()) ThemeSettings themeSettings,
|
||||||
@Default(PlayerSettings()) PlayerSettings playerSettings,
|
@Default(PlayerSettings()) PlayerSettings playerSettings,
|
||||||
|
|
@ -27,7 +27,7 @@ class AppSettings with _$AppSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class ThemeSettings with _$ThemeSettings {
|
sealed class ThemeSettings with _$ThemeSettings {
|
||||||
const factory ThemeSettings({
|
const factory ThemeSettings({
|
||||||
@Default(ThemeMode.system) ThemeMode themeMode,
|
@Default(ThemeMode.system) ThemeMode themeMode,
|
||||||
@Default(false) bool highContrast,
|
@Default(false) bool highContrast,
|
||||||
|
|
@ -42,7 +42,7 @@ class ThemeSettings with _$ThemeSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class PlayerSettings with _$PlayerSettings {
|
sealed class PlayerSettings with _$PlayerSettings {
|
||||||
const factory PlayerSettings({
|
const factory PlayerSettings({
|
||||||
@Default(MinimizedPlayerSettings())
|
@Default(MinimizedPlayerSettings())
|
||||||
MinimizedPlayerSettings miniPlayerSettings,
|
MinimizedPlayerSettings miniPlayerSettings,
|
||||||
|
|
@ -65,7 +65,7 @@ class PlayerSettings with _$PlayerSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class ExpandedPlayerSettings with _$ExpandedPlayerSettings {
|
sealed class ExpandedPlayerSettings with _$ExpandedPlayerSettings {
|
||||||
const factory ExpandedPlayerSettings({
|
const factory ExpandedPlayerSettings({
|
||||||
@Default(false) bool showTotalProgress,
|
@Default(false) bool showTotalProgress,
|
||||||
@Default(true) bool showChapterProgress,
|
@Default(true) bool showChapterProgress,
|
||||||
|
|
@ -76,28 +76,25 @@ class ExpandedPlayerSettings with _$ExpandedPlayerSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class MinimizedPlayerSettings with _$MinimizedPlayerSettings {
|
sealed class MinimizedPlayerSettings with _$MinimizedPlayerSettings {
|
||||||
const factory MinimizedPlayerSettings({
|
const factory MinimizedPlayerSettings({@Default(false) bool useChapterInfo}) =
|
||||||
@Default(false) bool useChapterInfo,
|
_MinimizedPlayerSettings;
|
||||||
}) = _MinimizedPlayerSettings;
|
|
||||||
|
|
||||||
factory MinimizedPlayerSettings.fromJson(Map<String, dynamic> json) =>
|
factory MinimizedPlayerSettings.fromJson(Map<String, dynamic> json) =>
|
||||||
_$MinimizedPlayerSettingsFromJson(json);
|
_$MinimizedPlayerSettingsFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class SleepTimerSettings with _$SleepTimerSettings {
|
sealed class SleepTimerSettings with _$SleepTimerSettings {
|
||||||
const factory SleepTimerSettings({
|
const factory SleepTimerSettings({
|
||||||
@Default(Duration(minutes: 15)) Duration defaultDuration,
|
@Default(Duration(minutes: 15)) Duration defaultDuration,
|
||||||
@Default(
|
@Default([
|
||||||
[
|
Duration(minutes: 5),
|
||||||
Duration(minutes: 5),
|
Duration(minutes: 10),
|
||||||
Duration(minutes: 10),
|
Duration(minutes: 15),
|
||||||
Duration(minutes: 15),
|
Duration(minutes: 20),
|
||||||
Duration(minutes: 20),
|
Duration(minutes: 30),
|
||||||
Duration(minutes: 30),
|
])
|
||||||
],
|
|
||||||
)
|
|
||||||
List<Duration> presetDurations,
|
List<Duration> presetDurations,
|
||||||
@Default(Duration(minutes: 100)) Duration maxDuration,
|
@Default(Duration(minutes: 100)) Duration maxDuration,
|
||||||
@Default(false) bool fadeOutAudio,
|
@Default(false) bool fadeOutAudio,
|
||||||
|
|
@ -134,7 +131,7 @@ class SleepTimerSettings with _$SleepTimerSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class DownloadSettings with _$DownloadSettings {
|
sealed class DownloadSettings with _$DownloadSettings {
|
||||||
const factory DownloadSettings({
|
const factory DownloadSettings({
|
||||||
@Default(true) bool requiresWiFi,
|
@Default(true) bool requiresWiFi,
|
||||||
@Default(3) int retries,
|
@Default(3) int retries,
|
||||||
|
|
@ -149,21 +146,19 @@ class DownloadSettings with _$DownloadSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class NotificationSettings with _$NotificationSettings {
|
sealed class NotificationSettings with _$NotificationSettings {
|
||||||
const factory NotificationSettings({
|
const factory NotificationSettings({
|
||||||
@Default(Duration(seconds: 30)) Duration fastForwardInterval,
|
@Default(Duration(seconds: 30)) Duration fastForwardInterval,
|
||||||
@Default(Duration(seconds: 10)) Duration rewindInterval,
|
@Default(Duration(seconds: 10)) Duration rewindInterval,
|
||||||
@Default(true) bool progressBarIsChapterProgress,
|
@Default(true) bool progressBarIsChapterProgress,
|
||||||
@Default('\$bookTitle') String primaryTitle,
|
@Default('\$bookTitle') String primaryTitle,
|
||||||
@Default('\$author') String secondaryTitle,
|
@Default('\$author') String secondaryTitle,
|
||||||
@Default(
|
@Default([
|
||||||
[
|
NotificationMediaControl.rewind,
|
||||||
NotificationMediaControl.rewind,
|
NotificationMediaControl.fastForward,
|
||||||
NotificationMediaControl.fastForward,
|
NotificationMediaControl.skipToPreviousChapter,
|
||||||
NotificationMediaControl.skipToPreviousChapter,
|
NotificationMediaControl.skipToNextChapter,
|
||||||
NotificationMediaControl.skipToNextChapter,
|
])
|
||||||
],
|
|
||||||
)
|
|
||||||
List<NotificationMediaControl> mediaControls,
|
List<NotificationMediaControl> mediaControls,
|
||||||
}) = _NotificationSettings;
|
}) = _NotificationSettings;
|
||||||
|
|
||||||
|
|
@ -196,7 +191,7 @@ enum NotificationMediaControl {
|
||||||
|
|
||||||
/// Shake Detection Settings
|
/// Shake Detection Settings
|
||||||
@freezed
|
@freezed
|
||||||
class ShakeDetectionSettings with _$ShakeDetectionSettings {
|
sealed class ShakeDetectionSettings with _$ShakeDetectionSettings {
|
||||||
const factory ShakeDetectionSettings({
|
const factory ShakeDetectionSettings({
|
||||||
@Default(true) bool isEnabled,
|
@Default(true) bool isEnabled,
|
||||||
@Default(ShakeDirection.horizontal) ShakeDirection direction,
|
@Default(ShakeDirection.horizontal) ShakeDirection direction,
|
||||||
|
|
@ -222,18 +217,12 @@ class ShakeDetectionSettings with _$ShakeDetectionSettings {
|
||||||
|
|
||||||
enum ShakeDirection { horizontal, vertical }
|
enum ShakeDirection { horizontal, vertical }
|
||||||
|
|
||||||
enum ShakeAction {
|
enum ShakeAction { none, playPause, resetSleepTimer, fastForward, rewind }
|
||||||
none,
|
|
||||||
playPause,
|
|
||||||
resetSleepTimer,
|
|
||||||
fastForward,
|
|
||||||
rewind,
|
|
||||||
}
|
|
||||||
|
|
||||||
enum ShakeDetectedFeedback { vibrate, beep }
|
enum ShakeDetectedFeedback { vibrate, beep }
|
||||||
|
|
||||||
@freezed
|
@freezed
|
||||||
class HomePageSettings with _$HomePageSettings {
|
sealed class HomePageSettings with _$HomePageSettings {
|
||||||
const factory HomePageSettings({
|
const factory HomePageSettings({
|
||||||
@Default(true) bool showPlayButtonOnContinueListeningShelf,
|
@Default(true) bool showPlayButtonOnContinueListeningShelf,
|
||||||
@Default(false) bool showPlayButtonOnContinueSeriesShelf,
|
@Default(false) bool showPlayButtonOnContinueSeriesShelf,
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -6,39 +6,41 @@ part of 'app_settings.dart';
|
||||||
// JsonSerializableGenerator
|
// JsonSerializableGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
_$AppSettingsImpl _$$AppSettingsImplFromJson(Map<String, dynamic> json) =>
|
_AppSettings _$AppSettingsFromJson(Map<String, dynamic> json) => _AppSettings(
|
||||||
_$AppSettingsImpl(
|
themeSettings: json['themeSettings'] == null
|
||||||
themeSettings: json['themeSettings'] == null
|
? const ThemeSettings()
|
||||||
? const ThemeSettings()
|
: ThemeSettings.fromJson(json['themeSettings'] as Map<String, dynamic>),
|
||||||
: ThemeSettings.fromJson(
|
playerSettings: json['playerSettings'] == null
|
||||||
json['themeSettings'] as Map<String, dynamic>),
|
? const PlayerSettings()
|
||||||
playerSettings: json['playerSettings'] == null
|
: PlayerSettings.fromJson(json['playerSettings'] as Map<String, dynamic>),
|
||||||
? const PlayerSettings()
|
sleepTimerSettings: json['sleepTimerSettings'] == null
|
||||||
: PlayerSettings.fromJson(
|
? const SleepTimerSettings()
|
||||||
json['playerSettings'] as Map<String, dynamic>),
|
: SleepTimerSettings.fromJson(
|
||||||
sleepTimerSettings: json['sleepTimerSettings'] == null
|
json['sleepTimerSettings'] as Map<String, dynamic>,
|
||||||
? const SleepTimerSettings()
|
),
|
||||||
: SleepTimerSettings.fromJson(
|
downloadSettings: json['downloadSettings'] == null
|
||||||
json['sleepTimerSettings'] as Map<String, dynamic>),
|
? const DownloadSettings()
|
||||||
downloadSettings: json['downloadSettings'] == null
|
: DownloadSettings.fromJson(
|
||||||
? const DownloadSettings()
|
json['downloadSettings'] as Map<String, dynamic>,
|
||||||
: DownloadSettings.fromJson(
|
),
|
||||||
json['downloadSettings'] as Map<String, dynamic>),
|
notificationSettings: json['notificationSettings'] == null
|
||||||
notificationSettings: json['notificationSettings'] == null
|
? const NotificationSettings()
|
||||||
? const NotificationSettings()
|
: NotificationSettings.fromJson(
|
||||||
: NotificationSettings.fromJson(
|
json['notificationSettings'] as Map<String, dynamic>,
|
||||||
json['notificationSettings'] as Map<String, dynamic>),
|
),
|
||||||
shakeDetectionSettings: json['shakeDetectionSettings'] == null
|
shakeDetectionSettings: json['shakeDetectionSettings'] == null
|
||||||
? const ShakeDetectionSettings()
|
? const ShakeDetectionSettings()
|
||||||
: ShakeDetectionSettings.fromJson(
|
: ShakeDetectionSettings.fromJson(
|
||||||
json['shakeDetectionSettings'] as Map<String, dynamic>),
|
json['shakeDetectionSettings'] as Map<String, dynamic>,
|
||||||
homePageSettings: json['homePageSettings'] == null
|
),
|
||||||
? const HomePageSettings()
|
homePageSettings: json['homePageSettings'] == null
|
||||||
: HomePageSettings.fromJson(
|
? const HomePageSettings()
|
||||||
json['homePageSettings'] as Map<String, dynamic>),
|
: HomePageSettings.fromJson(
|
||||||
);
|
json['homePageSettings'] as Map<String, dynamic>,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$AppSettingsImplToJson(_$AppSettingsImpl instance) =>
|
Map<String, dynamic> _$AppSettingsToJson(_AppSettings instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'themeSettings': instance.themeSettings,
|
'themeSettings': instance.themeSettings,
|
||||||
'playerSettings': instance.playerSettings,
|
'playerSettings': instance.playerSettings,
|
||||||
|
|
@ -49,9 +51,10 @@ Map<String, dynamic> _$$AppSettingsImplToJson(_$AppSettingsImpl instance) =>
|
||||||
'homePageSettings': instance.homePageSettings,
|
'homePageSettings': instance.homePageSettings,
|
||||||
};
|
};
|
||||||
|
|
||||||
_$ThemeSettingsImpl _$$ThemeSettingsImplFromJson(Map<String, dynamic> json) =>
|
_ThemeSettings _$ThemeSettingsFromJson(Map<String, dynamic> json) =>
|
||||||
_$ThemeSettingsImpl(
|
_ThemeSettings(
|
||||||
themeMode: $enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']) ??
|
themeMode:
|
||||||
|
$enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']) ??
|
||||||
ThemeMode.system,
|
ThemeMode.system,
|
||||||
highContrast: json['highContrast'] as bool? ?? false,
|
highContrast: json['highContrast'] as bool? ?? false,
|
||||||
useMaterialThemeFromSystem:
|
useMaterialThemeFromSystem:
|
||||||
|
|
@ -63,7 +66,7 @@ _$ThemeSettingsImpl _$$ThemeSettingsImplFromJson(Map<String, dynamic> json) =>
|
||||||
json['useCurrentPlayerThemeThroughoutApp'] as bool? ?? true,
|
json['useCurrentPlayerThemeThroughoutApp'] as bool? ?? true,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$ThemeSettingsImplToJson(_$ThemeSettingsImpl instance) =>
|
Map<String, dynamic> _$ThemeSettingsToJson(_ThemeSettings instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'themeMode': _$ThemeModeEnumMap[instance.themeMode]!,
|
'themeMode': _$ThemeModeEnumMap[instance.themeMode]!,
|
||||||
'highContrast': instance.highContrast,
|
'highContrast': instance.highContrast,
|
||||||
|
|
@ -80,96 +83,97 @@ const _$ThemeModeEnumMap = {
|
||||||
ThemeMode.dark: 'dark',
|
ThemeMode.dark: 'dark',
|
||||||
};
|
};
|
||||||
|
|
||||||
_$PlayerSettingsImpl _$$PlayerSettingsImplFromJson(Map<String, dynamic> json) =>
|
_PlayerSettings _$PlayerSettingsFromJson(
|
||||||
_$PlayerSettingsImpl(
|
Map<String, dynamic> json,
|
||||||
miniPlayerSettings: json['miniPlayerSettings'] == null
|
) => _PlayerSettings(
|
||||||
? const MinimizedPlayerSettings()
|
miniPlayerSettings: json['miniPlayerSettings'] == null
|
||||||
: MinimizedPlayerSettings.fromJson(
|
? const MinimizedPlayerSettings()
|
||||||
json['miniPlayerSettings'] as Map<String, dynamic>),
|
: MinimizedPlayerSettings.fromJson(
|
||||||
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
json['miniPlayerSettings'] as Map<String, dynamic>,
|
||||||
? const ExpandedPlayerSettings()
|
),
|
||||||
: ExpandedPlayerSettings.fromJson(
|
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
||||||
json['expandedPlayerSettings'] as Map<String, dynamic>),
|
? const ExpandedPlayerSettings()
|
||||||
preferredDefaultVolume:
|
: ExpandedPlayerSettings.fromJson(
|
||||||
(json['preferredDefaultVolume'] as num?)?.toDouble() ?? 1,
|
json['expandedPlayerSettings'] as Map<String, dynamic>,
|
||||||
preferredDefaultSpeed:
|
),
|
||||||
(json['preferredDefaultSpeed'] as num?)?.toDouble() ?? 1,
|
preferredDefaultVolume:
|
||||||
speedOptions: (json['speedOptions'] as List<dynamic>?)
|
(json['preferredDefaultVolume'] as num?)?.toDouble() ?? 1,
|
||||||
?.map((e) => (e as num).toDouble())
|
preferredDefaultSpeed:
|
||||||
.toList() ??
|
(json['preferredDefaultSpeed'] as num?)?.toDouble() ?? 1,
|
||||||
const [1, 1.25, 1.5, 1.75, 2],
|
speedOptions:
|
||||||
speedIncrement: (json['speedIncrement'] as num?)?.toDouble() ?? 0.05,
|
(json['speedOptions'] as List<dynamic>?)
|
||||||
minSpeed: (json['minSpeed'] as num?)?.toDouble() ?? 0.1,
|
?.map((e) => (e as num).toDouble())
|
||||||
maxSpeed: (json['maxSpeed'] as num?)?.toDouble() ?? 4,
|
.toList() ??
|
||||||
minimumPositionForReporting: json['minimumPositionForReporting'] == null
|
const [1, 1.25, 1.5, 1.75, 2],
|
||||||
? const Duration(seconds: 10)
|
speedIncrement: (json['speedIncrement'] as num?)?.toDouble() ?? 0.05,
|
||||||
: Duration(
|
minSpeed: (json['minSpeed'] as num?)?.toDouble() ?? 0.1,
|
||||||
microseconds:
|
maxSpeed: (json['maxSpeed'] as num?)?.toDouble() ?? 4,
|
||||||
(json['minimumPositionForReporting'] as num).toInt()),
|
minimumPositionForReporting: json['minimumPositionForReporting'] == null
|
||||||
playbackReportInterval: json['playbackReportInterval'] == null
|
? const Duration(seconds: 10)
|
||||||
? const Duration(seconds: 10)
|
: Duration(
|
||||||
: Duration(
|
microseconds: (json['minimumPositionForReporting'] as num).toInt(),
|
||||||
microseconds: (json['playbackReportInterval'] as num).toInt()),
|
),
|
||||||
markCompleteWhenTimeLeft: json['markCompleteWhenTimeLeft'] == null
|
playbackReportInterval: json['playbackReportInterval'] == null
|
||||||
? const Duration(seconds: 15)
|
? const Duration(seconds: 10)
|
||||||
: Duration(
|
: Duration(microseconds: (json['playbackReportInterval'] as num).toInt()),
|
||||||
microseconds: (json['markCompleteWhenTimeLeft'] as num).toInt()),
|
markCompleteWhenTimeLeft: json['markCompleteWhenTimeLeft'] == null
|
||||||
configurePlayerForEveryBook:
|
? const Duration(seconds: 15)
|
||||||
json['configurePlayerForEveryBook'] as bool? ?? true,
|
: Duration(
|
||||||
);
|
microseconds: (json['markCompleteWhenTimeLeft'] as num).toInt(),
|
||||||
|
),
|
||||||
|
configurePlayerForEveryBook:
|
||||||
|
json['configurePlayerForEveryBook'] as bool? ?? true,
|
||||||
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$PlayerSettingsImplToJson(
|
Map<String, dynamic> _$PlayerSettingsToJson(
|
||||||
_$PlayerSettingsImpl instance) =>
|
_PlayerSettings instance,
|
||||||
<String, dynamic>{
|
) => <String, dynamic>{
|
||||||
'miniPlayerSettings': instance.miniPlayerSettings,
|
'miniPlayerSettings': instance.miniPlayerSettings,
|
||||||
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
||||||
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
||||||
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
||||||
'speedOptions': instance.speedOptions,
|
'speedOptions': instance.speedOptions,
|
||||||
'speedIncrement': instance.speedIncrement,
|
'speedIncrement': instance.speedIncrement,
|
||||||
'minSpeed': instance.minSpeed,
|
'minSpeed': instance.minSpeed,
|
||||||
'maxSpeed': instance.maxSpeed,
|
'maxSpeed': instance.maxSpeed,
|
||||||
'minimumPositionForReporting':
|
'minimumPositionForReporting':
|
||||||
instance.minimumPositionForReporting.inMicroseconds,
|
instance.minimumPositionForReporting.inMicroseconds,
|
||||||
'playbackReportInterval': instance.playbackReportInterval.inMicroseconds,
|
'playbackReportInterval': instance.playbackReportInterval.inMicroseconds,
|
||||||
'markCompleteWhenTimeLeft':
|
'markCompleteWhenTimeLeft': instance.markCompleteWhenTimeLeft.inMicroseconds,
|
||||||
instance.markCompleteWhenTimeLeft.inMicroseconds,
|
'configurePlayerForEveryBook': instance.configurePlayerForEveryBook,
|
||||||
'configurePlayerForEveryBook': instance.configurePlayerForEveryBook,
|
};
|
||||||
};
|
|
||||||
|
|
||||||
_$ExpandedPlayerSettingsImpl _$$ExpandedPlayerSettingsImplFromJson(
|
_ExpandedPlayerSettings _$ExpandedPlayerSettingsFromJson(
|
||||||
Map<String, dynamic> json) =>
|
Map<String, dynamic> json,
|
||||||
_$ExpandedPlayerSettingsImpl(
|
) => _ExpandedPlayerSettings(
|
||||||
showTotalProgress: json['showTotalProgress'] as bool? ?? false,
|
showTotalProgress: json['showTotalProgress'] as bool? ?? false,
|
||||||
showChapterProgress: json['showChapterProgress'] as bool? ?? true,
|
showChapterProgress: json['showChapterProgress'] as bool? ?? true,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$ExpandedPlayerSettingsImplToJson(
|
Map<String, dynamic> _$ExpandedPlayerSettingsToJson(
|
||||||
_$ExpandedPlayerSettingsImpl instance) =>
|
_ExpandedPlayerSettings instance,
|
||||||
<String, dynamic>{
|
) => <String, dynamic>{
|
||||||
'showTotalProgress': instance.showTotalProgress,
|
'showTotalProgress': instance.showTotalProgress,
|
||||||
'showChapterProgress': instance.showChapterProgress,
|
'showChapterProgress': instance.showChapterProgress,
|
||||||
};
|
};
|
||||||
|
|
||||||
_$MinimizedPlayerSettingsImpl _$$MinimizedPlayerSettingsImplFromJson(
|
_MinimizedPlayerSettings _$MinimizedPlayerSettingsFromJson(
|
||||||
Map<String, dynamic> json) =>
|
Map<String, dynamic> json,
|
||||||
_$MinimizedPlayerSettingsImpl(
|
) => _MinimizedPlayerSettings(
|
||||||
useChapterInfo: json['useChapterInfo'] as bool? ?? false,
|
useChapterInfo: json['useChapterInfo'] as bool? ?? false,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$MinimizedPlayerSettingsImplToJson(
|
Map<String, dynamic> _$MinimizedPlayerSettingsToJson(
|
||||||
_$MinimizedPlayerSettingsImpl instance) =>
|
_MinimizedPlayerSettings instance,
|
||||||
<String, dynamic>{
|
) => <String, dynamic>{'useChapterInfo': instance.useChapterInfo};
|
||||||
'useChapterInfo': instance.useChapterInfo,
|
|
||||||
};
|
|
||||||
|
|
||||||
_$SleepTimerSettingsImpl _$$SleepTimerSettingsImplFromJson(
|
_SleepTimerSettings _$SleepTimerSettingsFromJson(Map<String, dynamic> json) =>
|
||||||
Map<String, dynamic> json) =>
|
_SleepTimerSettings(
|
||||||
_$SleepTimerSettingsImpl(
|
|
||||||
defaultDuration: json['defaultDuration'] == null
|
defaultDuration: json['defaultDuration'] == null
|
||||||
? const Duration(minutes: 15)
|
? const Duration(minutes: 15)
|
||||||
: Duration(microseconds: (json['defaultDuration'] as num).toInt()),
|
: Duration(microseconds: (json['defaultDuration'] as num).toInt()),
|
||||||
presetDurations: (json['presetDurations'] as List<dynamic>?)
|
presetDurations:
|
||||||
|
(json['presetDurations'] as List<dynamic>?)
|
||||||
?.map((e) => Duration(microseconds: (e as num).toInt()))
|
?.map((e) => Duration(microseconds: (e as num).toInt()))
|
||||||
.toList() ??
|
.toList() ??
|
||||||
const [
|
const [
|
||||||
|
|
@ -177,7 +181,7 @@ _$SleepTimerSettingsImpl _$$SleepTimerSettingsImplFromJson(
|
||||||
Duration(minutes: 10),
|
Duration(minutes: 10),
|
||||||
Duration(minutes: 15),
|
Duration(minutes: 15),
|
||||||
Duration(minutes: 20),
|
Duration(minutes: 20),
|
||||||
Duration(minutes: 30)
|
Duration(minutes: 30),
|
||||||
],
|
],
|
||||||
maxDuration: json['maxDuration'] == null
|
maxDuration: json['maxDuration'] == null
|
||||||
? const Duration(minutes: 100)
|
? const Duration(minutes: 100)
|
||||||
|
|
@ -189,16 +193,18 @@ _$SleepTimerSettingsImpl _$$SleepTimerSettingsImplFromJson(
|
||||||
autoRewindWhenStopped: json['autoRewindWhenStopped'] as bool? ?? false,
|
autoRewindWhenStopped: json['autoRewindWhenStopped'] as bool? ?? false,
|
||||||
autoRewindDurations:
|
autoRewindDurations:
|
||||||
(json['autoRewindDurations'] as Map<String, dynamic>?)?.map(
|
(json['autoRewindDurations'] as Map<String, dynamic>?)?.map(
|
||||||
(k, e) => MapEntry(
|
(k, e) => MapEntry(
|
||||||
int.parse(k), Duration(microseconds: (e as num).toInt())),
|
int.parse(k),
|
||||||
) ??
|
Duration(microseconds: (e as num).toInt()),
|
||||||
const {
|
),
|
||||||
5: Duration(seconds: 10),
|
) ??
|
||||||
15: Duration(seconds: 30),
|
const {
|
||||||
45: Duration(seconds: 45),
|
5: Duration(seconds: 10),
|
||||||
60: Duration(minutes: 1),
|
15: Duration(seconds: 30),
|
||||||
120: Duration(minutes: 2)
|
45: Duration(seconds: 45),
|
||||||
},
|
60: Duration(minutes: 1),
|
||||||
|
120: Duration(minutes: 2),
|
||||||
|
},
|
||||||
autoTurnOnTimer: json['autoTurnOnTimer'] as bool? ?? false,
|
autoTurnOnTimer: json['autoTurnOnTimer'] as bool? ?? false,
|
||||||
alwaysAutoTurnOnTimer: json['alwaysAutoTurnOnTimer'] as bool? ?? false,
|
alwaysAutoTurnOnTimer: json['alwaysAutoTurnOnTimer'] as bool? ?? false,
|
||||||
autoTurnOnTime: json['autoTurnOnTime'] == null
|
autoTurnOnTime: json['autoTurnOnTime'] == null
|
||||||
|
|
@ -209,27 +215,27 @@ _$SleepTimerSettingsImpl _$$SleepTimerSettingsImplFromJson(
|
||||||
: Duration(microseconds: (json['autoTurnOffTime'] as num).toInt()),
|
: Duration(microseconds: (json['autoTurnOffTime'] as num).toInt()),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$SleepTimerSettingsImplToJson(
|
Map<String, dynamic> _$SleepTimerSettingsToJson(_SleepTimerSettings instance) =>
|
||||||
_$SleepTimerSettingsImpl instance) =>
|
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'defaultDuration': instance.defaultDuration.inMicroseconds,
|
'defaultDuration': instance.defaultDuration.inMicroseconds,
|
||||||
'presetDurations':
|
'presetDurations': instance.presetDurations
|
||||||
instance.presetDurations.map((e) => e.inMicroseconds).toList(),
|
.map((e) => e.inMicroseconds)
|
||||||
|
.toList(),
|
||||||
'maxDuration': instance.maxDuration.inMicroseconds,
|
'maxDuration': instance.maxDuration.inMicroseconds,
|
||||||
'fadeOutAudio': instance.fadeOutAudio,
|
'fadeOutAudio': instance.fadeOutAudio,
|
||||||
'fadeOutDuration': instance.fadeOutDuration.inMicroseconds,
|
'fadeOutDuration': instance.fadeOutDuration.inMicroseconds,
|
||||||
'autoRewindWhenStopped': instance.autoRewindWhenStopped,
|
'autoRewindWhenStopped': instance.autoRewindWhenStopped,
|
||||||
'autoRewindDurations': instance.autoRewindDurations
|
'autoRewindDurations': instance.autoRewindDurations.map(
|
||||||
.map((k, e) => MapEntry(k.toString(), e.inMicroseconds)),
|
(k, e) => MapEntry(k.toString(), e.inMicroseconds),
|
||||||
|
),
|
||||||
'autoTurnOnTimer': instance.autoTurnOnTimer,
|
'autoTurnOnTimer': instance.autoTurnOnTimer,
|
||||||
'alwaysAutoTurnOnTimer': instance.alwaysAutoTurnOnTimer,
|
'alwaysAutoTurnOnTimer': instance.alwaysAutoTurnOnTimer,
|
||||||
'autoTurnOnTime': instance.autoTurnOnTime.inMicroseconds,
|
'autoTurnOnTime': instance.autoTurnOnTime.inMicroseconds,
|
||||||
'autoTurnOffTime': instance.autoTurnOffTime.inMicroseconds,
|
'autoTurnOffTime': instance.autoTurnOffTime.inMicroseconds,
|
||||||
};
|
};
|
||||||
|
|
||||||
_$DownloadSettingsImpl _$$DownloadSettingsImplFromJson(
|
_DownloadSettings _$DownloadSettingsFromJson(Map<String, dynamic> json) =>
|
||||||
Map<String, dynamic> json) =>
|
_DownloadSettings(
|
||||||
_$DownloadSettingsImpl(
|
|
||||||
requiresWiFi: json['requiresWiFi'] as bool? ?? true,
|
requiresWiFi: json['requiresWiFi'] as bool? ?? true,
|
||||||
retries: (json['retries'] as num?)?.toInt() ?? 3,
|
retries: (json['retries'] as num?)?.toInt() ?? 3,
|
||||||
allowPause: json['allowPause'] as bool? ?? true,
|
allowPause: json['allowPause'] as bool? ?? true,
|
||||||
|
|
@ -239,8 +245,7 @@ _$DownloadSettingsImpl _$$DownloadSettingsImplFromJson(
|
||||||
(json['maxConcurrentByGroup'] as num?)?.toInt() ?? 3,
|
(json['maxConcurrentByGroup'] as num?)?.toInt() ?? 3,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$DownloadSettingsImplToJson(
|
Map<String, dynamic> _$DownloadSettingsToJson(_DownloadSettings instance) =>
|
||||||
_$DownloadSettingsImpl instance) =>
|
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'requiresWiFi': instance.requiresWiFi,
|
'requiresWiFi': instance.requiresWiFi,
|
||||||
'retries': instance.retries,
|
'retries': instance.retries,
|
||||||
|
|
@ -250,43 +255,43 @@ Map<String, dynamic> _$$DownloadSettingsImplToJson(
|
||||||
'maxConcurrentByGroup': instance.maxConcurrentByGroup,
|
'maxConcurrentByGroup': instance.maxConcurrentByGroup,
|
||||||
};
|
};
|
||||||
|
|
||||||
_$NotificationSettingsImpl _$$NotificationSettingsImplFromJson(
|
_NotificationSettings _$NotificationSettingsFromJson(
|
||||||
Map<String, dynamic> json) =>
|
Map<String, dynamic> json,
|
||||||
_$NotificationSettingsImpl(
|
) => _NotificationSettings(
|
||||||
fastForwardInterval: json['fastForwardInterval'] == null
|
fastForwardInterval: json['fastForwardInterval'] == null
|
||||||
? const Duration(seconds: 30)
|
? const Duration(seconds: 30)
|
||||||
: Duration(
|
: Duration(microseconds: (json['fastForwardInterval'] as num).toInt()),
|
||||||
microseconds: (json['fastForwardInterval'] as num).toInt()),
|
rewindInterval: json['rewindInterval'] == null
|
||||||
rewindInterval: json['rewindInterval'] == null
|
? const Duration(seconds: 10)
|
||||||
? const Duration(seconds: 10)
|
: Duration(microseconds: (json['rewindInterval'] as num).toInt()),
|
||||||
: Duration(microseconds: (json['rewindInterval'] as num).toInt()),
|
progressBarIsChapterProgress:
|
||||||
progressBarIsChapterProgress:
|
json['progressBarIsChapterProgress'] as bool? ?? true,
|
||||||
json['progressBarIsChapterProgress'] as bool? ?? true,
|
primaryTitle: json['primaryTitle'] as String? ?? '\$bookTitle',
|
||||||
primaryTitle: json['primaryTitle'] as String? ?? '\$bookTitle',
|
secondaryTitle: json['secondaryTitle'] as String? ?? '\$author',
|
||||||
secondaryTitle: json['secondaryTitle'] as String? ?? '\$author',
|
mediaControls:
|
||||||
mediaControls: (json['mediaControls'] as List<dynamic>?)
|
(json['mediaControls'] as List<dynamic>?)
|
||||||
?.map((e) => $enumDecode(_$NotificationMediaControlEnumMap, e))
|
?.map((e) => $enumDecode(_$NotificationMediaControlEnumMap, e))
|
||||||
.toList() ??
|
.toList() ??
|
||||||
const [
|
const [
|
||||||
NotificationMediaControl.rewind,
|
NotificationMediaControl.rewind,
|
||||||
NotificationMediaControl.fastForward,
|
NotificationMediaControl.fastForward,
|
||||||
NotificationMediaControl.skipToPreviousChapter,
|
NotificationMediaControl.skipToPreviousChapter,
|
||||||
NotificationMediaControl.skipToNextChapter
|
NotificationMediaControl.skipToNextChapter,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$NotificationSettingsImplToJson(
|
Map<String, dynamic> _$NotificationSettingsToJson(
|
||||||
_$NotificationSettingsImpl instance) =>
|
_NotificationSettings instance,
|
||||||
<String, dynamic>{
|
) => <String, dynamic>{
|
||||||
'fastForwardInterval': instance.fastForwardInterval.inMicroseconds,
|
'fastForwardInterval': instance.fastForwardInterval.inMicroseconds,
|
||||||
'rewindInterval': instance.rewindInterval.inMicroseconds,
|
'rewindInterval': instance.rewindInterval.inMicroseconds,
|
||||||
'progressBarIsChapterProgress': instance.progressBarIsChapterProgress,
|
'progressBarIsChapterProgress': instance.progressBarIsChapterProgress,
|
||||||
'primaryTitle': instance.primaryTitle,
|
'primaryTitle': instance.primaryTitle,
|
||||||
'secondaryTitle': instance.secondaryTitle,
|
'secondaryTitle': instance.secondaryTitle,
|
||||||
'mediaControls': instance.mediaControls
|
'mediaControls': instance.mediaControls
|
||||||
.map((e) => _$NotificationMediaControlEnumMap[e]!)
|
.map((e) => _$NotificationMediaControlEnumMap[e]!)
|
||||||
.toList(),
|
.toList(),
|
||||||
};
|
};
|
||||||
|
|
||||||
const _$NotificationMediaControlEnumMap = {
|
const _$NotificationMediaControlEnumMap = {
|
||||||
NotificationMediaControl.fastForward: 'fastForward',
|
NotificationMediaControl.fastForward: 'fastForward',
|
||||||
|
|
@ -297,47 +302,47 @@ const _$NotificationMediaControlEnumMap = {
|
||||||
NotificationMediaControl.skipToPreviousChapter: 'skipToPreviousChapter',
|
NotificationMediaControl.skipToPreviousChapter: 'skipToPreviousChapter',
|
||||||
};
|
};
|
||||||
|
|
||||||
_$ShakeDetectionSettingsImpl _$$ShakeDetectionSettingsImplFromJson(
|
_ShakeDetectionSettings _$ShakeDetectionSettingsFromJson(
|
||||||
Map<String, dynamic> json) =>
|
Map<String, dynamic> json,
|
||||||
_$ShakeDetectionSettingsImpl(
|
) => _ShakeDetectionSettings(
|
||||||
isEnabled: json['isEnabled'] as bool? ?? true,
|
isEnabled: json['isEnabled'] as bool? ?? true,
|
||||||
direction:
|
direction:
|
||||||
$enumDecodeNullable(_$ShakeDirectionEnumMap, json['direction']) ??
|
$enumDecodeNullable(_$ShakeDirectionEnumMap, json['direction']) ??
|
||||||
ShakeDirection.horizontal,
|
ShakeDirection.horizontal,
|
||||||
threshold: (json['threshold'] as num?)?.toDouble() ?? 5,
|
threshold: (json['threshold'] as num?)?.toDouble() ?? 5,
|
||||||
shakeAction:
|
shakeAction:
|
||||||
$enumDecodeNullable(_$ShakeActionEnumMap, json['shakeAction']) ??
|
$enumDecodeNullable(_$ShakeActionEnumMap, json['shakeAction']) ??
|
||||||
ShakeAction.resetSleepTimer,
|
ShakeAction.resetSleepTimer,
|
||||||
feedback: (json['feedback'] as List<dynamic>?)
|
feedback:
|
||||||
?.map((e) => $enumDecode(_$ShakeDetectedFeedbackEnumMap, e))
|
(json['feedback'] as List<dynamic>?)
|
||||||
.toSet() ??
|
?.map((e) => $enumDecode(_$ShakeDetectedFeedbackEnumMap, e))
|
||||||
const {ShakeDetectedFeedback.vibrate},
|
.toSet() ??
|
||||||
beepVolume: (json['beepVolume'] as num?)?.toDouble() ?? 0.5,
|
const {ShakeDetectedFeedback.vibrate},
|
||||||
shakeTriggerCoolDown: json['shakeTriggerCoolDown'] == null
|
beepVolume: (json['beepVolume'] as num?)?.toDouble() ?? 0.5,
|
||||||
? const Duration(seconds: 2)
|
shakeTriggerCoolDown: json['shakeTriggerCoolDown'] == null
|
||||||
: Duration(
|
? const Duration(seconds: 2)
|
||||||
microseconds: (json['shakeTriggerCoolDown'] as num).toInt()),
|
: Duration(microseconds: (json['shakeTriggerCoolDown'] as num).toInt()),
|
||||||
shakeTriggerCount: (json['shakeTriggerCount'] as num?)?.toInt() ?? 2,
|
shakeTriggerCount: (json['shakeTriggerCount'] as num?)?.toInt() ?? 2,
|
||||||
samplingPeriod: json['samplingPeriod'] == null
|
samplingPeriod: json['samplingPeriod'] == null
|
||||||
? const Duration(milliseconds: 100)
|
? const Duration(milliseconds: 100)
|
||||||
: Duration(microseconds: (json['samplingPeriod'] as num).toInt()),
|
: Duration(microseconds: (json['samplingPeriod'] as num).toInt()),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$ShakeDetectionSettingsImplToJson(
|
Map<String, dynamic> _$ShakeDetectionSettingsToJson(
|
||||||
_$ShakeDetectionSettingsImpl instance) =>
|
_ShakeDetectionSettings instance,
|
||||||
<String, dynamic>{
|
) => <String, dynamic>{
|
||||||
'isEnabled': instance.isEnabled,
|
'isEnabled': instance.isEnabled,
|
||||||
'direction': _$ShakeDirectionEnumMap[instance.direction]!,
|
'direction': _$ShakeDirectionEnumMap[instance.direction]!,
|
||||||
'threshold': instance.threshold,
|
'threshold': instance.threshold,
|
||||||
'shakeAction': _$ShakeActionEnumMap[instance.shakeAction]!,
|
'shakeAction': _$ShakeActionEnumMap[instance.shakeAction]!,
|
||||||
'feedback': instance.feedback
|
'feedback': instance.feedback
|
||||||
.map((e) => _$ShakeDetectedFeedbackEnumMap[e]!)
|
.map((e) => _$ShakeDetectedFeedbackEnumMap[e]!)
|
||||||
.toList(),
|
.toList(),
|
||||||
'beepVolume': instance.beepVolume,
|
'beepVolume': instance.beepVolume,
|
||||||
'shakeTriggerCoolDown': instance.shakeTriggerCoolDown.inMicroseconds,
|
'shakeTriggerCoolDown': instance.shakeTriggerCoolDown.inMicroseconds,
|
||||||
'shakeTriggerCount': instance.shakeTriggerCount,
|
'shakeTriggerCount': instance.shakeTriggerCount,
|
||||||
'samplingPeriod': instance.samplingPeriod.inMicroseconds,
|
'samplingPeriod': instance.samplingPeriod.inMicroseconds,
|
||||||
};
|
};
|
||||||
|
|
||||||
const _$ShakeDirectionEnumMap = {
|
const _$ShakeDirectionEnumMap = {
|
||||||
ShakeDirection.horizontal: 'horizontal',
|
ShakeDirection.horizontal: 'horizontal',
|
||||||
|
|
@ -357,9 +362,8 @@ const _$ShakeDetectedFeedbackEnumMap = {
|
||||||
ShakeDetectedFeedback.beep: 'beep',
|
ShakeDetectedFeedback.beep: 'beep',
|
||||||
};
|
};
|
||||||
|
|
||||||
_$HomePageSettingsImpl _$$HomePageSettingsImplFromJson(
|
_HomePageSettings _$HomePageSettingsFromJson(Map<String, dynamic> json) =>
|
||||||
Map<String, dynamic> json) =>
|
_HomePageSettings(
|
||||||
_$HomePageSettingsImpl(
|
|
||||||
showPlayButtonOnContinueListeningShelf:
|
showPlayButtonOnContinueListeningShelf:
|
||||||
json['showPlayButtonOnContinueListeningShelf'] as bool? ?? true,
|
json['showPlayButtonOnContinueListeningShelf'] as bool? ?? true,
|
||||||
showPlayButtonOnContinueSeriesShelf:
|
showPlayButtonOnContinueSeriesShelf:
|
||||||
|
|
@ -370,15 +374,14 @@ _$HomePageSettingsImpl _$$HomePageSettingsImplFromJson(
|
||||||
json['showPlayButtonOnListenAgainShelf'] as bool? ?? false,
|
json['showPlayButtonOnListenAgainShelf'] as bool? ?? false,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$HomePageSettingsImplToJson(
|
Map<String, dynamic> _$HomePageSettingsToJson(
|
||||||
_$HomePageSettingsImpl instance) =>
|
_HomePageSettings instance,
|
||||||
<String, dynamic>{
|
) => <String, dynamic>{
|
||||||
'showPlayButtonOnContinueListeningShelf':
|
'showPlayButtonOnContinueListeningShelf':
|
||||||
instance.showPlayButtonOnContinueListeningShelf,
|
instance.showPlayButtonOnContinueListeningShelf,
|
||||||
'showPlayButtonOnContinueSeriesShelf':
|
'showPlayButtonOnContinueSeriesShelf':
|
||||||
instance.showPlayButtonOnContinueSeriesShelf,
|
instance.showPlayButtonOnContinueSeriesShelf,
|
||||||
'showPlayButtonOnAllRemainingShelves':
|
'showPlayButtonOnAllRemainingShelves':
|
||||||
instance.showPlayButtonOnAllRemainingShelves,
|
instance.showPlayButtonOnAllRemainingShelves,
|
||||||
'showPlayButtonOnListenAgainShelf':
|
'showPlayButtonOnListenAgainShelf': instance.showPlayButtonOnListenAgainShelf,
|
||||||
instance.showPlayButtonOnListenAgainShelf,
|
};
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ typedef AudiobookShelfUri = Uri;
|
||||||
|
|
||||||
/// Represents a audiobookshelf server
|
/// Represents a audiobookshelf server
|
||||||
@freezed
|
@freezed
|
||||||
class AudiobookShelfServer with _$AudiobookShelfServer {
|
sealed class AudiobookShelfServer with _$AudiobookShelfServer {
|
||||||
const factory AudiobookShelfServer({
|
const factory AudiobookShelfServer({
|
||||||
required AudiobookShelfUri serverUrl,
|
required AudiobookShelfUri serverUrl,
|
||||||
// String? serverName,
|
// String? serverName,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// coverage:ignore-file
|
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
// ignore_for_file: type=lint
|
// 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
|
// 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,161 +9,263 @@ part of 'audiobookshelf_server.dart';
|
||||||
// FreezedGenerator
|
// FreezedGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
T _$identity<T>(T value) => value;
|
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');
|
|
||||||
|
|
||||||
AudiobookShelfServer _$AudiobookShelfServerFromJson(Map<String, dynamic> json) {
|
|
||||||
return _AudiobookShelfServer.fromJson(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$AudiobookShelfServer {
|
mixin _$AudiobookShelfServer {
|
||||||
Uri get serverUrl => throw _privateConstructorUsedError;
|
|
||||||
|
AudiobookShelfUri get serverUrl;
|
||||||
|
/// Create a copy of AudiobookShelfServer
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$AudiobookShelfServerCopyWith<AudiobookShelfServer> get copyWith => _$AudiobookShelfServerCopyWithImpl<AudiobookShelfServer>(this as AudiobookShelfServer, _$identity);
|
||||||
|
|
||||||
/// Serializes this AudiobookShelfServer to a JSON map.
|
/// Serializes this AudiobookShelfServer 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 AudiobookShelfServer&&(identical(other.serverUrl, serverUrl) || other.serverUrl == serverUrl));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,serverUrl);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'AudiobookShelfServer(serverUrl: $serverUrl)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a copy of AudiobookShelfServer
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
$AudiobookShelfServerCopyWith<AudiobookShelfServer> get copyWith =>
|
|
||||||
throw _privateConstructorUsedError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract class $AudiobookShelfServerCopyWith<$Res> {
|
abstract mixin class $AudiobookShelfServerCopyWith<$Res> {
|
||||||
factory $AudiobookShelfServerCopyWith(AudiobookShelfServer value,
|
factory $AudiobookShelfServerCopyWith(AudiobookShelfServer value, $Res Function(AudiobookShelfServer) _then) = _$AudiobookShelfServerCopyWithImpl;
|
||||||
$Res Function(AudiobookShelfServer) then) =
|
@useResult
|
||||||
_$AudiobookShelfServerCopyWithImpl<$Res, AudiobookShelfServer>;
|
$Res call({
|
||||||
@useResult
|
AudiobookShelfUri serverUrl
|
||||||
$Res call({Uri serverUrl});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$AudiobookShelfServerCopyWithImpl<$Res,
|
class _$AudiobookShelfServerCopyWithImpl<$Res>
|
||||||
$Val extends AudiobookShelfServer>
|
|
||||||
implements $AudiobookShelfServerCopyWith<$Res> {
|
implements $AudiobookShelfServerCopyWith<$Res> {
|
||||||
_$AudiobookShelfServerCopyWithImpl(this._value, this._then);
|
_$AudiobookShelfServerCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
// ignore: unused_field
|
final AudiobookShelfServer _self;
|
||||||
final $Val _value;
|
final $Res Function(AudiobookShelfServer) _then;
|
||||||
// ignore: unused_field
|
|
||||||
final $Res Function($Val) _then;
|
|
||||||
|
|
||||||
/// Create a copy of AudiobookShelfServer
|
/// Create a copy of AudiobookShelfServer
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline') @override $Res call({Object? serverUrl = null,}) {
|
||||||
@override
|
return _then(_self.copyWith(
|
||||||
$Res call({
|
serverUrl: null == serverUrl ? _self.serverUrl : serverUrl // ignore: cast_nullable_to_non_nullable
|
||||||
Object? serverUrl = null,
|
as AudiobookShelfUri,
|
||||||
}) {
|
));
|
||||||
return _then(_value.copyWith(
|
|
||||||
serverUrl: null == serverUrl
|
|
||||||
? _value.serverUrl
|
|
||||||
: serverUrl // ignore: cast_nullable_to_non_nullable
|
|
||||||
as Uri,
|
|
||||||
) as $Val);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
abstract class _$$AudiobookShelfServerImplCopyWith<$Res>
|
|
||||||
implements $AudiobookShelfServerCopyWith<$Res> {
|
|
||||||
factory _$$AudiobookShelfServerImplCopyWith(_$AudiobookShelfServerImpl value,
|
|
||||||
$Res Function(_$AudiobookShelfServerImpl) then) =
|
|
||||||
__$$AudiobookShelfServerImplCopyWithImpl<$Res>;
|
|
||||||
@override
|
|
||||||
@useResult
|
|
||||||
$Res call({Uri serverUrl});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
class __$$AudiobookShelfServerImplCopyWithImpl<$Res>
|
|
||||||
extends _$AudiobookShelfServerCopyWithImpl<$Res, _$AudiobookShelfServerImpl>
|
|
||||||
implements _$$AudiobookShelfServerImplCopyWith<$Res> {
|
|
||||||
__$$AudiobookShelfServerImplCopyWithImpl(_$AudiobookShelfServerImpl _value,
|
|
||||||
$Res Function(_$AudiobookShelfServerImpl) _then)
|
|
||||||
: super(_value, _then);
|
|
||||||
|
|
||||||
/// Create a copy of AudiobookShelfServer
|
/// Adds pattern-matching-related methods to [AudiobookShelfServer].
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
extension AudiobookShelfServerPatterns on AudiobookShelfServer {
|
||||||
@pragma('vm:prefer-inline')
|
/// A variant of `map` that fallback to returning `orElse`.
|
||||||
@override
|
///
|
||||||
$Res call({
|
/// It is equivalent to doing:
|
||||||
Object? serverUrl = null,
|
/// ```dart
|
||||||
}) {
|
/// switch (sealedClass) {
|
||||||
return _then(_$AudiobookShelfServerImpl(
|
/// case final Subclass value:
|
||||||
serverUrl: null == serverUrl
|
/// return ...;
|
||||||
? _value.serverUrl
|
/// case _:
|
||||||
: serverUrl // ignore: cast_nullable_to_non_nullable
|
/// return orElse();
|
||||||
as Uri,
|
/// }
|
||||||
));
|
/// ```
|
||||||
}
|
|
||||||
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AudiobookShelfServer value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AudiobookShelfServer() 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( _AudiobookShelfServer value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AudiobookShelfServer():
|
||||||
|
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( _AudiobookShelfServer value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AudiobookShelfServer() 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( AudiobookShelfUri serverUrl)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AudiobookShelfServer() when $default != null:
|
||||||
|
return $default(_that.serverUrl);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( AudiobookShelfUri serverUrl) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AudiobookShelfServer():
|
||||||
|
return $default(_that.serverUrl);}
|
||||||
|
}
|
||||||
|
/// 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( AudiobookShelfUri serverUrl)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AudiobookShelfServer() when $default != null:
|
||||||
|
return $default(_that.serverUrl);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class _$AudiobookShelfServerImpl implements _AudiobookShelfServer {
|
|
||||||
const _$AudiobookShelfServerImpl({required this.serverUrl});
|
|
||||||
|
|
||||||
factory _$AudiobookShelfServerImpl.fromJson(Map<String, dynamic> json) =>
|
class _AudiobookShelfServer implements AudiobookShelfServer {
|
||||||
_$$AudiobookShelfServerImplFromJson(json);
|
const _AudiobookShelfServer({required this.serverUrl});
|
||||||
|
factory _AudiobookShelfServer.fromJson(Map<String, dynamic> json) => _$AudiobookShelfServerFromJson(json);
|
||||||
|
|
||||||
@override
|
@override final AudiobookShelfUri serverUrl;
|
||||||
final Uri serverUrl;
|
|
||||||
|
|
||||||
@override
|
/// Create a copy of AudiobookShelfServer
|
||||||
String toString() {
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
return 'AudiobookShelfServer(serverUrl: $serverUrl)';
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
}
|
@pragma('vm:prefer-inline')
|
||||||
|
_$AudiobookShelfServerCopyWith<_AudiobookShelfServer> get copyWith => __$AudiobookShelfServerCopyWithImpl<_AudiobookShelfServer>(this, _$identity);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
Map<String, dynamic> toJson() {
|
||||||
return identical(this, other) ||
|
return _$AudiobookShelfServerToJson(this, );
|
||||||
(other.runtimeType == runtimeType &&
|
|
||||||
other is _$AudiobookShelfServerImpl &&
|
|
||||||
(identical(other.serverUrl, serverUrl) ||
|
|
||||||
other.serverUrl == serverUrl));
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@override
|
|
||||||
int get hashCode => Object.hash(runtimeType, serverUrl);
|
|
||||||
|
|
||||||
/// Create a copy of AudiobookShelfServer
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@override
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
_$$AudiobookShelfServerImplCopyWith<_$AudiobookShelfServerImpl>
|
|
||||||
get copyWith =>
|
|
||||||
__$$AudiobookShelfServerImplCopyWithImpl<_$AudiobookShelfServerImpl>(
|
|
||||||
this, _$identity);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return _$$AudiobookShelfServerImplToJson(
|
|
||||||
this,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _AudiobookShelfServer implements AudiobookShelfServer {
|
@override
|
||||||
const factory _AudiobookShelfServer({required final Uri serverUrl}) =
|
bool operator ==(Object other) {
|
||||||
_$AudiobookShelfServerImpl;
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AudiobookShelfServer&&(identical(other.serverUrl, serverUrl) || other.serverUrl == serverUrl));
|
||||||
|
|
||||||
factory _AudiobookShelfServer.fromJson(Map<String, dynamic> json) =
|
|
||||||
_$AudiobookShelfServerImpl.fromJson;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Uri get serverUrl;
|
|
||||||
|
|
||||||
/// Create a copy of AudiobookShelfServer
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@override
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
_$$AudiobookShelfServerImplCopyWith<_$AudiobookShelfServerImpl>
|
|
||||||
get copyWith => throw _privateConstructorUsedError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,serverUrl);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'AudiobookShelfServer(serverUrl: $serverUrl)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$AudiobookShelfServerCopyWith<$Res> implements $AudiobookShelfServerCopyWith<$Res> {
|
||||||
|
factory _$AudiobookShelfServerCopyWith(_AudiobookShelfServer value, $Res Function(_AudiobookShelfServer) _then) = __$AudiobookShelfServerCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
AudiobookShelfUri serverUrl
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$AudiobookShelfServerCopyWithImpl<$Res>
|
||||||
|
implements _$AudiobookShelfServerCopyWith<$Res> {
|
||||||
|
__$AudiobookShelfServerCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _AudiobookShelfServer _self;
|
||||||
|
final $Res Function(_AudiobookShelfServer) _then;
|
||||||
|
|
||||||
|
/// Create a copy of AudiobookShelfServer
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? serverUrl = null,}) {
|
||||||
|
return _then(_AudiobookShelfServer(
|
||||||
|
serverUrl: null == serverUrl ? _self.serverUrl : serverUrl // ignore: cast_nullable_to_non_nullable
|
||||||
|
as AudiobookShelfUri,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,10 @@ part of 'audiobookshelf_server.dart';
|
||||||
// JsonSerializableGenerator
|
// JsonSerializableGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
_$AudiobookShelfServerImpl _$$AudiobookShelfServerImplFromJson(
|
_AudiobookShelfServer _$AudiobookShelfServerFromJson(
|
||||||
Map<String, dynamic> json) =>
|
Map<String, dynamic> json,
|
||||||
_$AudiobookShelfServerImpl(
|
) => _AudiobookShelfServer(serverUrl: Uri.parse(json['serverUrl'] as String));
|
||||||
serverUrl: Uri.parse(json['serverUrl'] as String),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$$AudiobookShelfServerImplToJson(
|
Map<String, dynamic> _$AudiobookShelfServerToJson(
|
||||||
_$AudiobookShelfServerImpl instance) =>
|
_AudiobookShelfServer instance,
|
||||||
<String, dynamic>{
|
) => <String, dynamic>{'serverUrl': instance.serverUrl.toString()};
|
||||||
'serverUrl': instance.serverUrl.toString(),
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ part 'authenticated_user.g.dart';
|
||||||
|
|
||||||
/// authenticated user with server and credentials
|
/// authenticated user with server and credentials
|
||||||
@freezed
|
@freezed
|
||||||
class AuthenticatedUser with _$AuthenticatedUser {
|
sealed class AuthenticatedUser with _$AuthenticatedUser {
|
||||||
const factory AuthenticatedUser({
|
const factory AuthenticatedUser({
|
||||||
required AudiobookShelfServer server,
|
required AudiobookShelfServer server,
|
||||||
required String authToken,
|
required String authToken,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// coverage:ignore-file
|
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
// coverage:ignore-file
|
||||||
// ignore_for_file: type=lint
|
// 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
|
// 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,238 +9,290 @@ part of 'authenticated_user.dart';
|
||||||
// FreezedGenerator
|
// FreezedGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
|
// dart format off
|
||||||
T _$identity<T>(T value) => value;
|
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');
|
|
||||||
|
|
||||||
AuthenticatedUser _$AuthenticatedUserFromJson(Map<String, dynamic> json) {
|
|
||||||
return _AuthenticatedUser.fromJson(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$AuthenticatedUser {
|
mixin _$AuthenticatedUser {
|
||||||
AudiobookShelfServer get server => throw _privateConstructorUsedError;
|
|
||||||
String get authToken => throw _privateConstructorUsedError;
|
AudiobookShelfServer get server; String get authToken; String get id; String? get username;
|
||||||
String get id => throw _privateConstructorUsedError;
|
/// Create a copy of AuthenticatedUser
|
||||||
String? get username => throw _privateConstructorUsedError;
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$AuthenticatedUserCopyWith<AuthenticatedUser> get copyWith => _$AuthenticatedUserCopyWithImpl<AuthenticatedUser>(this as AuthenticatedUser, _$identity);
|
||||||
|
|
||||||
/// Serializes this AuthenticatedUser to a JSON map.
|
/// Serializes this AuthenticatedUser 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 AuthenticatedUser&&(identical(other.server, server) || other.server == server)&&(identical(other.authToken, authToken) || other.authToken == authToken)&&(identical(other.id, id) || other.id == id)&&(identical(other.username, username) || other.username == username));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,server,authToken,id,username);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'AuthenticatedUser(server: $server, authToken: $authToken, id: $id, username: $username)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Create a copy of AuthenticatedUser
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
$AuthenticatedUserCopyWith<AuthenticatedUser> get copyWith =>
|
|
||||||
throw _privateConstructorUsedError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
abstract class $AuthenticatedUserCopyWith<$Res> {
|
abstract mixin class $AuthenticatedUserCopyWith<$Res> {
|
||||||
factory $AuthenticatedUserCopyWith(
|
factory $AuthenticatedUserCopyWith(AuthenticatedUser value, $Res Function(AuthenticatedUser) _then) = _$AuthenticatedUserCopyWithImpl;
|
||||||
AuthenticatedUser value, $Res Function(AuthenticatedUser) then) =
|
@useResult
|
||||||
_$AuthenticatedUserCopyWithImpl<$Res, AuthenticatedUser>;
|
$Res call({
|
||||||
@useResult
|
AudiobookShelfServer server, String authToken, String id, String? username
|
||||||
$Res call(
|
});
|
||||||
{AudiobookShelfServer server,
|
|
||||||
String authToken,
|
|
||||||
String id,
|
$AudiobookShelfServerCopyWith<$Res> get server;
|
||||||
String? username});
|
|
||||||
|
|
||||||
$AudiobookShelfServerCopyWith<$Res> get server;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
class _$AuthenticatedUserCopyWithImpl<$Res, $Val extends AuthenticatedUser>
|
class _$AuthenticatedUserCopyWithImpl<$Res>
|
||||||
implements $AuthenticatedUserCopyWith<$Res> {
|
implements $AuthenticatedUserCopyWith<$Res> {
|
||||||
_$AuthenticatedUserCopyWithImpl(this._value, this._then);
|
_$AuthenticatedUserCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
// ignore: unused_field
|
final AuthenticatedUser _self;
|
||||||
final $Val _value;
|
final $Res Function(AuthenticatedUser) _then;
|
||||||
// ignore: unused_field
|
|
||||||
final $Res Function($Val) _then;
|
|
||||||
|
|
||||||
/// Create a copy of AuthenticatedUser
|
/// Create a copy of AuthenticatedUser
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline') @override $Res call({Object? server = null,Object? authToken = null,Object? id = null,Object? username = freezed,}) {
|
||||||
@override
|
return _then(_self.copyWith(
|
||||||
$Res call({
|
server: null == server ? _self.server : server // ignore: cast_nullable_to_non_nullable
|
||||||
Object? server = null,
|
as AudiobookShelfServer,authToken: null == authToken ? _self.authToken : authToken // ignore: cast_nullable_to_non_nullable
|
||||||
Object? authToken = null,
|
as String,id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
Object? id = null,
|
as String,username: freezed == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
|
||||||
Object? username = freezed,
|
as String?,
|
||||||
}) {
|
));
|
||||||
return _then(_value.copyWith(
|
}
|
||||||
server: null == server
|
/// Create a copy of AuthenticatedUser
|
||||||
? _value.server
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
: server // ignore: cast_nullable_to_non_nullable
|
@override
|
||||||
as AudiobookShelfServer,
|
@pragma('vm:prefer-inline')
|
||||||
authToken: null == authToken
|
$AudiobookShelfServerCopyWith<$Res> get server {
|
||||||
? _value.authToken
|
|
||||||
: authToken // ignore: cast_nullable_to_non_nullable
|
return $AudiobookShelfServerCopyWith<$Res>(_self.server, (value) {
|
||||||
as String,
|
return _then(_self.copyWith(server: value));
|
||||||
id: null == id
|
});
|
||||||
? _value.id
|
}
|
||||||
: id // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String,
|
|
||||||
username: freezed == username
|
|
||||||
? _value.username
|
|
||||||
: username // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String?,
|
|
||||||
) as $Val);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Create a copy of AuthenticatedUser
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@override
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
$AudiobookShelfServerCopyWith<$Res> get server {
|
|
||||||
return $AudiobookShelfServerCopyWith<$Res>(_value.server, (value) {
|
|
||||||
return _then(_value.copyWith(server: value) as $Val);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
abstract class _$$AuthenticatedUserImplCopyWith<$Res>
|
|
||||||
implements $AuthenticatedUserCopyWith<$Res> {
|
|
||||||
factory _$$AuthenticatedUserImplCopyWith(_$AuthenticatedUserImpl value,
|
|
||||||
$Res Function(_$AuthenticatedUserImpl) then) =
|
|
||||||
__$$AuthenticatedUserImplCopyWithImpl<$Res>;
|
|
||||||
@override
|
|
||||||
@useResult
|
|
||||||
$Res call(
|
|
||||||
{AudiobookShelfServer server,
|
|
||||||
String authToken,
|
|
||||||
String id,
|
|
||||||
String? username});
|
|
||||||
|
|
||||||
@override
|
/// Adds pattern-matching-related methods to [AuthenticatedUser].
|
||||||
$AudiobookShelfServerCopyWith<$Res> get server;
|
extension AuthenticatedUserPatterns on AuthenticatedUser {
|
||||||
|
/// 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( _AuthenticatedUser value)? $default,{required TResult orElse(),}){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AuthenticatedUser() 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( _AuthenticatedUser value) $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AuthenticatedUser():
|
||||||
|
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( _AuthenticatedUser value)? $default,){
|
||||||
|
final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AuthenticatedUser() 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( AudiobookShelfServer server, String authToken, String id, String? username)? $default,{required TResult orElse(),}) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AuthenticatedUser() when $default != null:
|
||||||
|
return $default(_that.server,_that.authToken,_that.id,_that.username);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( AudiobookShelfServer server, String authToken, String id, String? username) $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AuthenticatedUser():
|
||||||
|
return $default(_that.server,_that.authToken,_that.id,_that.username);}
|
||||||
|
}
|
||||||
|
/// 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( AudiobookShelfServer server, String authToken, String id, String? username)? $default,) {final _that = this;
|
||||||
|
switch (_that) {
|
||||||
|
case _AuthenticatedUser() when $default != null:
|
||||||
|
return $default(_that.server,_that.authToken,_that.id,_that.username);case _:
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
class __$$AuthenticatedUserImplCopyWithImpl<$Res>
|
|
||||||
extends _$AuthenticatedUserCopyWithImpl<$Res, _$AuthenticatedUserImpl>
|
|
||||||
implements _$$AuthenticatedUserImplCopyWith<$Res> {
|
|
||||||
__$$AuthenticatedUserImplCopyWithImpl(_$AuthenticatedUserImpl _value,
|
|
||||||
$Res Function(_$AuthenticatedUserImpl) _then)
|
|
||||||
: super(_value, _then);
|
|
||||||
|
|
||||||
/// Create a copy of AuthenticatedUser
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
@override
|
|
||||||
$Res call({
|
|
||||||
Object? server = null,
|
|
||||||
Object? authToken = null,
|
|
||||||
Object? id = null,
|
|
||||||
Object? username = freezed,
|
|
||||||
}) {
|
|
||||||
return _then(_$AuthenticatedUserImpl(
|
|
||||||
server: null == server
|
|
||||||
? _value.server
|
|
||||||
: server // ignore: cast_nullable_to_non_nullable
|
|
||||||
as AudiobookShelfServer,
|
|
||||||
authToken: null == authToken
|
|
||||||
? _value.authToken
|
|
||||||
: authToken // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String,
|
|
||||||
id: null == id
|
|
||||||
? _value.id
|
|
||||||
: id // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String,
|
|
||||||
username: freezed == username
|
|
||||||
? _value.username
|
|
||||||
: username // ignore: cast_nullable_to_non_nullable
|
|
||||||
as String?,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class _$AuthenticatedUserImpl implements _AuthenticatedUser {
|
|
||||||
const _$AuthenticatedUserImpl(
|
|
||||||
{required this.server,
|
|
||||||
required this.authToken,
|
|
||||||
required this.id,
|
|
||||||
this.username});
|
|
||||||
|
|
||||||
factory _$AuthenticatedUserImpl.fromJson(Map<String, dynamic> json) =>
|
class _AuthenticatedUser implements AuthenticatedUser {
|
||||||
_$$AuthenticatedUserImplFromJson(json);
|
const _AuthenticatedUser({required this.server, required this.authToken, required this.id, this.username});
|
||||||
|
factory _AuthenticatedUser.fromJson(Map<String, dynamic> json) => _$AuthenticatedUserFromJson(json);
|
||||||
|
|
||||||
@override
|
@override final AudiobookShelfServer server;
|
||||||
final AudiobookShelfServer server;
|
@override final String authToken;
|
||||||
@override
|
@override final String id;
|
||||||
final String authToken;
|
@override final String? username;
|
||||||
@override
|
|
||||||
final String id;
|
|
||||||
@override
|
|
||||||
final String? username;
|
|
||||||
|
|
||||||
@override
|
/// Create a copy of AuthenticatedUser
|
||||||
String toString() {
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
return 'AuthenticatedUser(server: $server, authToken: $authToken, id: $id, username: $username)';
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
}
|
@pragma('vm:prefer-inline')
|
||||||
|
_$AuthenticatedUserCopyWith<_AuthenticatedUser> get copyWith => __$AuthenticatedUserCopyWithImpl<_AuthenticatedUser>(this, _$identity);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
Map<String, dynamic> toJson() {
|
||||||
return identical(this, other) ||
|
return _$AuthenticatedUserToJson(this, );
|
||||||
(other.runtimeType == runtimeType &&
|
|
||||||
other is _$AuthenticatedUserImpl &&
|
|
||||||
(identical(other.server, server) || other.server == server) &&
|
|
||||||
(identical(other.authToken, authToken) ||
|
|
||||||
other.authToken == authToken) &&
|
|
||||||
(identical(other.id, id) || other.id == id) &&
|
|
||||||
(identical(other.username, username) ||
|
|
||||||
other.username == username));
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@override
|
|
||||||
int get hashCode => Object.hash(runtimeType, server, authToken, id, username);
|
|
||||||
|
|
||||||
/// Create a copy of AuthenticatedUser
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@override
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
_$$AuthenticatedUserImplCopyWith<_$AuthenticatedUserImpl> get copyWith =>
|
|
||||||
__$$AuthenticatedUserImplCopyWithImpl<_$AuthenticatedUserImpl>(
|
|
||||||
this, _$identity);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return _$$AuthenticatedUserImplToJson(
|
|
||||||
this,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _AuthenticatedUser implements AuthenticatedUser {
|
@override
|
||||||
const factory _AuthenticatedUser(
|
bool operator ==(Object other) {
|
||||||
{required final AudiobookShelfServer server,
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AuthenticatedUser&&(identical(other.server, server) || other.server == server)&&(identical(other.authToken, authToken) || other.authToken == authToken)&&(identical(other.id, id) || other.id == id)&&(identical(other.username, username) || other.username == username));
|
||||||
required final String authToken,
|
|
||||||
required final String id,
|
|
||||||
final String? username}) = _$AuthenticatedUserImpl;
|
|
||||||
|
|
||||||
factory _AuthenticatedUser.fromJson(Map<String, dynamic> json) =
|
|
||||||
_$AuthenticatedUserImpl.fromJson;
|
|
||||||
|
|
||||||
@override
|
|
||||||
AudiobookShelfServer get server;
|
|
||||||
@override
|
|
||||||
String get authToken;
|
|
||||||
@override
|
|
||||||
String get id;
|
|
||||||
@override
|
|
||||||
String? get username;
|
|
||||||
|
|
||||||
/// Create a copy of AuthenticatedUser
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@override
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
_$$AuthenticatedUserImplCopyWith<_$AuthenticatedUserImpl> get copyWith =>
|
|
||||||
throw _privateConstructorUsedError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,server,authToken,id,username);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'AuthenticatedUser(server: $server, authToken: $authToken, id: $id, username: $username)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$AuthenticatedUserCopyWith<$Res> implements $AuthenticatedUserCopyWith<$Res> {
|
||||||
|
factory _$AuthenticatedUserCopyWith(_AuthenticatedUser value, $Res Function(_AuthenticatedUser) _then) = __$AuthenticatedUserCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
AudiobookShelfServer server, String authToken, String id, String? username
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@override $AudiobookShelfServerCopyWith<$Res> get server;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$AuthenticatedUserCopyWithImpl<$Res>
|
||||||
|
implements _$AuthenticatedUserCopyWith<$Res> {
|
||||||
|
__$AuthenticatedUserCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _AuthenticatedUser _self;
|
||||||
|
final $Res Function(_AuthenticatedUser) _then;
|
||||||
|
|
||||||
|
/// Create a copy of AuthenticatedUser
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? server = null,Object? authToken = null,Object? id = null,Object? username = freezed,}) {
|
||||||
|
return _then(_AuthenticatedUser(
|
||||||
|
server: null == server ? _self.server : server // ignore: cast_nullable_to_non_nullable
|
||||||
|
as AudiobookShelfServer,authToken: null == authToken ? _self.authToken : authToken // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,username: freezed == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a copy of AuthenticatedUser
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$AudiobookShelfServerCopyWith<$Res> get server {
|
||||||
|
|
||||||
|
return $AudiobookShelfServerCopyWith<$Res>(_self.server, (value) {
|
||||||
|
return _then(_self.copyWith(server: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// dart format on
|
||||||
|
|
|
||||||
|
|
@ -6,18 +6,17 @@ part of 'authenticated_user.dart';
|
||||||
// JsonSerializableGenerator
|
// JsonSerializableGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
_$AuthenticatedUserImpl _$$AuthenticatedUserImplFromJson(
|
_AuthenticatedUser _$AuthenticatedUserFromJson(Map<String, dynamic> json) =>
|
||||||
Map<String, dynamic> json) =>
|
_AuthenticatedUser(
|
||||||
_$AuthenticatedUserImpl(
|
server: AudiobookShelfServer.fromJson(
|
||||||
server:
|
json['server'] as Map<String, dynamic>,
|
||||||
AudiobookShelfServer.fromJson(json['server'] as Map<String, dynamic>),
|
),
|
||||||
authToken: json['authToken'] as String,
|
authToken: json['authToken'] as String,
|
||||||
id: json['id'] as String,
|
id: json['id'] as String,
|
||||||
username: json['username'] as String?,
|
username: json['username'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$AuthenticatedUserImplToJson(
|
Map<String, dynamic> _$AuthenticatedUserToJson(_AuthenticatedUser instance) =>
|
||||||
_$AuthenticatedUserImpl instance) =>
|
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'server': instance.server,
|
'server': instance.server,
|
||||||
'authToken': instance.authToken,
|
'authToken': instance.authToken,
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ class _BookOnShelfPlayButton extends HookConsumerWidget {
|
||||||
player.book?.libraryItemId == libraryItemId;
|
player.book?.libraryItemId == libraryItemId;
|
||||||
final isPlayingThisBook = player.playing && isCurrentBookSetInPlayer;
|
final isPlayingThisBook = player.playing && isCurrentBookSetInPlayer;
|
||||||
|
|
||||||
final userProgress = me.valueOrNull?.mediaProgress
|
final userProgress = me.value?.mediaProgress
|
||||||
?.firstWhereOrNull((element) => element.libraryItemId == libraryItemId);
|
?.firstWhereOrNull((element) => element.libraryItemId == libraryItemId);
|
||||||
final isBookCompleted = userProgress?.isFinished ?? false;
|
final isBookCompleted = userProgress?.isFinished ?? false;
|
||||||
|
|
||||||
|
|
@ -243,7 +243,7 @@ class _BookOnShelfPlayButton extends HookConsumerWidget {
|
||||||
// if current book is set in player, get theme from the cover image
|
// if current book is set in player, get theme from the cover image
|
||||||
data: ThemeData(
|
data: ThemeData(
|
||||||
colorScheme:
|
colorScheme:
|
||||||
coverColorScheme.valueOrNull ?? Theme.of(context).colorScheme,
|
coverColorScheme.value ?? Theme.of(context).colorScheme,
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(strokeWidth / 2 + 2),
|
padding: EdgeInsets.all(strokeWidth / 2 + 2),
|
||||||
|
|
|
||||||
|
|
@ -6,174 +6,91 @@ part of 'system_theme_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$systemThemeHash() => r'c78d3d94683624a80b296594268c5fd4295e77a3';
|
// 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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// copied from [DynamicColorBuilder]
|
/// copied from [DynamicColorBuilder]
|
||||||
///
|
|
||||||
/// Copied from [systemTheme].
|
|
||||||
@ProviderFor(systemTheme)
|
@ProviderFor(systemTheme)
|
||||||
const systemThemeProvider = SystemThemeFamily();
|
final systemThemeProvider = SystemThemeFamily._();
|
||||||
|
|
||||||
/// copied from [DynamicColorBuilder]
|
/// copied from [DynamicColorBuilder]
|
||||||
///
|
|
||||||
/// Copied from [systemTheme].
|
|
||||||
class SystemThemeFamily
|
|
||||||
extends Family<AsyncValue<(ColorScheme light, ColorScheme dark)?>> {
|
|
||||||
/// copied from [DynamicColorBuilder]
|
|
||||||
///
|
|
||||||
/// Copied from [systemTheme].
|
|
||||||
const SystemThemeFamily();
|
|
||||||
|
|
||||||
|
final class SystemThemeProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
AsyncValue<(ColorScheme, ColorScheme)?>,
|
||||||
|
(ColorScheme, ColorScheme)?,
|
||||||
|
FutureOr<(ColorScheme, ColorScheme)?>
|
||||||
|
>
|
||||||
|
with
|
||||||
|
$FutureModifier<(ColorScheme, ColorScheme)?>,
|
||||||
|
$FutureProvider<(ColorScheme, ColorScheme)?> {
|
||||||
/// copied from [DynamicColorBuilder]
|
/// copied from [DynamicColorBuilder]
|
||||||
///
|
SystemThemeProvider._({
|
||||||
/// Copied from [systemTheme].
|
required SystemThemeFamily super.from,
|
||||||
SystemThemeProvider call({
|
required bool super.argument,
|
||||||
bool highContrast = false,
|
}) : super(
|
||||||
}) {
|
retry: null,
|
||||||
return SystemThemeProvider(
|
name: r'systemThemeProvider',
|
||||||
highContrast: highContrast,
|
isAutoDispose: false,
|
||||||
);
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String debugGetCreateSourceHash() => _$systemThemeHash();
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return r'systemThemeProvider'
|
||||||
|
''
|
||||||
|
'($argument)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
SystemThemeProvider getProviderOverride(
|
$FutureProviderElement<(ColorScheme, ColorScheme)?> $createElement(
|
||||||
covariant SystemThemeProvider provider,
|
$ProviderPointer pointer,
|
||||||
) {
|
) => $FutureProviderElement(pointer);
|
||||||
return call(
|
|
||||||
highContrast: provider.highContrast,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
FutureOr<(ColorScheme, ColorScheme)?> create(Ref ref) {
|
||||||
|
final argument = this.argument as bool;
|
||||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
return systemTheme(ref, highContrast: argument);
|
||||||
|
|
||||||
@override
|
|
||||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
|
||||||
_allTransitiveDependencies;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get name => r'systemThemeProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// copied from [DynamicColorBuilder]
|
|
||||||
///
|
|
||||||
/// Copied from [systemTheme].
|
|
||||||
class SystemThemeProvider
|
|
||||||
extends FutureProvider<(ColorScheme light, ColorScheme dark)?> {
|
|
||||||
/// copied from [DynamicColorBuilder]
|
|
||||||
///
|
|
||||||
/// Copied from [systemTheme].
|
|
||||||
SystemThemeProvider({
|
|
||||||
bool highContrast = false,
|
|
||||||
}) : this._internal(
|
|
||||||
(ref) => systemTheme(
|
|
||||||
ref as SystemThemeRef,
|
|
||||||
highContrast: highContrast,
|
|
||||||
),
|
|
||||||
from: systemThemeProvider,
|
|
||||||
name: r'systemThemeProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$systemThemeHash,
|
|
||||||
dependencies: SystemThemeFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
SystemThemeFamily._allTransitiveDependencies,
|
|
||||||
highContrast: highContrast,
|
|
||||||
);
|
|
||||||
|
|
||||||
SystemThemeProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.highContrast,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final bool highContrast;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(
|
|
||||||
FutureOr<(ColorScheme light, ColorScheme dark)?> Function(
|
|
||||||
SystemThemeRef provider)
|
|
||||||
create,
|
|
||||||
) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: SystemThemeProvider._internal(
|
|
||||||
(ref) => create(ref as SystemThemeRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
highContrast: highContrast,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
FutureProviderElement<(ColorScheme light, ColorScheme dark)?>
|
|
||||||
createElement() {
|
|
||||||
return _SystemThemeProviderElement(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is SystemThemeProvider && other.highContrast == highContrast;
|
return other is SystemThemeProvider && other.argument == argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, highContrast.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$systemThemeHash() => r'c78d3d94683624a80b296594268c5fd4295e77a3';
|
||||||
// ignore: unused_element
|
|
||||||
mixin SystemThemeRef
|
|
||||||
on FutureProviderRef<(ColorScheme light, ColorScheme dark)?> {
|
|
||||||
/// The parameter `highContrast` of this provider.
|
|
||||||
bool get highContrast;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SystemThemeProviderElement
|
/// copied from [DynamicColorBuilder]
|
||||||
extends FutureProviderElement<(ColorScheme light, ColorScheme dark)?>
|
|
||||||
with SystemThemeRef {
|
final class SystemThemeFamily extends $Family
|
||||||
_SystemThemeProviderElement(super.provider);
|
with
|
||||||
|
$FunctionalFamilyOverride<FutureOr<(ColorScheme, ColorScheme)?>, bool> {
|
||||||
|
SystemThemeFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'systemThemeProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
/// copied from [DynamicColorBuilder]
|
||||||
|
|
||||||
|
SystemThemeProvider call({bool highContrast = false}) =>
|
||||||
|
SystemThemeProvider._(argument: highContrast, from: this);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get highContrast => (origin as SystemThemeProvider).highContrast;
|
String toString() => r'systemThemeProvider';
|
||||||
}
|
}
|
||||||
// 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,355 +6,197 @@ part of 'theme_from_cover_provider.dart';
|
||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$themeFromCoverHash() => r'afdeddc4bfe2fe46a4185143d3a88a23565e33f4';
|
// 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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [themeFromCover].
|
|
||||||
@ProviderFor(themeFromCover)
|
@ProviderFor(themeFromCover)
|
||||||
const themeFromCoverProvider = ThemeFromCoverFamily();
|
final themeFromCoverProvider = ThemeFromCoverFamily._();
|
||||||
|
|
||||||
/// See also [themeFromCover].
|
final class ThemeFromCoverProvider
|
||||||
class ThemeFromCoverFamily extends Family<AsyncValue<FutureOr<ColorScheme?>>> {
|
extends
|
||||||
/// See also [themeFromCover].
|
$FunctionalProvider<
|
||||||
const ThemeFromCoverFamily();
|
AsyncValue<FutureOr<ColorScheme?>>,
|
||||||
|
FutureOr<ColorScheme?>,
|
||||||
|
FutureOr<FutureOr<ColorScheme?>>
|
||||||
|
>
|
||||||
|
with
|
||||||
|
$FutureModifier<FutureOr<ColorScheme?>>,
|
||||||
|
$FutureProvider<FutureOr<ColorScheme?>> {
|
||||||
|
ThemeFromCoverProvider._({
|
||||||
|
required ThemeFromCoverFamily super.from,
|
||||||
|
required (ImageProvider<Object>, {Brightness brightness, bool highContrast})
|
||||||
|
super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'themeFromCoverProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [themeFromCover].
|
@override
|
||||||
ThemeFromCoverProvider call(
|
String debugGetCreateSourceHash() => _$themeFromCoverHash();
|
||||||
ImageProvider<Object> img, {
|
|
||||||
Brightness brightness = Brightness.dark,
|
@override
|
||||||
bool highContrast = false,
|
String toString() {
|
||||||
}) {
|
return r'themeFromCoverProvider'
|
||||||
return ThemeFromCoverProvider(
|
''
|
||||||
img,
|
'$argument';
|
||||||
brightness: brightness,
|
|
||||||
highContrast: highContrast,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
ThemeFromCoverProvider getProviderOverride(
|
$FutureProviderElement<FutureOr<ColorScheme?>> $createElement(
|
||||||
covariant ThemeFromCoverProvider provider,
|
$ProviderPointer pointer,
|
||||||
) {
|
) => $FutureProviderElement(pointer);
|
||||||
return call(
|
|
||||||
provider.img,
|
@override
|
||||||
brightness: provider.brightness,
|
FutureOr<FutureOr<ColorScheme?>> create(Ref ref) {
|
||||||
highContrast: provider.highContrast,
|
final argument =
|
||||||
|
this.argument
|
||||||
|
as (
|
||||||
|
ImageProvider<Object>, {
|
||||||
|
Brightness brightness,
|
||||||
|
bool highContrast,
|
||||||
|
});
|
||||||
|
return themeFromCover(
|
||||||
|
ref,
|
||||||
|
argument.$1,
|
||||||
|
brightness: argument.brightness,
|
||||||
|
highContrast: argument.highContrast,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
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'themeFromCoverProvider';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// See also [themeFromCover].
|
|
||||||
class ThemeFromCoverProvider extends FutureProvider<FutureOr<ColorScheme?>> {
|
|
||||||
/// See also [themeFromCover].
|
|
||||||
ThemeFromCoverProvider(
|
|
||||||
ImageProvider<Object> img, {
|
|
||||||
Brightness brightness = Brightness.dark,
|
|
||||||
bool highContrast = false,
|
|
||||||
}) : this._internal(
|
|
||||||
(ref) => themeFromCover(
|
|
||||||
ref as ThemeFromCoverRef,
|
|
||||||
img,
|
|
||||||
brightness: brightness,
|
|
||||||
highContrast: highContrast,
|
|
||||||
),
|
|
||||||
from: themeFromCoverProvider,
|
|
||||||
name: r'themeFromCoverProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$themeFromCoverHash,
|
|
||||||
dependencies: ThemeFromCoverFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
ThemeFromCoverFamily._allTransitiveDependencies,
|
|
||||||
img: img,
|
|
||||||
brightness: brightness,
|
|
||||||
highContrast: highContrast,
|
|
||||||
);
|
|
||||||
|
|
||||||
ThemeFromCoverProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.img,
|
|
||||||
required this.brightness,
|
|
||||||
required this.highContrast,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final ImageProvider<Object> img;
|
|
||||||
final Brightness brightness;
|
|
||||||
final bool highContrast;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(
|
|
||||||
FutureOr<FutureOr<ColorScheme?>> Function(ThemeFromCoverRef provider)
|
|
||||||
create,
|
|
||||||
) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: ThemeFromCoverProvider._internal(
|
|
||||||
(ref) => create(ref as ThemeFromCoverRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
img: img,
|
|
||||||
brightness: brightness,
|
|
||||||
highContrast: highContrast,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
FutureProviderElement<FutureOr<ColorScheme?>> createElement() {
|
|
||||||
return _ThemeFromCoverProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return other is ThemeFromCoverProvider &&
|
return other is ThemeFromCoverProvider && other.argument == argument;
|
||||||
other.img == img &&
|
|
||||||
other.brightness == brightness &&
|
|
||||||
other.highContrast == highContrast;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode {
|
int get hashCode {
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
return argument.hashCode;
|
||||||
hash = _SystemHash.combine(hash, img.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, brightness.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, highContrast.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
String _$themeFromCoverHash() => r'afdeddc4bfe2fe46a4185143d3a88a23565e33f4';
|
||||||
// ignore: unused_element
|
|
||||||
mixin ThemeFromCoverRef on FutureProviderRef<FutureOr<ColorScheme?>> {
|
|
||||||
/// The parameter `img` of this provider.
|
|
||||||
ImageProvider<Object> get img;
|
|
||||||
|
|
||||||
/// The parameter `brightness` of this provider.
|
final class ThemeFromCoverFamily extends $Family
|
||||||
Brightness get brightness;
|
with
|
||||||
|
$FunctionalFamilyOverride<
|
||||||
|
FutureOr<FutureOr<ColorScheme?>>,
|
||||||
|
(ImageProvider<Object>, {Brightness brightness, bool highContrast})
|
||||||
|
> {
|
||||||
|
ThemeFromCoverFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'themeFromCoverProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: false,
|
||||||
|
);
|
||||||
|
|
||||||
/// The parameter `highContrast` of this provider.
|
ThemeFromCoverProvider call(
|
||||||
bool get highContrast;
|
ImageProvider<Object> img, {
|
||||||
|
Brightness brightness = Brightness.dark,
|
||||||
|
bool highContrast = false,
|
||||||
|
}) => ThemeFromCoverProvider._(
|
||||||
|
argument: (img, brightness: brightness, highContrast: highContrast),
|
||||||
|
from: this,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => r'themeFromCoverProvider';
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ThemeFromCoverProviderElement
|
@ProviderFor(themeOfLibraryItem)
|
||||||
extends FutureProviderElement<FutureOr<ColorScheme?>>
|
final themeOfLibraryItemProvider = ThemeOfLibraryItemFamily._();
|
||||||
with ThemeFromCoverRef {
|
|
||||||
_ThemeFromCoverProviderElement(super.provider);
|
final class ThemeOfLibraryItemProvider
|
||||||
|
extends
|
||||||
|
$FunctionalProvider<
|
||||||
|
AsyncValue<ColorScheme?>,
|
||||||
|
ColorScheme?,
|
||||||
|
FutureOr<ColorScheme?>
|
||||||
|
>
|
||||||
|
with $FutureModifier<ColorScheme?>, $FutureProvider<ColorScheme?> {
|
||||||
|
ThemeOfLibraryItemProvider._({
|
||||||
|
required ThemeOfLibraryItemFamily super.from,
|
||||||
|
required (String?, {Brightness brightness, bool highContrast})
|
||||||
|
super.argument,
|
||||||
|
}) : super(
|
||||||
|
retry: null,
|
||||||
|
name: r'themeOfLibraryItemProvider',
|
||||||
|
isAutoDispose: false,
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ImageProvider<Object> get img => (origin as ThemeFromCoverProvider).img;
|
String debugGetCreateSourceHash() => _$themeOfLibraryItemHash();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Brightness get brightness => (origin as ThemeFromCoverProvider).brightness;
|
String toString() {
|
||||||
|
return r'themeOfLibraryItemProvider'
|
||||||
|
''
|
||||||
|
'$argument';
|
||||||
|
}
|
||||||
|
|
||||||
|
@$internal
|
||||||
@override
|
@override
|
||||||
bool get highContrast => (origin as ThemeFromCoverProvider).highContrast;
|
$FutureProviderElement<ColorScheme?> $createElement(
|
||||||
|
$ProviderPointer pointer,
|
||||||
|
) => $FutureProviderElement(pointer);
|
||||||
|
|
||||||
|
@override
|
||||||
|
FutureOr<ColorScheme?> create(Ref ref) {
|
||||||
|
final argument =
|
||||||
|
this.argument as (String?, {Brightness brightness, bool highContrast});
|
||||||
|
return themeOfLibraryItem(
|
||||||
|
ref,
|
||||||
|
argument.$1,
|
||||||
|
brightness: argument.brightness,
|
||||||
|
highContrast: argument.highContrast,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return other is ThemeOfLibraryItemProvider && other.argument == argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return argument.hashCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _$themeOfLibraryItemHash() =>
|
String _$themeOfLibraryItemHash() =>
|
||||||
r'0b2df397b2938003a9de6beb6d4204401a05370c';
|
r'0b2df397b2938003a9de6beb6d4204401a05370c';
|
||||||
|
|
||||||
/// See also [themeOfLibraryItem].
|
final class ThemeOfLibraryItemFamily extends $Family
|
||||||
@ProviderFor(themeOfLibraryItem)
|
with
|
||||||
const themeOfLibraryItemProvider = ThemeOfLibraryItemFamily();
|
$FunctionalFamilyOverride<
|
||||||
|
FutureOr<ColorScheme?>,
|
||||||
|
(String?, {Brightness brightness, bool highContrast})
|
||||||
|
> {
|
||||||
|
ThemeOfLibraryItemFamily._()
|
||||||
|
: super(
|
||||||
|
retry: null,
|
||||||
|
name: r'themeOfLibraryItemProvider',
|
||||||
|
dependencies: null,
|
||||||
|
$allTransitiveDependencies: null,
|
||||||
|
isAutoDispose: false,
|
||||||
|
);
|
||||||
|
|
||||||
/// See also [themeOfLibraryItem].
|
|
||||||
class ThemeOfLibraryItemFamily extends Family<AsyncValue<ColorScheme?>> {
|
|
||||||
/// See also [themeOfLibraryItem].
|
|
||||||
const ThemeOfLibraryItemFamily();
|
|
||||||
|
|
||||||
/// See also [themeOfLibraryItem].
|
|
||||||
ThemeOfLibraryItemProvider call(
|
ThemeOfLibraryItemProvider call(
|
||||||
String? itemId, {
|
String? itemId, {
|
||||||
Brightness brightness = Brightness.dark,
|
Brightness brightness = Brightness.dark,
|
||||||
bool highContrast = false,
|
bool highContrast = false,
|
||||||
}) {
|
}) => ThemeOfLibraryItemProvider._(
|
||||||
return ThemeOfLibraryItemProvider(
|
argument: (itemId, brightness: brightness, highContrast: highContrast),
|
||||||
itemId,
|
from: this,
|
||||||
brightness: brightness,
|
);
|
||||||
highContrast: highContrast,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ThemeOfLibraryItemProvider getProviderOverride(
|
String toString() => r'themeOfLibraryItemProvider';
|
||||||
covariant ThemeOfLibraryItemProvider provider,
|
|
||||||
) {
|
|
||||||
return call(
|
|
||||||
provider.itemId,
|
|
||||||
brightness: provider.brightness,
|
|
||||||
highContrast: provider.highContrast,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
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'themeOfLibraryItemProvider';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// See also [themeOfLibraryItem].
|
|
||||||
class ThemeOfLibraryItemProvider extends FutureProvider<ColorScheme?> {
|
|
||||||
/// See also [themeOfLibraryItem].
|
|
||||||
ThemeOfLibraryItemProvider(
|
|
||||||
String? itemId, {
|
|
||||||
Brightness brightness = Brightness.dark,
|
|
||||||
bool highContrast = false,
|
|
||||||
}) : this._internal(
|
|
||||||
(ref) => themeOfLibraryItem(
|
|
||||||
ref as ThemeOfLibraryItemRef,
|
|
||||||
itemId,
|
|
||||||
brightness: brightness,
|
|
||||||
highContrast: highContrast,
|
|
||||||
),
|
|
||||||
from: themeOfLibraryItemProvider,
|
|
||||||
name: r'themeOfLibraryItemProvider',
|
|
||||||
debugGetCreateSourceHash:
|
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
|
||||||
: _$themeOfLibraryItemHash,
|
|
||||||
dependencies: ThemeOfLibraryItemFamily._dependencies,
|
|
||||||
allTransitiveDependencies:
|
|
||||||
ThemeOfLibraryItemFamily._allTransitiveDependencies,
|
|
||||||
itemId: itemId,
|
|
||||||
brightness: brightness,
|
|
||||||
highContrast: highContrast,
|
|
||||||
);
|
|
||||||
|
|
||||||
ThemeOfLibraryItemProvider._internal(
|
|
||||||
super._createNotifier, {
|
|
||||||
required super.name,
|
|
||||||
required super.dependencies,
|
|
||||||
required super.allTransitiveDependencies,
|
|
||||||
required super.debugGetCreateSourceHash,
|
|
||||||
required super.from,
|
|
||||||
required this.itemId,
|
|
||||||
required this.brightness,
|
|
||||||
required this.highContrast,
|
|
||||||
}) : super.internal();
|
|
||||||
|
|
||||||
final String? itemId;
|
|
||||||
final Brightness brightness;
|
|
||||||
final bool highContrast;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Override overrideWith(
|
|
||||||
FutureOr<ColorScheme?> Function(ThemeOfLibraryItemRef provider) create,
|
|
||||||
) {
|
|
||||||
return ProviderOverride(
|
|
||||||
origin: this,
|
|
||||||
override: ThemeOfLibraryItemProvider._internal(
|
|
||||||
(ref) => create(ref as ThemeOfLibraryItemRef),
|
|
||||||
from: from,
|
|
||||||
name: null,
|
|
||||||
dependencies: null,
|
|
||||||
allTransitiveDependencies: null,
|
|
||||||
debugGetCreateSourceHash: null,
|
|
||||||
itemId: itemId,
|
|
||||||
brightness: brightness,
|
|
||||||
highContrast: highContrast,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
FutureProviderElement<ColorScheme?> createElement() {
|
|
||||||
return _ThemeOfLibraryItemProviderElement(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return other is ThemeOfLibraryItemProvider &&
|
|
||||||
other.itemId == itemId &&
|
|
||||||
other.brightness == brightness &&
|
|
||||||
other.highContrast == highContrast;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode {
|
|
||||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, itemId.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, brightness.hashCode);
|
|
||||||
hash = _SystemHash.combine(hash, highContrast.hashCode);
|
|
||||||
|
|
||||||
return _SystemHash.finish(hash);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
|
||||||
// ignore: unused_element
|
|
||||||
mixin ThemeOfLibraryItemRef on FutureProviderRef<ColorScheme?> {
|
|
||||||
/// The parameter `itemId` of this provider.
|
|
||||||
String? get itemId;
|
|
||||||
|
|
||||||
/// The parameter `brightness` of this provider.
|
|
||||||
Brightness get brightness;
|
|
||||||
|
|
||||||
/// The parameter `highContrast` of this provider.
|
|
||||||
bool get highContrast;
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ThemeOfLibraryItemProviderElement
|
|
||||||
extends FutureProviderElement<ColorScheme?> with ThemeOfLibraryItemRef {
|
|
||||||
_ThemeOfLibraryItemProviderElement(super.provider);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String? get itemId => (origin as ThemeOfLibraryItemProvider).itemId;
|
|
||||||
@override
|
|
||||||
Brightness get brightness =>
|
|
||||||
(origin as ThemeOfLibraryItemProvider).brightness;
|
|
||||||
@override
|
|
||||||
bool get highContrast => (origin as ThemeOfLibraryItemProvider).highContrast;
|
|
||||||
}
|
|
||||||
// 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
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <dynamic_color/dynamic_color_plugin.h>
|
#include <dynamic_color/dynamic_color_plugin.h>
|
||||||
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
|
#include <isar_plus_flutter_libs/isar_plus_flutter_libs_plugin.h>
|
||||||
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
|
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
|
||||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||||
|
|
||||||
|
|
@ -15,9 +15,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
|
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
|
||||||
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
|
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) isar_flutter_libs_registrar =
|
g_autoptr(FlPluginRegistrar) isar_plus_flutter_libs_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "IsarFlutterLibsPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "IsarPlusFlutterLibsPlugin");
|
||||||
isar_flutter_libs_plugin_register_with_registrar(isar_flutter_libs_registrar);
|
isar_plus_flutter_libs_plugin_register_with_registrar(isar_plus_flutter_libs_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar =
|
g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin");
|
||||||
media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar);
|
media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
dynamic_color
|
dynamic_color
|
||||||
isar_flutter_libs
|
isar_plus_flutter_libs
|
||||||
media_kit_libs_linux
|
media_kit_libs_linux
|
||||||
url_launcher_linux
|
url_launcher_linux
|
||||||
)
|
)
|
||||||
|
|
|
||||||
313
pubspec.lock
313
pubspec.lock
|
|
@ -5,31 +5,26 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab"
|
sha256: c209688d9f5a5f26b2fb47a188131a6fb9e876ae9e47af3737c0b4f58a93470d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "76.0.0"
|
version: "91.0.0"
|
||||||
_macros:
|
|
||||||
dependency: transitive
|
|
||||||
description: dart
|
|
||||||
source: sdk
|
|
||||||
version: "0.3.3"
|
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e"
|
sha256: f51c8499b35f9b26820cfe914828a6a98a94efd5cc78b37bb7d03debae3a1d08
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.11.0"
|
version: "8.4.1"
|
||||||
analyzer_plugin:
|
analyzer_buffer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer_plugin
|
name: analyzer_buffer
|
||||||
sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161"
|
sha256: aba2f75e63b3135fd1efaa8b6abefe1aa6e41b6bd9806221620fa48f98156033
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.11.3"
|
version: "0.1.11"
|
||||||
animated_list_plus:
|
animated_list_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -138,18 +133,18 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build
|
name: build
|
||||||
sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0
|
sha256: c1668065e9ba04752570ad7e038288559d1e2ca5c6d0131c0f5f55e39e777413
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.2"
|
version: "4.0.3"
|
||||||
build_config:
|
build_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_config
|
name: build_config
|
||||||
sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33"
|
sha256: "4f64382b97504dc2fcdf487d5aae33418e08b4703fc21249e4db6d804a4d0187"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.2"
|
version: "1.2.0"
|
||||||
build_daemon:
|
build_daemon:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -158,30 +153,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.4"
|
version: "4.0.4"
|
||||||
build_resolvers:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: build_resolvers
|
|
||||||
sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.4.4"
|
|
||||||
build_runner:
|
build_runner:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: build_runner
|
name: build_runner
|
||||||
sha256: "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99"
|
sha256: "110c56ef29b5eb367b4d17fc79375fa8c18a6cd7acd92c05bb3986c17a079057"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.15"
|
version: "2.10.4"
|
||||||
build_runner_core:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: build_runner_core
|
|
||||||
sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "8.0.0"
|
|
||||||
built_collection:
|
built_collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -194,10 +173,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: built_value
|
name: built_value
|
||||||
sha256: "7193c909c8608d3e1a263093ff045f7140bcc1bf3f7de2c5ec7ad027891d2d22"
|
sha256: "426cf75afdb23aa74bd4e471704de3f9393f3c7b04c1e2d9c6f1073ae0b8b139"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "8.10.0"
|
version: "8.12.1"
|
||||||
cached_network_image:
|
cached_network_image:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -246,22 +225,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "2.0.3"
|
||||||
ci:
|
cli_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: ci
|
name: cli_config
|
||||||
sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13"
|
sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.0"
|
version: "0.2.0"
|
||||||
cli_util:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: cli_util
|
|
||||||
sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.4.2"
|
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -302,6 +273,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
|
coverage:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: coverage
|
||||||
|
sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.15.0"
|
||||||
cross_file:
|
cross_file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -326,46 +305,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.8"
|
version: "1.0.8"
|
||||||
custom_lint:
|
|
||||||
dependency: "direct dev"
|
|
||||||
description:
|
|
||||||
name: custom_lint
|
|
||||||
sha256: "3486c470bb93313a9417f926c7dd694a2e349220992d7b9d14534dc49c15bba9"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.7.0"
|
|
||||||
custom_lint_builder:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: custom_lint_builder
|
|
||||||
sha256: "42cdc41994eeeddab0d7a722c7093ec52bd0761921eeb2cbdbf33d192a234759"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.7.0"
|
|
||||||
custom_lint_core:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: custom_lint_core
|
|
||||||
sha256: "02450c3e45e2a6e8b26c4d16687596ab3c4644dd5792e3313aa9ceba5a49b7f5"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.7.0"
|
|
||||||
custom_lint_visitor:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: custom_lint_visitor
|
|
||||||
sha256: bfe9b7a09c4775a587b58d10ebb871d4fe618237639b1e84d5ec62d7dfef25f9
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.0+6.11.0"
|
|
||||||
dart_style:
|
dart_style:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: dart_style
|
name: dart_style
|
||||||
sha256: "7306ab8a2359a48d22310ad823521d723acfed60ee1f7e37388e8986853b6820"
|
sha256: a9c30492da18ff84efe2422ba2d319a89942d93e58eb0b73d32abe822ef54b7b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.8"
|
version: "3.1.3"
|
||||||
device_info_plus:
|
device_info_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -511,10 +458,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flutter_riverpod
|
name: flutter_riverpod
|
||||||
sha256: "9532ee6db4a943a1ed8383072a2e3eeda041db5657cdf6d2acecf3c21ecbe7e1"
|
sha256: "38ec6c303e2c83ee84512f5fc2a82ae311531021938e63d7137eccc107bf3c02"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.1"
|
version: "3.1.0"
|
||||||
flutter_settings_ui:
|
flutter_settings_ui:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -553,18 +500,18 @@ packages:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: freezed
|
name: freezed
|
||||||
sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e"
|
sha256: "13065f10e135263a4f5a4391b79a8efc5fb8106f8dd555a9e49b750b45393d77"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.5.7"
|
version: "3.2.3"
|
||||||
freezed_annotation:
|
freezed_annotation:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: freezed_annotation
|
name: freezed_annotation
|
||||||
sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2
|
sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.4"
|
version: "3.1.0"
|
||||||
frontend_server_client:
|
frontend_server_client:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -597,30 +544,22 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.2"
|
version: "2.3.2"
|
||||||
hive:
|
hive_plus_secure:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: hive
|
name: hive_plus_secure
|
||||||
sha256: "10819524df282842ebae12870e2e0e9ebc3e5c4637bec741ad39b919c589cb20"
|
sha256: "0bf08f07b42bc42137cfb151ee7fbe417c8295db69d13bb316d81abecfb02aed"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.0-dev.2"
|
version: "1.1.25"
|
||||||
hooks_riverpod:
|
hooks_riverpod:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: hooks_riverpod
|
name: hooks_riverpod
|
||||||
sha256: "70bba33cfc5670c84b796e6929c54b8bc5be7d0fe15bb28c2560500b9ad06966"
|
sha256: b880efcd17757af0aa242e5dceac2fb781a014c22a32435a5daa8f17e9d5d8a9
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.1"
|
version: "3.1.0"
|
||||||
hotreloader:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: hotreloader
|
|
||||||
sha256: bc167a1163807b03bada490bfe2df25b0d744df359227880220a5cbd04e5734b
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.3.0"
|
|
||||||
http:
|
http:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -677,22 +616,22 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "1.0.5"
|
||||||
isar:
|
isar_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: isar
|
name: isar_plus
|
||||||
sha256: ebf74d87c400bd9f7da14acb31932b50c2407edbbd40930da3a6c2a8143f85a8
|
sha256: "43d874216d2f1fcec06f209ebbc75e7ca9705076d8c7077ec6ac5ea511dad9dd"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.0-dev.14"
|
version: "1.2.0"
|
||||||
isar_flutter_libs:
|
isar_plus_flutter_libs:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: isar_flutter_libs
|
name: isar_plus_flutter_libs
|
||||||
sha256: "04a3f4035e213ddb6e78d0132a7c80296a085c2088c2a761b4a42ee5add36983"
|
sha256: e142590a13b5c9d349555ebd72a25ee34901992a2bb32ba6ccfd414519b48adf
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.0-dev.14"
|
version: "1.2.0"
|
||||||
js:
|
js:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -713,10 +652,10 @@ packages:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: json_serializable
|
name: json_serializable
|
||||||
sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c
|
sha256: c5b2ee75210a0f263c6c7b9eeea80553dbae96ea1bf57f02484e806a3ffdffa3
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.9.0"
|
version: "6.11.2"
|
||||||
just_audio:
|
just_audio:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -762,26 +701,26 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
|
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.9"
|
version: "11.0.2"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_flutter_testing
|
name: leak_tracker_flutter_testing
|
||||||
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
|
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.9"
|
version: "3.0.10"
|
||||||
leak_tracker_testing:
|
leak_tracker_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_testing
|
name: leak_tracker_testing
|
||||||
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "3.0.2"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -798,6 +737,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.3"
|
version: "0.0.3"
|
||||||
|
logger:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: logger
|
||||||
|
sha256: a7967e31b703831a893bbc3c3dd11db08126fe5f369b5c648a36f821979f5be3
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.6.2"
|
||||||
logging:
|
logging:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -822,14 +769,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.3.1"
|
version: "3.3.1"
|
||||||
macros:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: macros
|
|
||||||
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.3-main.0"
|
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -882,10 +821,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
|
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.16.0"
|
version: "1.17.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -903,6 +842,22 @@ packages:
|
||||||
url: "https://github.com/Dr-Blank/miniplayer.git"
|
url: "https://github.com/Dr-Blank/miniplayer.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.0.3"
|
version: "1.0.3"
|
||||||
|
mockito:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: mockito
|
||||||
|
sha256: dac24d461418d363778d53198d9ac0510b9d073869f078450f195766ec48d05e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.6.1"
|
||||||
|
node_preamble:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: node_preamble
|
||||||
|
sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.2"
|
||||||
numberpicker:
|
numberpicker:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -1107,42 +1062,34 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: riverpod
|
name: riverpod
|
||||||
sha256: "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959"
|
sha256: "16ff608d21e8ea64364f2b7c049c94a02ab81668f78845862b6e88b71dd4935a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.1"
|
version: "3.1.0"
|
||||||
riverpod_analyzer_utils:
|
riverpod_analyzer_utils:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: riverpod_analyzer_utils
|
name: riverpod_analyzer_utils
|
||||||
sha256: c6b8222b2b483cb87ae77ad147d6408f400c64f060df7a225b127f4afef4f8c8
|
sha256: "947b05d04c52a546a2ac6b19ef2a54b08520ff6bdf9f23d67957a4c8df1c3bc0"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.8"
|
version: "1.0.0-dev.8"
|
||||||
riverpod_annotation:
|
riverpod_annotation:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: riverpod_annotation
|
name: riverpod_annotation
|
||||||
sha256: e14b0bf45b71326654e2705d462f21b958f987087be850afd60578fcd502d1b8
|
sha256: cc1474bc2df55ec3c1da1989d139dcef22cd5e2bd78da382e867a69a8eca2e46
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.1"
|
version: "4.0.0"
|
||||||
riverpod_generator:
|
riverpod_generator:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: riverpod_generator
|
name: riverpod_generator
|
||||||
sha256: "63546d70952015f0981361636bf8f356d9cfd9d7f6f0815e3c07789a41233188"
|
sha256: e43b1537229cc8f487f09b0c20d15dba840acbadcf5fc6dad7ad5e8ab75950dc
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.3"
|
version: "4.0.0+1"
|
||||||
riverpod_lint:
|
|
||||||
dependency: "direct dev"
|
|
||||||
description:
|
|
||||||
name: riverpod_lint
|
|
||||||
sha256: "83e4caa337a9840469b7b9bd8c2351ce85abad80f570d84146911b32086fbd99"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.6.3"
|
|
||||||
rxdart:
|
rxdart:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1207,6 +1154,22 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.2"
|
version: "1.4.2"
|
||||||
|
shelf_packages_handler:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf_packages_handler
|
||||||
|
sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.2"
|
||||||
|
shelf_static:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf_static
|
||||||
|
sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.3"
|
||||||
shelf_web_socket:
|
shelf_web_socket:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1255,18 +1218,34 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_gen
|
name: source_gen
|
||||||
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
|
sha256: "07b277b67e0096c45196cbddddf2d8c6ffc49342e88bf31d460ce04605ddac75"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.0"
|
version: "4.1.1"
|
||||||
source_helper:
|
source_helper:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_helper
|
name: source_helper
|
||||||
sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c"
|
sha256: "6a3c6cc82073a8797f8c4dc4572146114a39652851c157db37e964d9c7038723"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.5"
|
version: "1.3.8"
|
||||||
|
source_map_stack_trace:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_map_stack_trace
|
||||||
|
sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.2"
|
||||||
|
source_maps:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_maps
|
||||||
|
sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.10.13"
|
||||||
source_span:
|
source_span:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1379,22 +1358,30 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.2"
|
version: "1.2.2"
|
||||||
|
test:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: test
|
||||||
|
sha256: "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.26.3"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
|
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.4"
|
version: "0.7.7"
|
||||||
timing:
|
test_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: timing
|
name: test_core
|
||||||
sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe"
|
sha256: "0cc24b5ff94b38d2ae73e1eb43cc302b77964fbf67abad1e296025b78deb53d0"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.2"
|
version: "0.6.12"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1495,10 +1482,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.2.0"
|
||||||
vibration:
|
vibration:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -1555,6 +1542,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.3"
|
version: "3.0.3"
|
||||||
|
webkit_inspection_protocol:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: webkit_inspection_protocol
|
||||||
|
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.1"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1596,5 +1591,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.3"
|
version: "3.1.3"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.7.0 <4.0.0"
|
dart: ">=3.10.0 <4.0.0"
|
||||||
flutter: ">=3.32.8"
|
flutter: "3.38.6"
|
||||||
|
|
|
||||||
23
pubspec.yaml
23
pubspec.yaml
|
|
@ -19,8 +19,8 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||||
version: 0.0.18+9
|
version: 0.0.18+9
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.3.4 <4.0.0"
|
sdk: ">=3.10.0 <4.0.0"
|
||||||
flutter: 3.32.8
|
flutter: 3.38.6
|
||||||
|
|
||||||
# Dependencies specify other packages that your package needs in order to work.
|
# Dependencies specify other packages that your package needs in order to work.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
|
|
@ -53,12 +53,12 @@ dependencies:
|
||||||
flutter_hooks: ^0.21.2
|
flutter_hooks: ^0.21.2
|
||||||
flutter_settings_ui: ^3.0.1
|
flutter_settings_ui: ^3.0.1
|
||||||
font_awesome_flutter: ^10.7.0
|
font_awesome_flutter: ^10.7.0
|
||||||
freezed_annotation: ^2.4.1
|
freezed_annotation: ^3.1.0
|
||||||
go_router: ^14.0.2
|
go_router: ^14.0.2
|
||||||
hive: ^4.0.0-dev.2
|
hive_plus_secure: ^1.1.25
|
||||||
hooks_riverpod: ^2.5.1
|
hooks_riverpod: ^3.0.0
|
||||||
isar: ^4.0.0-dev.13
|
isar_plus: ^1.1.0
|
||||||
isar_flutter_libs: ^4.0.0-dev.13
|
isar_plus_flutter_libs: ^1.1.0
|
||||||
json_annotation: ^4.9.0
|
json_annotation: ^4.9.0
|
||||||
just_audio: ^0.9.37
|
just_audio: ^0.9.37
|
||||||
just_audio_background:
|
just_audio_background:
|
||||||
|
|
@ -85,7 +85,7 @@ dependencies:
|
||||||
path: ^1.9.0
|
path: ^1.9.0
|
||||||
path_provider: ^2.1.0
|
path_provider: ^2.1.0
|
||||||
permission_handler: ^11.3.1
|
permission_handler: ^11.3.1
|
||||||
riverpod_annotation: ^2.3.5
|
riverpod_annotation: 4.0.0
|
||||||
scroll_loop_auto_scroll: ^0.0.5
|
scroll_loop_auto_scroll: ^0.0.5
|
||||||
sensors_plus: ^6.0.1
|
sensors_plus: ^6.0.1
|
||||||
share_plus: ^10.0.2
|
share_plus: ^10.0.2
|
||||||
|
|
@ -96,14 +96,13 @@ dependencies:
|
||||||
vibration: ^3.1.3
|
vibration: ^3.1.3
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: ^2.4.9
|
build_runner: ^2.4.9
|
||||||
custom_lint: ^0.7.0
|
# custom_lint: ^0.8.1
|
||||||
flutter_lints: ^5.0.0
|
flutter_lints: ^5.0.0
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
freezed: ^2.5.2
|
freezed: ^3.1.0
|
||||||
json_serializable: ^6.8.0
|
json_serializable: ^6.8.0
|
||||||
riverpod_generator: ^2.4.2
|
riverpod_generator: ^4.0.0+1
|
||||||
riverpod_lint: ^2.3.10
|
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
|
|
||||||
2
shelfsdk
2
shelfsdk
|
|
@ -1 +1 @@
|
||||||
Subproject commit e1848a42c27257146015a33e9427f197f522fe03
|
Subproject commit 34b2b98a90e3851f50f9657b1ff5bae5f385dbf9
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
||||||
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
|
#include <isar_plus_flutter_libs/isar_plus_flutter_libs_plugin.h>
|
||||||
#include <media_kit_libs_windows_audio/media_kit_libs_windows_audio_plugin_c_api.h>
|
#include <media_kit_libs_windows_audio/media_kit_libs_windows_audio_plugin_c_api.h>
|
||||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||||
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
DynamicColorPluginCApiRegisterWithRegistrar(
|
DynamicColorPluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||||
IsarFlutterLibsPluginRegisterWithRegistrar(
|
IsarPlusFlutterLibsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin"));
|
registry->GetRegistrarForPlugin("IsarPlusFlutterLibsPlugin"));
|
||||||
MediaKitLibsWindowsAudioPluginCApiRegisterWithRegistrar(
|
MediaKitLibsWindowsAudioPluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("MediaKitLibsWindowsAudioPluginCApi"));
|
registry->GetRegistrarForPlugin("MediaKitLibsWindowsAudioPluginCApi"));
|
||||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
dynamic_color
|
dynamic_color
|
||||||
isar_flutter_libs
|
isar_plus_flutter_libs
|
||||||
media_kit_libs_windows_audio
|
media_kit_libs_windows_audio
|
||||||
permission_handler_windows
|
permission_handler_windows
|
||||||
share_plus
|
share_plus
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue