mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-01-16 07:09:32 +00:00
chore: update flutter and dependencies
This commit is contained in:
parent
06694f5f0b
commit
a520136e01
80 changed files with 7701 additions and 9141 deletions
|
|
@ -6,7 +6,7 @@ part 'book_settings.g.dart';
|
|||
|
||||
/// per book settings
|
||||
@freezed
|
||||
class BookSettings with _$BookSettings {
|
||||
sealed class BookSettings with _$BookSettings {
|
||||
const factory BookSettings({
|
||||
required String bookId,
|
||||
@Default(NullablePlayerSettings()) NullablePlayerSettings playerSettings,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,195 +9,284 @@ part of 'book_settings.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
BookSettings _$BookSettingsFromJson(Map<String, dynamic> json) {
|
||||
return _BookSettings.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$BookSettings {
|
||||
String get bookId => throw _privateConstructorUsedError;
|
||||
NullablePlayerSettings get playerSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
String get bookId; NullablePlayerSettings get playerSettings;
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$BookSettingsCopyWith<BookSettings> get copyWith => _$BookSettingsCopyWithImpl<BookSettings>(this as BookSettings, _$identity);
|
||||
|
||||
/// Serializes this BookSettings to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is BookSettings&&(identical(other.bookId, bookId) || other.bookId == bookId)&&(identical(other.playerSettings, playerSettings) || other.playerSettings == playerSettings));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,bookId,playerSettings);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BookSettings(bookId: $bookId, playerSettings: $playerSettings)';
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$BookSettingsCopyWith<BookSettings> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $BookSettingsCopyWith<$Res> {
|
||||
factory $BookSettingsCopyWith(
|
||||
BookSettings value, $Res Function(BookSettings) then) =
|
||||
_$BookSettingsCopyWithImpl<$Res, BookSettings>;
|
||||
@useResult
|
||||
$Res call({String bookId, NullablePlayerSettings playerSettings});
|
||||
abstract mixin class $BookSettingsCopyWith<$Res> {
|
||||
factory $BookSettingsCopyWith(BookSettings value, $Res Function(BookSettings) _then) = _$BookSettingsCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String bookId, NullablePlayerSettings playerSettings
|
||||
});
|
||||
|
||||
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
||||
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$BookSettingsCopyWithImpl<$Res, $Val extends BookSettings>
|
||||
class _$BookSettingsCopyWithImpl<$Res>
|
||||
implements $BookSettingsCopyWith<$Res> {
|
||||
_$BookSettingsCopyWithImpl(this._value, this._then);
|
||||
_$BookSettingsCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final BookSettings _self;
|
||||
final $Res Function(BookSettings) _then;
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? bookId = null,
|
||||
Object? playerSettings = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
bookId: null == bookId
|
||||
? _value.bookId
|
||||
: bookId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
playerSettings: null == playerSettings
|
||||
? _value.playerSettings
|
||||
: playerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as NullablePlayerSettings,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings {
|
||||
return $NullablePlayerSettingsCopyWith<$Res>(_value.playerSettings,
|
||||
(value) {
|
||||
return _then(_value.copyWith(playerSettings: value) as $Val);
|
||||
});
|
||||
}
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? bookId = null,Object? playerSettings = null,}) {
|
||||
return _then(_self.copyWith(
|
||||
bookId: null == bookId ? _self.bookId : bookId // ignore: cast_nullable_to_non_nullable
|
||||
as String,playerSettings: null == playerSettings ? _self.playerSettings : playerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as NullablePlayerSettings,
|
||||
));
|
||||
}
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings {
|
||||
|
||||
return $NullablePlayerSettingsCopyWith<$Res>(_self.playerSettings, (value) {
|
||||
return _then(_self.copyWith(playerSettings: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$BookSettingsImplCopyWith<$Res>
|
||||
implements $BookSettingsCopyWith<$Res> {
|
||||
factory _$$BookSettingsImplCopyWith(
|
||||
_$BookSettingsImpl value, $Res Function(_$BookSettingsImpl) then) =
|
||||
__$$BookSettingsImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String bookId, NullablePlayerSettings playerSettings});
|
||||
|
||||
@override
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
||||
/// Adds pattern-matching-related methods to [BookSettings].
|
||||
extension BookSettingsPatterns on BookSettings {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _BookSettings value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _BookSettings value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _BookSettings value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String bookId, NullablePlayerSettings playerSettings)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings() when $default != null:
|
||||
return $default(_that.bookId,_that.playerSettings);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String bookId, NullablePlayerSettings playerSettings) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings():
|
||||
return $default(_that.bookId,_that.playerSettings);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String bookId, NullablePlayerSettings playerSettings)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _BookSettings() when $default != null:
|
||||
return $default(_that.bookId,_that.playerSettings);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$BookSettingsImplCopyWithImpl<$Res>
|
||||
extends _$BookSettingsCopyWithImpl<$Res, _$BookSettingsImpl>
|
||||
implements _$$BookSettingsImplCopyWith<$Res> {
|
||||
__$$BookSettingsImplCopyWithImpl(
|
||||
_$BookSettingsImpl _value, $Res Function(_$BookSettingsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? bookId = null,
|
||||
Object? playerSettings = null,
|
||||
}) {
|
||||
return _then(_$BookSettingsImpl(
|
||||
bookId: null == bookId
|
||||
? _value.bookId
|
||||
: bookId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
playerSettings: null == playerSettings
|
||||
? _value.playerSettings
|
||||
: playerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as NullablePlayerSettings,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$BookSettingsImpl implements _BookSettings {
|
||||
const _$BookSettingsImpl(
|
||||
{required this.bookId,
|
||||
this.playerSettings = const NullablePlayerSettings()});
|
||||
|
||||
factory _$BookSettingsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$BookSettingsImplFromJson(json);
|
||||
class _BookSettings implements BookSettings {
|
||||
const _BookSettings({required this.bookId, this.playerSettings = const NullablePlayerSettings()});
|
||||
factory _BookSettings.fromJson(Map<String, dynamic> json) => _$BookSettingsFromJson(json);
|
||||
|
||||
@override
|
||||
final String bookId;
|
||||
@override
|
||||
@JsonKey()
|
||||
final NullablePlayerSettings playerSettings;
|
||||
@override final String bookId;
|
||||
@override@JsonKey() final NullablePlayerSettings playerSettings;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BookSettings(bookId: $bookId, playerSettings: $playerSettings)';
|
||||
}
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$BookSettingsCopyWith<_BookSettings> get copyWith => __$BookSettingsCopyWithImpl<_BookSettings>(this, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$BookSettingsImpl &&
|
||||
(identical(other.bookId, bookId) || other.bookId == bookId) &&
|
||||
(identical(other.playerSettings, playerSettings) ||
|
||||
other.playerSettings == playerSettings));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, bookId, playerSettings);
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$BookSettingsImplCopyWith<_$BookSettingsImpl> get copyWith =>
|
||||
__$$BookSettingsImplCopyWithImpl<_$BookSettingsImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$BookSettingsImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$BookSettingsToJson(this, );
|
||||
}
|
||||
|
||||
abstract class _BookSettings implements BookSettings {
|
||||
const factory _BookSettings(
|
||||
{required final String bookId,
|
||||
final NullablePlayerSettings playerSettings}) = _$BookSettingsImpl;
|
||||
|
||||
factory _BookSettings.fromJson(Map<String, dynamic> json) =
|
||||
_$BookSettingsImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get bookId;
|
||||
@override
|
||||
NullablePlayerSettings get playerSettings;
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$BookSettingsImplCopyWith<_$BookSettingsImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BookSettings&&(identical(other.bookId, bookId) || other.bookId == bookId)&&(identical(other.playerSettings, playerSettings) || other.playerSettings == playerSettings));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,bookId,playerSettings);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BookSettings(bookId: $bookId, playerSettings: $playerSettings)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$BookSettingsCopyWith<$Res> implements $BookSettingsCopyWith<$Res> {
|
||||
factory _$BookSettingsCopyWith(_BookSettings value, $Res Function(_BookSettings) _then) = __$BookSettingsCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String bookId, NullablePlayerSettings playerSettings
|
||||
});
|
||||
|
||||
|
||||
@override $NullablePlayerSettingsCopyWith<$Res> get playerSettings;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$BookSettingsCopyWithImpl<$Res>
|
||||
implements _$BookSettingsCopyWith<$Res> {
|
||||
__$BookSettingsCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _BookSettings _self;
|
||||
final $Res Function(_BookSettings) _then;
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? bookId = null,Object? playerSettings = null,}) {
|
||||
return _then(_BookSettings(
|
||||
bookId: null == bookId ? _self.bookId : bookId // ignore: cast_nullable_to_non_nullable
|
||||
as String,playerSettings: null == playerSettings ? _self.playerSettings : playerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as NullablePlayerSettings,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of BookSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$NullablePlayerSettingsCopyWith<$Res> get playerSettings {
|
||||
|
||||
return $NullablePlayerSettingsCopyWith<$Res>(_self.playerSettings, (value) {
|
||||
return _then(_self.copyWith(playerSettings: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,16 +6,17 @@ part of 'book_settings.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$BookSettingsImpl _$$BookSettingsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$BookSettingsImpl(
|
||||
_BookSettings _$BookSettingsFromJson(Map<String, dynamic> json) =>
|
||||
_BookSettings(
|
||||
bookId: json['bookId'] as String,
|
||||
playerSettings: json['playerSettings'] == null
|
||||
? const NullablePlayerSettings()
|
||||
: NullablePlayerSettings.fromJson(
|
||||
json['playerSettings'] as Map<String, dynamic>),
|
||||
json['playerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$BookSettingsImplToJson(_$BookSettingsImpl instance) =>
|
||||
Map<String, dynamic> _$BookSettingsToJson(_BookSettings instance) =>
|
||||
<String, dynamic>{
|
||||
'bookId': instance.bookId,
|
||||
'playerSettings': instance.playerSettings,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ part 'nullable_player_settings.freezed.dart';
|
|||
part 'nullable_player_settings.g.dart';
|
||||
|
||||
@freezed
|
||||
class NullablePlayerSettings with _$NullablePlayerSettings {
|
||||
sealed class NullablePlayerSettings with _$NullablePlayerSettings {
|
||||
const factory NullablePlayerSettings({
|
||||
MinimizedPlayerSettings? miniPlayerSettings,
|
||||
ExpandedPlayerSettings? expandedPlayerSettings,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,369 +9,361 @@ part of 'nullable_player_settings.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
NullablePlayerSettings _$NullablePlayerSettingsFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _NullablePlayerSettings.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$NullablePlayerSettings {
|
||||
MinimizedPlayerSettings? get miniPlayerSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
ExpandedPlayerSettings? get expandedPlayerSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
double? get preferredDefaultVolume => throw _privateConstructorUsedError;
|
||||
double? get preferredDefaultSpeed => throw _privateConstructorUsedError;
|
||||
List<double>? get speedOptions => throw _privateConstructorUsedError;
|
||||
SleepTimerSettings? get sleepTimerSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
Duration? get playbackReportInterval => throw _privateConstructorUsedError;
|
||||
|
||||
MinimizedPlayerSettings? get miniPlayerSettings; ExpandedPlayerSettings? get expandedPlayerSettings; double? get preferredDefaultVolume; double? get preferredDefaultSpeed; List<double>? get speedOptions; SleepTimerSettings? get sleepTimerSettings; Duration? get playbackReportInterval;
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$NullablePlayerSettingsCopyWith<NullablePlayerSettings> get copyWith => _$NullablePlayerSettingsCopyWithImpl<NullablePlayerSettings>(this as NullablePlayerSettings, _$identity);
|
||||
|
||||
/// Serializes this NullablePlayerSettings to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is NullablePlayerSettings&&(identical(other.miniPlayerSettings, miniPlayerSettings) || other.miniPlayerSettings == miniPlayerSettings)&&(identical(other.expandedPlayerSettings, expandedPlayerSettings) || other.expandedPlayerSettings == expandedPlayerSettings)&&(identical(other.preferredDefaultVolume, preferredDefaultVolume) || other.preferredDefaultVolume == preferredDefaultVolume)&&(identical(other.preferredDefaultSpeed, preferredDefaultSpeed) || other.preferredDefaultSpeed == preferredDefaultSpeed)&&const DeepCollectionEquality().equals(other.speedOptions, speedOptions)&&(identical(other.sleepTimerSettings, sleepTimerSettings) || other.sleepTimerSettings == sleepTimerSettings)&&(identical(other.playbackReportInterval, playbackReportInterval) || other.playbackReportInterval == playbackReportInterval));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,miniPlayerSettings,expandedPlayerSettings,preferredDefaultVolume,preferredDefaultSpeed,const DeepCollectionEquality().hash(speedOptions),sleepTimerSettings,playbackReportInterval);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NullablePlayerSettings(miniPlayerSettings: $miniPlayerSettings, expandedPlayerSettings: $expandedPlayerSettings, preferredDefaultVolume: $preferredDefaultVolume, preferredDefaultSpeed: $preferredDefaultSpeed, speedOptions: $speedOptions, sleepTimerSettings: $sleepTimerSettings, playbackReportInterval: $playbackReportInterval)';
|
||||
}
|
||||
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$NullablePlayerSettingsCopyWith<NullablePlayerSettings> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $NullablePlayerSettingsCopyWith<$Res> {
|
||||
factory $NullablePlayerSettingsCopyWith(NullablePlayerSettings value,
|
||||
$Res Function(NullablePlayerSettings) then) =
|
||||
_$NullablePlayerSettingsCopyWithImpl<$Res, NullablePlayerSettings>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{MinimizedPlayerSettings? miniPlayerSettings,
|
||||
ExpandedPlayerSettings? expandedPlayerSettings,
|
||||
double? preferredDefaultVolume,
|
||||
double? preferredDefaultSpeed,
|
||||
List<double>? speedOptions,
|
||||
SleepTimerSettings? sleepTimerSettings,
|
||||
Duration? playbackReportInterval});
|
||||
abstract mixin class $NullablePlayerSettingsCopyWith<$Res> {
|
||||
factory $NullablePlayerSettingsCopyWith(NullablePlayerSettings value, $Res Function(NullablePlayerSettings) _then) = _$NullablePlayerSettingsCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval
|
||||
});
|
||||
|
||||
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
||||
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;
|
||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;
|
||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NullablePlayerSettingsCopyWithImpl<$Res,
|
||||
$Val extends NullablePlayerSettings>
|
||||
class _$NullablePlayerSettingsCopyWithImpl<$Res>
|
||||
implements $NullablePlayerSettingsCopyWith<$Res> {
|
||||
_$NullablePlayerSettingsCopyWithImpl(this._value, this._then);
|
||||
_$NullablePlayerSettingsCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final NullablePlayerSettings _self;
|
||||
final $Res Function(NullablePlayerSettings) _then;
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? miniPlayerSettings = freezed,
|
||||
Object? expandedPlayerSettings = freezed,
|
||||
Object? preferredDefaultVolume = freezed,
|
||||
Object? preferredDefaultSpeed = freezed,
|
||||
Object? speedOptions = freezed,
|
||||
Object? sleepTimerSettings = freezed,
|
||||
Object? playbackReportInterval = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
miniPlayerSettings: freezed == miniPlayerSettings
|
||||
? _value.miniPlayerSettings
|
||||
: miniPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as MinimizedPlayerSettings?,
|
||||
expandedPlayerSettings: freezed == expandedPlayerSettings
|
||||
? _value.expandedPlayerSettings
|
||||
: expandedPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as ExpandedPlayerSettings?,
|
||||
preferredDefaultVolume: freezed == preferredDefaultVolume
|
||||
? _value.preferredDefaultVolume
|
||||
: preferredDefaultVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
preferredDefaultSpeed: freezed == preferredDefaultSpeed
|
||||
? _value.preferredDefaultSpeed
|
||||
: preferredDefaultSpeed // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
speedOptions: freezed == speedOptions
|
||||
? _value.speedOptions
|
||||
: speedOptions // ignore: cast_nullable_to_non_nullable
|
||||
as List<double>?,
|
||||
sleepTimerSettings: freezed == sleepTimerSettings
|
||||
? _value.sleepTimerSettings
|
||||
: sleepTimerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as SleepTimerSettings?,
|
||||
playbackReportInterval: freezed == playbackReportInterval
|
||||
? _value.playbackReportInterval
|
||||
: playbackReportInterval // ignore: cast_nullable_to_non_nullable
|
||||
as Duration?,
|
||||
) as $Val);
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? miniPlayerSettings = freezed,Object? expandedPlayerSettings = freezed,Object? preferredDefaultVolume = freezed,Object? preferredDefaultSpeed = freezed,Object? speedOptions = freezed,Object? sleepTimerSettings = freezed,Object? playbackReportInterval = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
miniPlayerSettings: freezed == miniPlayerSettings ? _self.miniPlayerSettings : miniPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as MinimizedPlayerSettings?,expandedPlayerSettings: freezed == expandedPlayerSettings ? _self.expandedPlayerSettings : expandedPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as ExpandedPlayerSettings?,preferredDefaultVolume: freezed == preferredDefaultVolume ? _self.preferredDefaultVolume : preferredDefaultVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double?,preferredDefaultSpeed: freezed == preferredDefaultSpeed ? _self.preferredDefaultSpeed : preferredDefaultSpeed // ignore: cast_nullable_to_non_nullable
|
||||
as double?,speedOptions: freezed == speedOptions ? _self.speedOptions : speedOptions // ignore: cast_nullable_to_non_nullable
|
||||
as List<double>?,sleepTimerSettings: freezed == sleepTimerSettings ? _self.sleepTimerSettings : sleepTimerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as SleepTimerSettings?,playbackReportInterval: freezed == playbackReportInterval ? _self.playbackReportInterval : playbackReportInterval // ignore: cast_nullable_to_non_nullable
|
||||
as Duration?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings {
|
||||
if (_self.miniPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings {
|
||||
if (_value.miniPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $MinimizedPlayerSettingsCopyWith<$Res>(_value.miniPlayerSettings!,
|
||||
(value) {
|
||||
return _then(_value.copyWith(miniPlayerSettings: value) as $Val);
|
||||
});
|
||||
return $MinimizedPlayerSettingsCopyWith<$Res>(_self.miniPlayerSettings!, (value) {
|
||||
return _then(_self.copyWith(miniPlayerSettings: value));
|
||||
});
|
||||
}/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings {
|
||||
if (_self.expandedPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings {
|
||||
if (_value.expandedPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ExpandedPlayerSettingsCopyWith<$Res>(_value.expandedPlayerSettings!,
|
||||
(value) {
|
||||
return _then(_value.copyWith(expandedPlayerSettings: value) as $Val);
|
||||
});
|
||||
return $ExpandedPlayerSettingsCopyWith<$Res>(_self.expandedPlayerSettings!, (value) {
|
||||
return _then(_self.copyWith(expandedPlayerSettings: value));
|
||||
});
|
||||
}/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings {
|
||||
if (_self.sleepTimerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings {
|
||||
if (_value.sleepTimerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SleepTimerSettingsCopyWith<$Res>(_value.sleepTimerSettings!,
|
||||
(value) {
|
||||
return _then(_value.copyWith(sleepTimerSettings: value) as $Val);
|
||||
});
|
||||
}
|
||||
return $SleepTimerSettingsCopyWith<$Res>(_self.sleepTimerSettings!, (value) {
|
||||
return _then(_self.copyWith(sleepTimerSettings: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NullablePlayerSettingsImplCopyWith<$Res>
|
||||
implements $NullablePlayerSettingsCopyWith<$Res> {
|
||||
factory _$$NullablePlayerSettingsImplCopyWith(
|
||||
_$NullablePlayerSettingsImpl value,
|
||||
$Res Function(_$NullablePlayerSettingsImpl) then) =
|
||||
__$$NullablePlayerSettingsImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{MinimizedPlayerSettings? miniPlayerSettings,
|
||||
ExpandedPlayerSettings? expandedPlayerSettings,
|
||||
double? preferredDefaultVolume,
|
||||
double? preferredDefaultSpeed,
|
||||
List<double>? speedOptions,
|
||||
SleepTimerSettings? sleepTimerSettings,
|
||||
Duration? playbackReportInterval});
|
||||
|
||||
@override
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;
|
||||
@override
|
||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;
|
||||
@override
|
||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
||||
/// Adds pattern-matching-related methods to [NullablePlayerSettings].
|
||||
extension NullablePlayerSettingsPatterns on NullablePlayerSettings {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _NullablePlayerSettings value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _NullablePlayerSettings value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings():
|
||||
return $default(_that);}
|
||||
}
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _NullablePlayerSettings value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings() when $default != null:
|
||||
return $default(_that);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings() when $default != null:
|
||||
return $default(_that.miniPlayerSettings,_that.expandedPlayerSettings,_that.preferredDefaultVolume,_that.preferredDefaultSpeed,_that.speedOptions,_that.sleepTimerSettings,_that.playbackReportInterval);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
}
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings():
|
||||
return $default(_that.miniPlayerSettings,_that.expandedPlayerSettings,_that.preferredDefaultVolume,_that.preferredDefaultSpeed,_that.speedOptions,_that.sleepTimerSettings,_that.playbackReportInterval);}
|
||||
}
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _NullablePlayerSettings() when $default != null:
|
||||
return $default(_that.miniPlayerSettings,_that.expandedPlayerSettings,_that.preferredDefaultVolume,_that.preferredDefaultSpeed,_that.speedOptions,_that.sleepTimerSettings,_that.playbackReportInterval);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NullablePlayerSettingsImplCopyWithImpl<$Res>
|
||||
extends _$NullablePlayerSettingsCopyWithImpl<$Res,
|
||||
_$NullablePlayerSettingsImpl>
|
||||
implements _$$NullablePlayerSettingsImplCopyWith<$Res> {
|
||||
__$$NullablePlayerSettingsImplCopyWithImpl(
|
||||
_$NullablePlayerSettingsImpl _value,
|
||||
$Res Function(_$NullablePlayerSettingsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? miniPlayerSettings = freezed,
|
||||
Object? expandedPlayerSettings = freezed,
|
||||
Object? preferredDefaultVolume = freezed,
|
||||
Object? preferredDefaultSpeed = freezed,
|
||||
Object? speedOptions = freezed,
|
||||
Object? sleepTimerSettings = freezed,
|
||||
Object? playbackReportInterval = freezed,
|
||||
}) {
|
||||
return _then(_$NullablePlayerSettingsImpl(
|
||||
miniPlayerSettings: freezed == miniPlayerSettings
|
||||
? _value.miniPlayerSettings
|
||||
: miniPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as MinimizedPlayerSettings?,
|
||||
expandedPlayerSettings: freezed == expandedPlayerSettings
|
||||
? _value.expandedPlayerSettings
|
||||
: expandedPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as ExpandedPlayerSettings?,
|
||||
preferredDefaultVolume: freezed == preferredDefaultVolume
|
||||
? _value.preferredDefaultVolume
|
||||
: preferredDefaultVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
preferredDefaultSpeed: freezed == preferredDefaultSpeed
|
||||
? _value.preferredDefaultSpeed
|
||||
: preferredDefaultSpeed // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
speedOptions: freezed == speedOptions
|
||||
? _value._speedOptions
|
||||
: speedOptions // ignore: cast_nullable_to_non_nullable
|
||||
as List<double>?,
|
||||
sleepTimerSettings: freezed == sleepTimerSettings
|
||||
? _value.sleepTimerSettings
|
||||
: sleepTimerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as SleepTimerSettings?,
|
||||
playbackReportInterval: freezed == playbackReportInterval
|
||||
? _value.playbackReportInterval
|
||||
: playbackReportInterval // ignore: cast_nullable_to_non_nullable
|
||||
as Duration?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$NullablePlayerSettingsImpl implements _NullablePlayerSettings {
|
||||
const _$NullablePlayerSettingsImpl(
|
||||
{this.miniPlayerSettings,
|
||||
this.expandedPlayerSettings,
|
||||
this.preferredDefaultVolume,
|
||||
this.preferredDefaultSpeed,
|
||||
final List<double>? speedOptions,
|
||||
this.sleepTimerSettings,
|
||||
this.playbackReportInterval})
|
||||
: _speedOptions = speedOptions;
|
||||
|
||||
factory _$NullablePlayerSettingsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$NullablePlayerSettingsImplFromJson(json);
|
||||
class _NullablePlayerSettings implements NullablePlayerSettings {
|
||||
const _NullablePlayerSettings({this.miniPlayerSettings, this.expandedPlayerSettings, this.preferredDefaultVolume, this.preferredDefaultSpeed, final List<double>? speedOptions, this.sleepTimerSettings, this.playbackReportInterval}): _speedOptions = speedOptions;
|
||||
factory _NullablePlayerSettings.fromJson(Map<String, dynamic> json) => _$NullablePlayerSettingsFromJson(json);
|
||||
|
||||
@override
|
||||
final MinimizedPlayerSettings? miniPlayerSettings;
|
||||
@override
|
||||
final ExpandedPlayerSettings? expandedPlayerSettings;
|
||||
@override
|
||||
final double? preferredDefaultVolume;
|
||||
@override
|
||||
final double? preferredDefaultSpeed;
|
||||
final List<double>? _speedOptions;
|
||||
@override
|
||||
List<double>? get speedOptions {
|
||||
final value = _speedOptions;
|
||||
if (value == null) return null;
|
||||
if (_speedOptions is EqualUnmodifiableListView) return _speedOptions;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
@override
|
||||
final SleepTimerSettings? sleepTimerSettings;
|
||||
@override
|
||||
final Duration? playbackReportInterval;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NullablePlayerSettings(miniPlayerSettings: $miniPlayerSettings, expandedPlayerSettings: $expandedPlayerSettings, preferredDefaultVolume: $preferredDefaultVolume, preferredDefaultSpeed: $preferredDefaultSpeed, speedOptions: $speedOptions, sleepTimerSettings: $sleepTimerSettings, playbackReportInterval: $playbackReportInterval)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NullablePlayerSettingsImpl &&
|
||||
(identical(other.miniPlayerSettings, miniPlayerSettings) ||
|
||||
other.miniPlayerSettings == miniPlayerSettings) &&
|
||||
(identical(other.expandedPlayerSettings, expandedPlayerSettings) ||
|
||||
other.expandedPlayerSettings == expandedPlayerSettings) &&
|
||||
(identical(other.preferredDefaultVolume, preferredDefaultVolume) ||
|
||||
other.preferredDefaultVolume == preferredDefaultVolume) &&
|
||||
(identical(other.preferredDefaultSpeed, preferredDefaultSpeed) ||
|
||||
other.preferredDefaultSpeed == preferredDefaultSpeed) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._speedOptions, _speedOptions) &&
|
||||
(identical(other.sleepTimerSettings, sleepTimerSettings) ||
|
||||
other.sleepTimerSettings == sleepTimerSettings) &&
|
||||
(identical(other.playbackReportInterval, playbackReportInterval) ||
|
||||
other.playbackReportInterval == playbackReportInterval));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
miniPlayerSettings,
|
||||
expandedPlayerSettings,
|
||||
preferredDefaultVolume,
|
||||
preferredDefaultSpeed,
|
||||
const DeepCollectionEquality().hash(_speedOptions),
|
||||
sleepTimerSettings,
|
||||
playbackReportInterval);
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NullablePlayerSettingsImplCopyWith<_$NullablePlayerSettingsImpl>
|
||||
get copyWith => __$$NullablePlayerSettingsImplCopyWithImpl<
|
||||
_$NullablePlayerSettingsImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$NullablePlayerSettingsImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
@override final MinimizedPlayerSettings? miniPlayerSettings;
|
||||
@override final ExpandedPlayerSettings? expandedPlayerSettings;
|
||||
@override final double? preferredDefaultVolume;
|
||||
@override final double? preferredDefaultSpeed;
|
||||
final List<double>? _speedOptions;
|
||||
@override List<double>? get speedOptions {
|
||||
final value = _speedOptions;
|
||||
if (value == null) return null;
|
||||
if (_speedOptions is EqualUnmodifiableListView) return _speedOptions;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
abstract class _NullablePlayerSettings implements NullablePlayerSettings {
|
||||
const factory _NullablePlayerSettings(
|
||||
{final MinimizedPlayerSettings? miniPlayerSettings,
|
||||
final ExpandedPlayerSettings? expandedPlayerSettings,
|
||||
final double? preferredDefaultVolume,
|
||||
final double? preferredDefaultSpeed,
|
||||
final List<double>? speedOptions,
|
||||
final SleepTimerSettings? sleepTimerSettings,
|
||||
final Duration? playbackReportInterval}) = _$NullablePlayerSettingsImpl;
|
||||
@override final SleepTimerSettings? sleepTimerSettings;
|
||||
@override final Duration? playbackReportInterval;
|
||||
|
||||
factory _NullablePlayerSettings.fromJson(Map<String, dynamic> json) =
|
||||
_$NullablePlayerSettingsImpl.fromJson;
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$NullablePlayerSettingsCopyWith<_NullablePlayerSettings> get copyWith => __$NullablePlayerSettingsCopyWithImpl<_NullablePlayerSettings>(this, _$identity);
|
||||
|
||||
@override
|
||||
MinimizedPlayerSettings? get miniPlayerSettings;
|
||||
@override
|
||||
ExpandedPlayerSettings? get expandedPlayerSettings;
|
||||
@override
|
||||
double? get preferredDefaultVolume;
|
||||
@override
|
||||
double? get preferredDefaultSpeed;
|
||||
@override
|
||||
List<double>? get speedOptions;
|
||||
@override
|
||||
SleepTimerSettings? get sleepTimerSettings;
|
||||
@override
|
||||
Duration? get playbackReportInterval;
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$NullablePlayerSettingsImplCopyWith<_$NullablePlayerSettingsImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$NullablePlayerSettingsToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _NullablePlayerSettings&&(identical(other.miniPlayerSettings, miniPlayerSettings) || other.miniPlayerSettings == miniPlayerSettings)&&(identical(other.expandedPlayerSettings, expandedPlayerSettings) || other.expandedPlayerSettings == expandedPlayerSettings)&&(identical(other.preferredDefaultVolume, preferredDefaultVolume) || other.preferredDefaultVolume == preferredDefaultVolume)&&(identical(other.preferredDefaultSpeed, preferredDefaultSpeed) || other.preferredDefaultSpeed == preferredDefaultSpeed)&&const DeepCollectionEquality().equals(other._speedOptions, _speedOptions)&&(identical(other.sleepTimerSettings, sleepTimerSettings) || other.sleepTimerSettings == sleepTimerSettings)&&(identical(other.playbackReportInterval, playbackReportInterval) || other.playbackReportInterval == playbackReportInterval));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,miniPlayerSettings,expandedPlayerSettings,preferredDefaultVolume,preferredDefaultSpeed,const DeepCollectionEquality().hash(_speedOptions),sleepTimerSettings,playbackReportInterval);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NullablePlayerSettings(miniPlayerSettings: $miniPlayerSettings, expandedPlayerSettings: $expandedPlayerSettings, preferredDefaultVolume: $preferredDefaultVolume, preferredDefaultSpeed: $preferredDefaultSpeed, speedOptions: $speedOptions, sleepTimerSettings: $sleepTimerSettings, playbackReportInterval: $playbackReportInterval)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$NullablePlayerSettingsCopyWith<$Res> implements $NullablePlayerSettingsCopyWith<$Res> {
|
||||
factory _$NullablePlayerSettingsCopyWith(_NullablePlayerSettings value, $Res Function(_NullablePlayerSettings) _then) = __$NullablePlayerSettingsCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
MinimizedPlayerSettings? miniPlayerSettings, ExpandedPlayerSettings? expandedPlayerSettings, double? preferredDefaultVolume, double? preferredDefaultSpeed, List<double>? speedOptions, SleepTimerSettings? sleepTimerSettings, Duration? playbackReportInterval
|
||||
});
|
||||
|
||||
|
||||
@override $MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings;@override $ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings;@override $SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$NullablePlayerSettingsCopyWithImpl<$Res>
|
||||
implements _$NullablePlayerSettingsCopyWith<$Res> {
|
||||
__$NullablePlayerSettingsCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _NullablePlayerSettings _self;
|
||||
final $Res Function(_NullablePlayerSettings) _then;
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? miniPlayerSettings = freezed,Object? expandedPlayerSettings = freezed,Object? preferredDefaultVolume = freezed,Object? preferredDefaultSpeed = freezed,Object? speedOptions = freezed,Object? sleepTimerSettings = freezed,Object? playbackReportInterval = freezed,}) {
|
||||
return _then(_NullablePlayerSettings(
|
||||
miniPlayerSettings: freezed == miniPlayerSettings ? _self.miniPlayerSettings : miniPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as MinimizedPlayerSettings?,expandedPlayerSettings: freezed == expandedPlayerSettings ? _self.expandedPlayerSettings : expandedPlayerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as ExpandedPlayerSettings?,preferredDefaultVolume: freezed == preferredDefaultVolume ? _self.preferredDefaultVolume : preferredDefaultVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double?,preferredDefaultSpeed: freezed == preferredDefaultSpeed ? _self.preferredDefaultSpeed : preferredDefaultSpeed // ignore: cast_nullable_to_non_nullable
|
||||
as double?,speedOptions: freezed == speedOptions ? _self._speedOptions : speedOptions // ignore: cast_nullable_to_non_nullable
|
||||
as List<double>?,sleepTimerSettings: freezed == sleepTimerSettings ? _self.sleepTimerSettings : sleepTimerSettings // ignore: cast_nullable_to_non_nullable
|
||||
as SleepTimerSettings?,playbackReportInterval: freezed == playbackReportInterval ? _self.playbackReportInterval : playbackReportInterval // ignore: cast_nullable_to_non_nullable
|
||||
as Duration?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MinimizedPlayerSettingsCopyWith<$Res>? get miniPlayerSettings {
|
||||
if (_self.miniPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $MinimizedPlayerSettingsCopyWith<$Res>(_self.miniPlayerSettings!, (value) {
|
||||
return _then(_self.copyWith(miniPlayerSettings: value));
|
||||
});
|
||||
}/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ExpandedPlayerSettingsCopyWith<$Res>? get expandedPlayerSettings {
|
||||
if (_self.expandedPlayerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $ExpandedPlayerSettingsCopyWith<$Res>(_self.expandedPlayerSettings!, (value) {
|
||||
return _then(_self.copyWith(expandedPlayerSettings: value));
|
||||
});
|
||||
}/// Create a copy of NullablePlayerSettings
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SleepTimerSettingsCopyWith<$Res>? get sleepTimerSettings {
|
||||
if (_self.sleepTimerSettings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $SleepTimerSettingsCopyWith<$Res>(_self.sleepTimerSettings!, (value) {
|
||||
return _then(_self.copyWith(sleepTimerSettings: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,42 +6,42 @@ part of 'nullable_player_settings.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$NullablePlayerSettingsImpl _$$NullablePlayerSettingsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$NullablePlayerSettingsImpl(
|
||||
miniPlayerSettings: json['miniPlayerSettings'] == null
|
||||
? null
|
||||
: MinimizedPlayerSettings.fromJson(
|
||||
json['miniPlayerSettings'] as Map<String, dynamic>),
|
||||
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
||||
? null
|
||||
: ExpandedPlayerSettings.fromJson(
|
||||
json['expandedPlayerSettings'] as Map<String, dynamic>),
|
||||
preferredDefaultVolume:
|
||||
(json['preferredDefaultVolume'] as num?)?.toDouble(),
|
||||
preferredDefaultSpeed:
|
||||
(json['preferredDefaultSpeed'] as num?)?.toDouble(),
|
||||
speedOptions: (json['speedOptions'] as List<dynamic>?)
|
||||
?.map((e) => (e as num).toDouble())
|
||||
.toList(),
|
||||
sleepTimerSettings: json['sleepTimerSettings'] == null
|
||||
? null
|
||||
: SleepTimerSettings.fromJson(
|
||||
json['sleepTimerSettings'] as Map<String, dynamic>),
|
||||
playbackReportInterval: json['playbackReportInterval'] == null
|
||||
? null
|
||||
: Duration(
|
||||
microseconds: (json['playbackReportInterval'] as num).toInt()),
|
||||
);
|
||||
_NullablePlayerSettings _$NullablePlayerSettingsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _NullablePlayerSettings(
|
||||
miniPlayerSettings: json['miniPlayerSettings'] == null
|
||||
? null
|
||||
: MinimizedPlayerSettings.fromJson(
|
||||
json['miniPlayerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
expandedPlayerSettings: json['expandedPlayerSettings'] == null
|
||||
? null
|
||||
: ExpandedPlayerSettings.fromJson(
|
||||
json['expandedPlayerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
preferredDefaultVolume: (json['preferredDefaultVolume'] as num?)?.toDouble(),
|
||||
preferredDefaultSpeed: (json['preferredDefaultSpeed'] as num?)?.toDouble(),
|
||||
speedOptions: (json['speedOptions'] as List<dynamic>?)
|
||||
?.map((e) => (e as num).toDouble())
|
||||
.toList(),
|
||||
sleepTimerSettings: json['sleepTimerSettings'] == null
|
||||
? null
|
||||
: SleepTimerSettings.fromJson(
|
||||
json['sleepTimerSettings'] as Map<String, dynamic>,
|
||||
),
|
||||
playbackReportInterval: json['playbackReportInterval'] == null
|
||||
? null
|
||||
: Duration(microseconds: (json['playbackReportInterval'] as num).toInt()),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$NullablePlayerSettingsImplToJson(
|
||||
_$NullablePlayerSettingsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'miniPlayerSettings': instance.miniPlayerSettings,
|
||||
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
||||
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
||||
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
||||
'speedOptions': instance.speedOptions,
|
||||
'sleepTimerSettings': instance.sleepTimerSettings,
|
||||
'playbackReportInterval': instance.playbackReportInterval?.inMicroseconds,
|
||||
};
|
||||
Map<String, dynamic> _$NullablePlayerSettingsToJson(
|
||||
_NullablePlayerSettings instance,
|
||||
) => <String, dynamic>{
|
||||
'miniPlayerSettings': instance.miniPlayerSettings,
|
||||
'expandedPlayerSettings': instance.expandedPlayerSettings,
|
||||
'preferredDefaultVolume': instance.preferredDefaultVolume,
|
||||
'preferredDefaultSpeed': instance.preferredDefaultSpeed,
|
||||
'speedOptions': instance.speedOptions,
|
||||
'sleepTimerSettings': instance.sleepTimerSettings,
|
||||
'playbackReportInterval': instance.playbackReportInterval?.inMicroseconds,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,171 +6,102 @@ part of 'book_settings_provider.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$bookSettingsHash() => r'b976df954edf98ec6ccb3eb41e9d07dd4a9193eb';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
_SystemHash._();
|
||||
|
||||
static int combine(int hash, int value) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + value);
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
|
||||
return hash ^ (hash >> 6);
|
||||
}
|
||||
|
||||
static int finish(int hash) {
|
||||
// ignore: parameter_assignments
|
||||
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
|
||||
// ignore: parameter_assignments
|
||||
hash = hash ^ (hash >> 11);
|
||||
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _$BookSettings
|
||||
extends BuildlessAutoDisposeNotifier<model.BookSettings> {
|
||||
late final String bookId;
|
||||
|
||||
model.BookSettings build(
|
||||
String bookId,
|
||||
);
|
||||
}
|
||||
|
||||
/// See also [BookSettings].
|
||||
@ProviderFor(BookSettings)
|
||||
const bookSettingsProvider = BookSettingsFamily();
|
||||
final bookSettingsProvider = BookSettingsFamily._();
|
||||
|
||||
/// See also [BookSettings].
|
||||
class BookSettingsFamily extends Family<model.BookSettings> {
|
||||
/// See also [BookSettings].
|
||||
const BookSettingsFamily();
|
||||
final class BookSettingsProvider
|
||||
extends $NotifierProvider<BookSettings, model.BookSettings> {
|
||||
BookSettingsProvider._({
|
||||
required BookSettingsFamily super.from,
|
||||
required String super.argument,
|
||||
}) : super(
|
||||
retry: null,
|
||||
name: r'bookSettingsProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
/// See also [BookSettings].
|
||||
BookSettingsProvider call(
|
||||
String bookId,
|
||||
) {
|
||||
return BookSettingsProvider(
|
||||
bookId,
|
||||
);
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$bookSettingsHash();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return r'bookSettingsProvider'
|
||||
''
|
||||
'($argument)';
|
||||
}
|
||||
|
||||
@$internal
|
||||
@override
|
||||
BookSettingsProvider getProviderOverride(
|
||||
covariant BookSettingsProvider provider,
|
||||
) {
|
||||
return call(
|
||||
provider.bookId,
|
||||
);
|
||||
}
|
||||
BookSettings create() => BookSettings();
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
|
||||
|
||||
@override
|
||||
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
|
||||
_allTransitiveDependencies;
|
||||
|
||||
@override
|
||||
String? get name => r'bookSettingsProvider';
|
||||
}
|
||||
|
||||
/// See also [BookSettings].
|
||||
class BookSettingsProvider
|
||||
extends AutoDisposeNotifierProviderImpl<BookSettings, model.BookSettings> {
|
||||
/// See also [BookSettings].
|
||||
BookSettingsProvider(
|
||||
String bookId,
|
||||
) : this._internal(
|
||||
() => BookSettings()..bookId = bookId,
|
||||
from: bookSettingsProvider,
|
||||
name: r'bookSettingsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bookSettingsHash,
|
||||
dependencies: BookSettingsFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
BookSettingsFamily._allTransitiveDependencies,
|
||||
bookId: bookId,
|
||||
);
|
||||
|
||||
BookSettingsProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.bookId,
|
||||
}) : super.internal();
|
||||
|
||||
final String bookId;
|
||||
|
||||
@override
|
||||
model.BookSettings runNotifierBuild(
|
||||
covariant BookSettings notifier,
|
||||
) {
|
||||
return notifier.build(
|
||||
bookId,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Override overrideWith(BookSettings Function() create) {
|
||||
return ProviderOverride(
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(model.BookSettings value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
override: BookSettingsProvider._internal(
|
||||
() => create()..bookId = bookId,
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
bookId: bookId,
|
||||
),
|
||||
providerOverride: $SyncValueProvider<model.BookSettings>(value),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeNotifierProviderElement<BookSettings, model.BookSettings>
|
||||
createElement() {
|
||||
return _BookSettingsProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is BookSettingsProvider && other.bookId == bookId;
|
||||
return other is BookSettingsProvider && other.argument == argument;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, bookId.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
return argument.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin BookSettingsRef on AutoDisposeNotifierProviderRef<model.BookSettings> {
|
||||
/// The parameter `bookId` of this provider.
|
||||
String get bookId;
|
||||
}
|
||||
String _$bookSettingsHash() => r'b976df954edf98ec6ccb3eb41e9d07dd4a9193eb';
|
||||
|
||||
class _BookSettingsProviderElement
|
||||
extends AutoDisposeNotifierProviderElement<BookSettings, model.BookSettings>
|
||||
with BookSettingsRef {
|
||||
_BookSettingsProviderElement(super.provider);
|
||||
final class BookSettingsFamily extends $Family
|
||||
with
|
||||
$ClassFamilyOverride<
|
||||
BookSettings,
|
||||
model.BookSettings,
|
||||
model.BookSettings,
|
||||
model.BookSettings,
|
||||
String
|
||||
> {
|
||||
BookSettingsFamily._()
|
||||
: super(
|
||||
retry: null,
|
||||
name: r'bookSettingsProvider',
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
isAutoDispose: true,
|
||||
);
|
||||
|
||||
BookSettingsProvider call(String bookId) =>
|
||||
BookSettingsProvider._(argument: bookId, from: this);
|
||||
|
||||
@override
|
||||
String get bookId => (origin as BookSettingsProvider).bookId;
|
||||
String toString() => r'bookSettingsProvider';
|
||||
}
|
||||
|
||||
abstract class _$BookSettings extends $Notifier<model.BookSettings> {
|
||||
late final _$args = ref.$arg as String;
|
||||
String get bookId => _$args;
|
||||
|
||||
model.BookSettings build(String bookId);
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final ref = this.ref as $Ref<model.BookSettings, model.BookSettings>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<model.BookSettings, model.BookSettings>,
|
||||
model.BookSettings,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleCreate(ref, () => build(_$args));
|
||||
}
|
||||
}
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue