chore:cleanup-packages breaking: remove isar (#474)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-08-24 21:16:51 +02:00 committed by GitHub
parent ab6182f69d
commit 6357b9843c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
81 changed files with 31400 additions and 25673 deletions

View file

@ -3,7 +3,7 @@ import 'package:freezed_annotation/freezed_annotation.dart';
part 'arguments_model.freezed.dart';
@freezed
class ArgumentsModel with _$ArgumentsModel {
abstract class ArgumentsModel with _$ArgumentsModel {
const ArgumentsModel._();
factory ArgumentsModel({

View file

@ -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,20 +9,180 @@ part of 'arguments_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$ArgumentsModel {
bool get htpcMode => throw _privateConstructorUsedError;
bool get htpcMode;
@override
String toString() {
return 'ArgumentsModel(htpcMode: $htpcMode)';
}
}
/// Adds pattern-matching-related methods to [ArgumentsModel].
extension ArgumentsModelPatterns on ArgumentsModel {
/// 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(_ArgumentsModel value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ArgumentsModel() 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(_ArgumentsModel value) $default,
) {
final _that = this;
switch (_that) {
case _ArgumentsModel():
return $default(_that);
case _:
throw StateError('Unexpected subclass');
}
}
/// 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(_ArgumentsModel value)? $default,
) {
final _that = this;
switch (_that) {
case _ArgumentsModel() 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(bool htpcMode)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ArgumentsModel() when $default != null:
return $default(_that.htpcMode);
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(bool htpcMode) $default,
) {
final _that = this;
switch (_that) {
case _ArgumentsModel():
return $default(_that.htpcMode);
case _:
throw StateError('Unexpected subclass');
}
}
/// 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(bool htpcMode)? $default,
) {
final _that = this;
switch (_that) {
case _ArgumentsModel() when $default != null:
return $default(_that.htpcMode);
case _:
return null;
}
}
}
/// @nodoc
class _$ArgumentsModelImpl extends _ArgumentsModel {
_$ArgumentsModelImpl({this.htpcMode = false}) : super._();
class _ArgumentsModel extends ArgumentsModel {
_ArgumentsModel({this.htpcMode = false}) : super._();
@override
@JsonKey()
@ -34,10 +194,4 @@ class _$ArgumentsModelImpl extends _ArgumentsModel {
}
}
abstract class _ArgumentsModel extends ArgumentsModel {
factory _ArgumentsModel({final bool htpcMode}) = _$ArgumentsModelImpl;
_ArgumentsModel._() : super._();
@override
bool get htpcMode;
}
// dart format on

View file

@ -51,7 +51,7 @@ enum BackgroundType {
}
@Freezed(copyWith: true)
class ClientSettingsModel with _$ClientSettingsModel {
abstract class ClientSettingsModel with _$ClientSettingsModel {
const ClientSettingsModel._();
factory ClientSettingsModel({

File diff suppressed because it is too large Load diff

View file

@ -6,9 +6,8 @@ part of 'client_settings_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson(
Map<String, dynamic> json) =>
_$ClientSettingsModelImpl(
_ClientSettingsModel _$ClientSettingsModelFromJson(Map<String, dynamic> json) =>
_ClientSettingsModel(
syncPath: json['syncPath'] as String?,
position: json['position'] == null
? const Vector2(x: 0, y: 0)
@ -55,8 +54,8 @@ _$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson(
const {},
);
Map<String, dynamic> _$$ClientSettingsModelImplToJson(
_$ClientSettingsModelImpl instance) =>
Map<String, dynamic> _$ClientSettingsModelToJson(
_ClientSettingsModel instance) =>
<String, dynamic>{
'syncPath': instance.syncPath,
'position': instance.position,

View file

@ -9,7 +9,7 @@ part 'home_settings_model.freezed.dart';
part 'home_settings_model.g.dart';
@Freezed(copyWith: true)
class HomeSettingsModel with _$HomeSettingsModel {
abstract class HomeSettingsModel with _$HomeSettingsModel {
factory HomeSettingsModel({
@Default({...LayoutMode.values}) Set<LayoutMode> screenLayouts,
@Default({...ViewSize.values}) Set<ViewSize> layoutStates,

View file

@ -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,101 +9,39 @@ part of 'home_settings_model.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');
HomeSettingsModel _$HomeSettingsModelFromJson(Map<String, dynamic> json) {
return _HomeSettingsModel.fromJson(json);
}
/// @nodoc
mixin _$HomeSettingsModel {
Set<LayoutMode> get screenLayouts => throw _privateConstructorUsedError;
Set<ViewSize> get layoutStates => throw _privateConstructorUsedError;
HomeBanner get homeBanner => throw _privateConstructorUsedError;
HomeCarouselSettings get carouselSettings =>
throw _privateConstructorUsedError;
HomeNextUp get nextUp => throw _privateConstructorUsedError;
/// Serializes this HomeSettingsModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Set<LayoutMode> get screenLayouts;
Set<ViewSize> get layoutStates;
HomeBanner get homeBanner;
HomeCarouselSettings get carouselSettings;
HomeNextUp get nextUp;
/// Create a copy of HomeSettingsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$HomeSettingsModelCopyWith<HomeSettingsModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $HomeSettingsModelCopyWith<$Res> {
factory $HomeSettingsModelCopyWith(
HomeSettingsModel value, $Res Function(HomeSettingsModel) then) =
_$HomeSettingsModelCopyWithImpl<$Res, HomeSettingsModel>;
@useResult
$Res call(
{Set<LayoutMode> screenLayouts,
Set<ViewSize> layoutStates,
HomeBanner homeBanner,
HomeCarouselSettings carouselSettings,
HomeNextUp nextUp});
}
/// @nodoc
class _$HomeSettingsModelCopyWithImpl<$Res, $Val extends HomeSettingsModel>
implements $HomeSettingsModelCopyWith<$Res> {
_$HomeSettingsModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of HomeSettingsModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
$HomeSettingsModelCopyWith<HomeSettingsModel> get copyWith =>
_$HomeSettingsModelCopyWithImpl<HomeSettingsModel>(
this as HomeSettingsModel, _$identity);
/// Serializes this HomeSettingsModel to a JSON map.
Map<String, dynamic> toJson();
@override
$Res call({
Object? screenLayouts = null,
Object? layoutStates = null,
Object? homeBanner = null,
Object? carouselSettings = null,
Object? nextUp = null,
}) {
return _then(_value.copyWith(
screenLayouts: null == screenLayouts
? _value.screenLayouts
: screenLayouts // ignore: cast_nullable_to_non_nullable
as Set<LayoutMode>,
layoutStates: null == layoutStates
? _value.layoutStates
: layoutStates // ignore: cast_nullable_to_non_nullable
as Set<ViewSize>,
homeBanner: null == homeBanner
? _value.homeBanner
: homeBanner // ignore: cast_nullable_to_non_nullable
as HomeBanner,
carouselSettings: null == carouselSettings
? _value.carouselSettings
: carouselSettings // ignore: cast_nullable_to_non_nullable
as HomeCarouselSettings,
nextUp: null == nextUp
? _value.nextUp
: nextUp // ignore: cast_nullable_to_non_nullable
as HomeNextUp,
) as $Val);
String toString() {
return 'HomeSettingsModel(screenLayouts: $screenLayouts, layoutStates: $layoutStates, homeBanner: $homeBanner, carouselSettings: $carouselSettings, nextUp: $nextUp)';
}
}
/// @nodoc
abstract class _$$HomeSettingsModelImplCopyWith<$Res>
implements $HomeSettingsModelCopyWith<$Res> {
factory _$$HomeSettingsModelImplCopyWith(_$HomeSettingsModelImpl value,
$Res Function(_$HomeSettingsModelImpl) then) =
__$$HomeSettingsModelImplCopyWithImpl<$Res>;
@override
abstract mixin class $HomeSettingsModelCopyWith<$Res> {
factory $HomeSettingsModelCopyWith(
HomeSettingsModel value, $Res Function(HomeSettingsModel) _then) =
_$HomeSettingsModelCopyWithImpl;
@useResult
$Res call(
{Set<LayoutMode> screenLayouts,
@ -114,12 +52,12 @@ abstract class _$$HomeSettingsModelImplCopyWith<$Res>
}
/// @nodoc
class __$$HomeSettingsModelImplCopyWithImpl<$Res>
extends _$HomeSettingsModelCopyWithImpl<$Res, _$HomeSettingsModelImpl>
implements _$$HomeSettingsModelImplCopyWith<$Res> {
__$$HomeSettingsModelImplCopyWithImpl(_$HomeSettingsModelImpl _value,
$Res Function(_$HomeSettingsModelImpl) _then)
: super(_value, _then);
class _$HomeSettingsModelCopyWithImpl<$Res>
implements $HomeSettingsModelCopyWith<$Res> {
_$HomeSettingsModelCopyWithImpl(this._self, this._then);
final HomeSettingsModel _self;
final $Res Function(HomeSettingsModel) _then;
/// Create a copy of HomeSettingsModel
/// with the given fields replaced by the non-null parameter values.
@ -132,35 +70,213 @@ class __$$HomeSettingsModelImplCopyWithImpl<$Res>
Object? carouselSettings = null,
Object? nextUp = null,
}) {
return _then(_$HomeSettingsModelImpl(
return _then(_self.copyWith(
screenLayouts: null == screenLayouts
? _value._screenLayouts
? _self.screenLayouts
: screenLayouts // ignore: cast_nullable_to_non_nullable
as Set<LayoutMode>,
layoutStates: null == layoutStates
? _value._layoutStates
? _self.layoutStates
: layoutStates // ignore: cast_nullable_to_non_nullable
as Set<ViewSize>,
homeBanner: null == homeBanner
? _value.homeBanner
? _self.homeBanner
: homeBanner // ignore: cast_nullable_to_non_nullable
as HomeBanner,
carouselSettings: null == carouselSettings
? _value.carouselSettings
? _self.carouselSettings
: carouselSettings // ignore: cast_nullable_to_non_nullable
as HomeCarouselSettings,
nextUp: null == nextUp
? _value.nextUp
? _self.nextUp
: nextUp // ignore: cast_nullable_to_non_nullable
as HomeNextUp,
));
}
}
/// Adds pattern-matching-related methods to [HomeSettingsModel].
extension HomeSettingsModelPatterns on HomeSettingsModel {
/// 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(_HomeSettingsModel value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _HomeSettingsModel() 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(_HomeSettingsModel value) $default,
) {
final _that = this;
switch (_that) {
case _HomeSettingsModel():
return $default(_that);
case _:
throw StateError('Unexpected subclass');
}
}
/// 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(_HomeSettingsModel value)? $default,
) {
final _that = this;
switch (_that) {
case _HomeSettingsModel() 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(
Set<LayoutMode> screenLayouts,
Set<ViewSize> layoutStates,
HomeBanner homeBanner,
HomeCarouselSettings carouselSettings,
HomeNextUp nextUp)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _HomeSettingsModel() when $default != null:
return $default(_that.screenLayouts, _that.layoutStates,
_that.homeBanner, _that.carouselSettings, _that.nextUp);
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(
Set<LayoutMode> screenLayouts,
Set<ViewSize> layoutStates,
HomeBanner homeBanner,
HomeCarouselSettings carouselSettings,
HomeNextUp nextUp)
$default,
) {
final _that = this;
switch (_that) {
case _HomeSettingsModel():
return $default(_that.screenLayouts, _that.layoutStates,
_that.homeBanner, _that.carouselSettings, _that.nextUp);
case _:
throw StateError('Unexpected subclass');
}
}
/// 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(
Set<LayoutMode> screenLayouts,
Set<ViewSize> layoutStates,
HomeBanner homeBanner,
HomeCarouselSettings carouselSettings,
HomeNextUp nextUp)?
$default,
) {
final _that = this;
switch (_that) {
case _HomeSettingsModel() when $default != null:
return $default(_that.screenLayouts, _that.layoutStates,
_that.homeBanner, _that.carouselSettings, _that.nextUp);
case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _$HomeSettingsModelImpl implements _HomeSettingsModel {
_$HomeSettingsModelImpl(
class _HomeSettingsModel implements HomeSettingsModel {
_HomeSettingsModel(
{final Set<LayoutMode> screenLayouts = const {...LayoutMode.values},
final Set<ViewSize> layoutStates = const {...ViewSize.values},
this.homeBanner = HomeBanner.carousel,
@ -168,9 +284,8 @@ class _$HomeSettingsModelImpl implements _HomeSettingsModel {
this.nextUp = HomeNextUp.separate})
: _screenLayouts = screenLayouts,
_layoutStates = layoutStates;
factory _$HomeSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
_$$HomeSettingsModelImplFromJson(json);
factory _HomeSettingsModel.fromJson(Map<String, dynamic> json) =>
_$HomeSettingsModelFromJson(json);
final Set<LayoutMode> _screenLayouts;
@override
@ -200,54 +315,85 @@ class _$HomeSettingsModelImpl implements _HomeSettingsModel {
@JsonKey()
final HomeNextUp nextUp;
/// Create a copy of HomeSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$HomeSettingsModelCopyWith<_HomeSettingsModel> get copyWith =>
__$HomeSettingsModelCopyWithImpl<_HomeSettingsModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$HomeSettingsModelToJson(
this,
);
}
@override
String toString() {
return 'HomeSettingsModel(screenLayouts: $screenLayouts, layoutStates: $layoutStates, homeBanner: $homeBanner, carouselSettings: $carouselSettings, nextUp: $nextUp)';
}
}
/// @nodoc
abstract mixin class _$HomeSettingsModelCopyWith<$Res>
implements $HomeSettingsModelCopyWith<$Res> {
factory _$HomeSettingsModelCopyWith(
_HomeSettingsModel value, $Res Function(_HomeSettingsModel) _then) =
__$HomeSettingsModelCopyWithImpl;
@override
@useResult
$Res call(
{Set<LayoutMode> screenLayouts,
Set<ViewSize> layoutStates,
HomeBanner homeBanner,
HomeCarouselSettings carouselSettings,
HomeNextUp nextUp});
}
/// @nodoc
class __$HomeSettingsModelCopyWithImpl<$Res>
implements _$HomeSettingsModelCopyWith<$Res> {
__$HomeSettingsModelCopyWithImpl(this._self, this._then);
final _HomeSettingsModel _self;
final $Res Function(_HomeSettingsModel) _then;
/// Create a copy of HomeSettingsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$HomeSettingsModelImplCopyWith<_$HomeSettingsModelImpl> get copyWith =>
__$$HomeSettingsModelImplCopyWithImpl<_$HomeSettingsModelImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$HomeSettingsModelImplToJson(
this,
);
$Res call({
Object? screenLayouts = null,
Object? layoutStates = null,
Object? homeBanner = null,
Object? carouselSettings = null,
Object? nextUp = null,
}) {
return _then(_HomeSettingsModel(
screenLayouts: null == screenLayouts
? _self._screenLayouts
: screenLayouts // ignore: cast_nullable_to_non_nullable
as Set<LayoutMode>,
layoutStates: null == layoutStates
? _self._layoutStates
: layoutStates // ignore: cast_nullable_to_non_nullable
as Set<ViewSize>,
homeBanner: null == homeBanner
? _self.homeBanner
: homeBanner // ignore: cast_nullable_to_non_nullable
as HomeBanner,
carouselSettings: null == carouselSettings
? _self.carouselSettings
: carouselSettings // ignore: cast_nullable_to_non_nullable
as HomeCarouselSettings,
nextUp: null == nextUp
? _self.nextUp
: nextUp // ignore: cast_nullable_to_non_nullable
as HomeNextUp,
));
}
}
abstract class _HomeSettingsModel implements HomeSettingsModel {
factory _HomeSettingsModel(
{final Set<LayoutMode> screenLayouts,
final Set<ViewSize> layoutStates,
final HomeBanner homeBanner,
final HomeCarouselSettings carouselSettings,
final HomeNextUp nextUp}) = _$HomeSettingsModelImpl;
factory _HomeSettingsModel.fromJson(Map<String, dynamic> json) =
_$HomeSettingsModelImpl.fromJson;
@override
Set<LayoutMode> get screenLayouts;
@override
Set<ViewSize> get layoutStates;
@override
HomeBanner get homeBanner;
@override
HomeCarouselSettings get carouselSettings;
@override
HomeNextUp get nextUp;
/// Create a copy of HomeSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$HomeSettingsModelImplCopyWith<_$HomeSettingsModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
// dart format on

View file

@ -6,9 +6,8 @@ part of 'home_settings_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$HomeSettingsModelImpl _$$HomeSettingsModelImplFromJson(
Map<String, dynamic> json) =>
_$HomeSettingsModelImpl(
_HomeSettingsModel _$HomeSettingsModelFromJson(Map<String, dynamic> json) =>
_HomeSettingsModel(
screenLayouts: (json['screenLayouts'] as List<dynamic>?)
?.map((e) => $enumDecode(_$LayoutModeEnumMap, e))
.toSet() ??
@ -27,8 +26,7 @@ _$HomeSettingsModelImpl _$$HomeSettingsModelImplFromJson(
HomeNextUp.separate,
);
Map<String, dynamic> _$$HomeSettingsModelImplToJson(
_$HomeSettingsModelImpl instance) =>
Map<String, dynamic> _$HomeSettingsModelToJson(_HomeSettingsModel instance) =>
<String, dynamic>{
'screenLayouts':
instance.screenLayouts.map((e) => _$LayoutModeEnumMap[e]!).toList(),

View file

@ -8,7 +8,7 @@ part 'key_combinations.freezed.dart';
part 'key_combinations.g.dart';
@Freezed(toJson: true, fromJson: true, copyWith: true)
class KeyCombination with _$KeyCombination {
abstract class KeyCombination with _$KeyCombination {
const KeyCombination._();
factory KeyCombination({

View file

@ -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,97 +9,42 @@ part of 'key_combinations.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');
KeyCombination _$KeyCombinationFromJson(Map<String, dynamic> json) {
return _KeyCombination.fromJson(json);
}
/// @nodoc
mixin _$KeyCombination {
@LogicalKeyboardSerializer()
LogicalKeyboardKey? get key => throw _privateConstructorUsedError;
LogicalKeyboardKey? get key;
@LogicalKeyboardSerializer()
LogicalKeyboardKey? get modifier => throw _privateConstructorUsedError;
LogicalKeyboardKey? get modifier;
@LogicalKeyboardSerializer()
LogicalKeyboardKey? get altKey => throw _privateConstructorUsedError;
LogicalKeyboardKey? get altKey;
@LogicalKeyboardSerializer()
LogicalKeyboardKey? get altModifier => throw _privateConstructorUsedError;
/// Serializes this KeyCombination to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
LogicalKeyboardKey? get altModifier;
/// Create a copy of KeyCombination
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$KeyCombinationCopyWith<KeyCombination> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $KeyCombinationCopyWith<$Res> {
factory $KeyCombinationCopyWith(
KeyCombination value, $Res Function(KeyCombination) then) =
_$KeyCombinationCopyWithImpl<$Res, KeyCombination>;
@useResult
$Res call(
{@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier});
}
/// @nodoc
class _$KeyCombinationCopyWithImpl<$Res, $Val extends KeyCombination>
implements $KeyCombinationCopyWith<$Res> {
_$KeyCombinationCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of KeyCombination
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
$KeyCombinationCopyWith<KeyCombination> get copyWith =>
_$KeyCombinationCopyWithImpl<KeyCombination>(
this as KeyCombination, _$identity);
/// Serializes this KeyCombination to a JSON map.
Map<String, dynamic> toJson();
@override
$Res call({
Object? key = freezed,
Object? modifier = freezed,
Object? altKey = freezed,
Object? altModifier = freezed,
}) {
return _then(_value.copyWith(
key: freezed == key
? _value.key
: key // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
modifier: freezed == modifier
? _value.modifier
: modifier // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
altKey: freezed == altKey
? _value.altKey
: altKey // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
altModifier: freezed == altModifier
? _value.altModifier
: altModifier // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
) as $Val);
String toString() {
return 'KeyCombination(key: $key, modifier: $modifier, altKey: $altKey, altModifier: $altModifier)';
}
}
/// @nodoc
abstract class _$$KeyCombinationImplCopyWith<$Res>
implements $KeyCombinationCopyWith<$Res> {
factory _$$KeyCombinationImplCopyWith(_$KeyCombinationImpl value,
$Res Function(_$KeyCombinationImpl) then) =
__$$KeyCombinationImplCopyWithImpl<$Res>;
@override
abstract mixin class $KeyCombinationCopyWith<$Res> {
factory $KeyCombinationCopyWith(
KeyCombination value, $Res Function(KeyCombination) _then) =
_$KeyCombinationCopyWithImpl;
@useResult
$Res call(
{@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
@ -109,12 +54,12 @@ abstract class _$$KeyCombinationImplCopyWith<$Res>
}
/// @nodoc
class __$$KeyCombinationImplCopyWithImpl<$Res>
extends _$KeyCombinationCopyWithImpl<$Res, _$KeyCombinationImpl>
implements _$$KeyCombinationImplCopyWith<$Res> {
__$$KeyCombinationImplCopyWithImpl(
_$KeyCombinationImpl _value, $Res Function(_$KeyCombinationImpl) _then)
: super(_value, _then);
class _$KeyCombinationCopyWithImpl<$Res>
implements $KeyCombinationCopyWith<$Res> {
_$KeyCombinationCopyWithImpl(this._self, this._then);
final KeyCombination _self;
final $Res Function(KeyCombination) _then;
/// Create a copy of KeyCombination
/// with the given fields replaced by the non-null parameter values.
@ -126,39 +71,213 @@ class __$$KeyCombinationImplCopyWithImpl<$Res>
Object? altKey = freezed,
Object? altModifier = freezed,
}) {
return _then(_$KeyCombinationImpl(
return _then(_self.copyWith(
key: freezed == key
? _value.key
? _self.key
: key // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
modifier: freezed == modifier
? _value.modifier
? _self.modifier
: modifier // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
altKey: freezed == altKey
? _value.altKey
? _self.altKey
: altKey // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
altModifier: freezed == altModifier
? _value.altModifier
? _self.altModifier
: altModifier // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
));
}
}
/// Adds pattern-matching-related methods to [KeyCombination].
extension KeyCombinationPatterns on KeyCombination {
/// 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(_KeyCombination value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _KeyCombination() 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(_KeyCombination value) $default,
) {
final _that = this;
switch (_that) {
case _KeyCombination():
return $default(_that);
case _:
throw StateError('Unexpected subclass');
}
}
/// 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(_KeyCombination value)? $default,
) {
final _that = this;
switch (_that) {
case _KeyCombination() 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(
@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _KeyCombination() when $default != null:
return $default(
_that.key, _that.modifier, _that.altKey, _that.altModifier);
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(
@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier)
$default,
) {
final _that = this;
switch (_that) {
case _KeyCombination():
return $default(
_that.key, _that.modifier, _that.altKey, _that.altModifier);
case _:
throw StateError('Unexpected subclass');
}
}
/// 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(
@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier)?
$default,
) {
final _that = this;
switch (_that) {
case _KeyCombination() when $default != null:
return $default(
_that.key, _that.modifier, _that.altKey, _that.altModifier);
case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _$KeyCombinationImpl extends _KeyCombination {
_$KeyCombinationImpl(
class _KeyCombination extends KeyCombination {
_KeyCombination(
{@LogicalKeyboardSerializer() this.key,
@LogicalKeyboardSerializer() this.modifier,
@LogicalKeyboardSerializer() this.altKey,
@LogicalKeyboardSerializer() this.altModifier})
: super._();
factory _$KeyCombinationImpl.fromJson(Map<String, dynamic> json) =>
_$$KeyCombinationImplFromJson(json);
factory _KeyCombination.fromJson(Map<String, dynamic> json) =>
_$KeyCombinationFromJson(json);
@override
@LogicalKeyboardSerializer()
@ -173,57 +292,79 @@ class _$KeyCombinationImpl extends _KeyCombination {
@LogicalKeyboardSerializer()
final LogicalKeyboardKey? altModifier;
/// Create a copy of KeyCombination
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$KeyCombinationCopyWith<_KeyCombination> get copyWith =>
__$KeyCombinationCopyWithImpl<_KeyCombination>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$KeyCombinationToJson(
this,
);
}
@override
String toString() {
return 'KeyCombination(key: $key, modifier: $modifier, altKey: $altKey, altModifier: $altModifier)';
}
}
/// @nodoc
abstract mixin class _$KeyCombinationCopyWith<$Res>
implements $KeyCombinationCopyWith<$Res> {
factory _$KeyCombinationCopyWith(
_KeyCombination value, $Res Function(_KeyCombination) _then) =
__$KeyCombinationCopyWithImpl;
@override
@useResult
$Res call(
{@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier});
}
/// @nodoc
class __$KeyCombinationCopyWithImpl<$Res>
implements _$KeyCombinationCopyWith<$Res> {
__$KeyCombinationCopyWithImpl(this._self, this._then);
final _KeyCombination _self;
final $Res Function(_KeyCombination) _then;
/// Create a copy of KeyCombination
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$KeyCombinationImplCopyWith<_$KeyCombinationImpl> get copyWith =>
__$$KeyCombinationImplCopyWithImpl<_$KeyCombinationImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$KeyCombinationImplToJson(
this,
);
$Res call({
Object? key = freezed,
Object? modifier = freezed,
Object? altKey = freezed,
Object? altModifier = freezed,
}) {
return _then(_KeyCombination(
key: freezed == key
? _self.key
: key // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
modifier: freezed == modifier
? _self.modifier
: modifier // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
altKey: freezed == altKey
? _self.altKey
: altKey // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
altModifier: freezed == altModifier
? _self.altModifier
: altModifier // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?,
));
}
}
abstract class _KeyCombination extends KeyCombination {
factory _KeyCombination(
{@LogicalKeyboardSerializer() final LogicalKeyboardKey? key,
@LogicalKeyboardSerializer() final LogicalKeyboardKey? modifier,
@LogicalKeyboardSerializer() final LogicalKeyboardKey? altKey,
@LogicalKeyboardSerializer() final LogicalKeyboardKey? altModifier}) =
_$KeyCombinationImpl;
_KeyCombination._() : super._();
factory _KeyCombination.fromJson(Map<String, dynamic> json) =
_$KeyCombinationImpl.fromJson;
@override
@LogicalKeyboardSerializer()
LogicalKeyboardKey? get key;
@override
@LogicalKeyboardSerializer()
LogicalKeyboardKey? get modifier;
@override
@LogicalKeyboardSerializer()
LogicalKeyboardKey? get altKey;
@override
@LogicalKeyboardSerializer()
LogicalKeyboardKey? get altModifier;
/// Create a copy of KeyCombination
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$KeyCombinationImplCopyWith<_$KeyCombinationImpl> get copyWith =>
throw _privateConstructorUsedError;
}
// dart format on

View file

@ -6,8 +6,8 @@ part of 'key_combinations.dart';
// JsonSerializableGenerator
// **************************************************************************
_$KeyCombinationImpl _$$KeyCombinationImplFromJson(Map<String, dynamic> json) =>
_$KeyCombinationImpl(
_KeyCombination _$KeyCombinationFromJson(Map<String, dynamic> json) =>
_KeyCombination(
key: _$JsonConverterFromJson<String, LogicalKeyboardKey>(
json['key'], const LogicalKeyboardSerializer().fromJson),
modifier: _$JsonConverterFromJson<String, LogicalKeyboardKey>(
@ -18,8 +18,7 @@ _$KeyCombinationImpl _$$KeyCombinationImplFromJson(Map<String, dynamic> json) =>
json['altModifier'], const LogicalKeyboardSerializer().fromJson),
);
Map<String, dynamic> _$$KeyCombinationImplToJson(
_$KeyCombinationImpl instance) =>
Map<String, dynamic> _$KeyCombinationToJson(_KeyCombination instance) =>
<String, dynamic>{
'key': _$JsonConverterToJson<String, LogicalKeyboardKey>(
instance.key, const LogicalKeyboardSerializer().toJson),

View file

@ -50,7 +50,7 @@ enum VideoHotKeys {
}
@Freezed(copyWith: true)
class VideoPlayerSettingsModel with _$VideoPlayerSettingsModel {
abstract class VideoPlayerSettingsModel with _$VideoPlayerSettingsModel {
const VideoPlayerSettingsModel._();
factory VideoPlayerSettingsModel({

View file

@ -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,176 +9,70 @@ part of 'video_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');
VideoPlayerSettingsModel _$VideoPlayerSettingsModelFromJson(
Map<String, dynamic> json) {
return _VideoPlayerSettingsModel.fromJson(json);
}
/// @nodoc
mixin _$VideoPlayerSettingsModel {
double? get screenBrightness => throw _privateConstructorUsedError;
BoxFit get videoFit => throw _privateConstructorUsedError;
bool get fillScreen => throw _privateConstructorUsedError;
bool get hardwareAccel => throw _privateConstructorUsedError;
bool get useLibass => throw _privateConstructorUsedError;
int get bufferSize => throw _privateConstructorUsedError;
PlayerOptions? get playerOptions => throw _privateConstructorUsedError;
double get internalVolume => throw _privateConstructorUsedError;
Set<DeviceOrientation>? get allowedOrientations =>
throw _privateConstructorUsedError;
AutoNextType get nextVideoType => throw _privateConstructorUsedError;
Bitrate get maxHomeBitrate => throw _privateConstructorUsedError;
Bitrate get maxInternetBitrate => throw _privateConstructorUsedError;
String? get audioDevice => throw _privateConstructorUsedError;
Map<MediaSegmentType, SegmentSkip> get segmentSkipSettings =>
throw _privateConstructorUsedError;
Map<VideoHotKeys, KeyCombination> get hotKeys =>
throw _privateConstructorUsedError;
/// Serializes this VideoPlayerSettingsModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
mixin _$VideoPlayerSettingsModel implements DiagnosticableTreeMixin {
double? get screenBrightness;
BoxFit get videoFit;
bool get fillScreen;
bool get hardwareAccel;
bool get useLibass;
int get bufferSize;
PlayerOptions? get playerOptions;
double get internalVolume;
Set<DeviceOrientation>? get allowedOrientations;
AutoNextType get nextVideoType;
Bitrate get maxHomeBitrate;
Bitrate get maxInternetBitrate;
String? get audioDevice;
Map<MediaSegmentType, SegmentSkip> get segmentSkipSettings;
Map<VideoHotKeys, KeyCombination> get hotKeys;
/// Create a copy of VideoPlayerSettingsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$VideoPlayerSettingsModelCopyWith<VideoPlayerSettingsModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $VideoPlayerSettingsModelCopyWith<$Res> {
factory $VideoPlayerSettingsModelCopyWith(VideoPlayerSettingsModel value,
$Res Function(VideoPlayerSettingsModel) then) =
_$VideoPlayerSettingsModelCopyWithImpl<$Res, VideoPlayerSettingsModel>;
@useResult
$Res call(
{double? screenBrightness,
BoxFit videoFit,
bool fillScreen,
bool hardwareAccel,
bool useLibass,
int bufferSize,
PlayerOptions? playerOptions,
double internalVolume,
Set<DeviceOrientation>? allowedOrientations,
AutoNextType nextVideoType,
Bitrate maxHomeBitrate,
Bitrate maxInternetBitrate,
String? audioDevice,
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
Map<VideoHotKeys, KeyCombination> hotKeys});
}
/// @nodoc
class _$VideoPlayerSettingsModelCopyWithImpl<$Res,
$Val extends VideoPlayerSettingsModel>
implements $VideoPlayerSettingsModelCopyWith<$Res> {
_$VideoPlayerSettingsModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of VideoPlayerSettingsModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
$VideoPlayerSettingsModelCopyWith<VideoPlayerSettingsModel> get copyWith =>
_$VideoPlayerSettingsModelCopyWithImpl<VideoPlayerSettingsModel>(
this as VideoPlayerSettingsModel, _$identity);
/// Serializes this VideoPlayerSettingsModel to a JSON map.
Map<String, dynamic> toJson();
@override
$Res call({
Object? screenBrightness = freezed,
Object? videoFit = null,
Object? fillScreen = null,
Object? hardwareAccel = null,
Object? useLibass = null,
Object? bufferSize = null,
Object? playerOptions = freezed,
Object? internalVolume = null,
Object? allowedOrientations = freezed,
Object? nextVideoType = null,
Object? maxHomeBitrate = null,
Object? maxInternetBitrate = null,
Object? audioDevice = freezed,
Object? segmentSkipSettings = null,
Object? hotKeys = null,
}) {
return _then(_value.copyWith(
screenBrightness: freezed == screenBrightness
? _value.screenBrightness
: screenBrightness // ignore: cast_nullable_to_non_nullable
as double?,
videoFit: null == videoFit
? _value.videoFit
: videoFit // ignore: cast_nullable_to_non_nullable
as BoxFit,
fillScreen: null == fillScreen
? _value.fillScreen
: fillScreen // ignore: cast_nullable_to_non_nullable
as bool,
hardwareAccel: null == hardwareAccel
? _value.hardwareAccel
: hardwareAccel // ignore: cast_nullable_to_non_nullable
as bool,
useLibass: null == useLibass
? _value.useLibass
: useLibass // ignore: cast_nullable_to_non_nullable
as bool,
bufferSize: null == bufferSize
? _value.bufferSize
: bufferSize // ignore: cast_nullable_to_non_nullable
as int,
playerOptions: freezed == playerOptions
? _value.playerOptions
: playerOptions // ignore: cast_nullable_to_non_nullable
as PlayerOptions?,
internalVolume: null == internalVolume
? _value.internalVolume
: internalVolume // ignore: cast_nullable_to_non_nullable
as double,
allowedOrientations: freezed == allowedOrientations
? _value.allowedOrientations
: allowedOrientations // ignore: cast_nullable_to_non_nullable
as Set<DeviceOrientation>?,
nextVideoType: null == nextVideoType
? _value.nextVideoType
: nextVideoType // ignore: cast_nullable_to_non_nullable
as AutoNextType,
maxHomeBitrate: null == maxHomeBitrate
? _value.maxHomeBitrate
: maxHomeBitrate // ignore: cast_nullable_to_non_nullable
as Bitrate,
maxInternetBitrate: null == maxInternetBitrate
? _value.maxInternetBitrate
: maxInternetBitrate // ignore: cast_nullable_to_non_nullable
as Bitrate,
audioDevice: freezed == audioDevice
? _value.audioDevice
: audioDevice // ignore: cast_nullable_to_non_nullable
as String?,
segmentSkipSettings: null == segmentSkipSettings
? _value.segmentSkipSettings
: segmentSkipSettings // ignore: cast_nullable_to_non_nullable
as Map<MediaSegmentType, SegmentSkip>,
hotKeys: null == hotKeys
? _value.hotKeys
: hotKeys // ignore: cast_nullable_to_non_nullable
as Map<VideoHotKeys, KeyCombination>,
) as $Val);
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'VideoPlayerSettingsModel'))
..add(DiagnosticsProperty('screenBrightness', screenBrightness))
..add(DiagnosticsProperty('videoFit', videoFit))
..add(DiagnosticsProperty('fillScreen', fillScreen))
..add(DiagnosticsProperty('hardwareAccel', hardwareAccel))
..add(DiagnosticsProperty('useLibass', useLibass))
..add(DiagnosticsProperty('bufferSize', bufferSize))
..add(DiagnosticsProperty('playerOptions', playerOptions))
..add(DiagnosticsProperty('internalVolume', internalVolume))
..add(DiagnosticsProperty('allowedOrientations', allowedOrientations))
..add(DiagnosticsProperty('nextVideoType', nextVideoType))
..add(DiagnosticsProperty('maxHomeBitrate', maxHomeBitrate))
..add(DiagnosticsProperty('maxInternetBitrate', maxInternetBitrate))
..add(DiagnosticsProperty('audioDevice', audioDevice))
..add(DiagnosticsProperty('segmentSkipSettings', segmentSkipSettings))
..add(DiagnosticsProperty('hotKeys', hotKeys));
}
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'VideoPlayerSettingsModel(screenBrightness: $screenBrightness, videoFit: $videoFit, fillScreen: $fillScreen, hardwareAccel: $hardwareAccel, useLibass: $useLibass, bufferSize: $bufferSize, playerOptions: $playerOptions, internalVolume: $internalVolume, allowedOrientations: $allowedOrientations, nextVideoType: $nextVideoType, maxHomeBitrate: $maxHomeBitrate, maxInternetBitrate: $maxInternetBitrate, audioDevice: $audioDevice, segmentSkipSettings: $segmentSkipSettings, hotKeys: $hotKeys)';
}
}
/// @nodoc
abstract class _$$VideoPlayerSettingsModelImplCopyWith<$Res>
implements $VideoPlayerSettingsModelCopyWith<$Res> {
factory _$$VideoPlayerSettingsModelImplCopyWith(
_$VideoPlayerSettingsModelImpl value,
$Res Function(_$VideoPlayerSettingsModelImpl) then) =
__$$VideoPlayerSettingsModelImplCopyWithImpl<$Res>;
@override
abstract mixin class $VideoPlayerSettingsModelCopyWith<$Res> {
factory $VideoPlayerSettingsModelCopyWith(VideoPlayerSettingsModel value,
$Res Function(VideoPlayerSettingsModel) _then) =
_$VideoPlayerSettingsModelCopyWithImpl;
@useResult
$Res call(
{double? screenBrightness,
@ -199,14 +93,12 @@ abstract class _$$VideoPlayerSettingsModelImplCopyWith<$Res>
}
/// @nodoc
class __$$VideoPlayerSettingsModelImplCopyWithImpl<$Res>
extends _$VideoPlayerSettingsModelCopyWithImpl<$Res,
_$VideoPlayerSettingsModelImpl>
implements _$$VideoPlayerSettingsModelImplCopyWith<$Res> {
__$$VideoPlayerSettingsModelImplCopyWithImpl(
_$VideoPlayerSettingsModelImpl _value,
$Res Function(_$VideoPlayerSettingsModelImpl) _then)
: super(_value, _then);
class _$VideoPlayerSettingsModelCopyWithImpl<$Res>
implements $VideoPlayerSettingsModelCopyWith<$Res> {
_$VideoPlayerSettingsModelCopyWithImpl(this._self, this._then);
final VideoPlayerSettingsModel _self;
final $Res Function(VideoPlayerSettingsModel) _then;
/// Create a copy of VideoPlayerSettingsModel
/// with the given fields replaced by the non-null parameter values.
@ -229,76 +121,326 @@ class __$$VideoPlayerSettingsModelImplCopyWithImpl<$Res>
Object? segmentSkipSettings = null,
Object? hotKeys = null,
}) {
return _then(_$VideoPlayerSettingsModelImpl(
return _then(_self.copyWith(
screenBrightness: freezed == screenBrightness
? _value.screenBrightness
? _self.screenBrightness
: screenBrightness // ignore: cast_nullable_to_non_nullable
as double?,
videoFit: null == videoFit
? _value.videoFit
? _self.videoFit
: videoFit // ignore: cast_nullable_to_non_nullable
as BoxFit,
fillScreen: null == fillScreen
? _value.fillScreen
? _self.fillScreen
: fillScreen // ignore: cast_nullable_to_non_nullable
as bool,
hardwareAccel: null == hardwareAccel
? _value.hardwareAccel
? _self.hardwareAccel
: hardwareAccel // ignore: cast_nullable_to_non_nullable
as bool,
useLibass: null == useLibass
? _value.useLibass
? _self.useLibass
: useLibass // ignore: cast_nullable_to_non_nullable
as bool,
bufferSize: null == bufferSize
? _value.bufferSize
? _self.bufferSize
: bufferSize // ignore: cast_nullable_to_non_nullable
as int,
playerOptions: freezed == playerOptions
? _value.playerOptions
? _self.playerOptions
: playerOptions // ignore: cast_nullable_to_non_nullable
as PlayerOptions?,
internalVolume: null == internalVolume
? _value.internalVolume
? _self.internalVolume
: internalVolume // ignore: cast_nullable_to_non_nullable
as double,
allowedOrientations: freezed == allowedOrientations
? _value._allowedOrientations
? _self.allowedOrientations
: allowedOrientations // ignore: cast_nullable_to_non_nullable
as Set<DeviceOrientation>?,
nextVideoType: null == nextVideoType
? _value.nextVideoType
? _self.nextVideoType
: nextVideoType // ignore: cast_nullable_to_non_nullable
as AutoNextType,
maxHomeBitrate: null == maxHomeBitrate
? _value.maxHomeBitrate
? _self.maxHomeBitrate
: maxHomeBitrate // ignore: cast_nullable_to_non_nullable
as Bitrate,
maxInternetBitrate: null == maxInternetBitrate
? _value.maxInternetBitrate
? _self.maxInternetBitrate
: maxInternetBitrate // ignore: cast_nullable_to_non_nullable
as Bitrate,
audioDevice: freezed == audioDevice
? _value.audioDevice
? _self.audioDevice
: audioDevice // ignore: cast_nullable_to_non_nullable
as String?,
segmentSkipSettings: null == segmentSkipSettings
? _value._segmentSkipSettings
? _self.segmentSkipSettings
: segmentSkipSettings // ignore: cast_nullable_to_non_nullable
as Map<MediaSegmentType, SegmentSkip>,
hotKeys: null == hotKeys
? _value._hotKeys
? _self.hotKeys
: hotKeys // ignore: cast_nullable_to_non_nullable
as Map<VideoHotKeys, KeyCombination>,
));
}
}
/// Adds pattern-matching-related methods to [VideoPlayerSettingsModel].
extension VideoPlayerSettingsModelPatterns on VideoPlayerSettingsModel {
/// 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(_VideoPlayerSettingsModel value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _VideoPlayerSettingsModel() 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(_VideoPlayerSettingsModel value) $default,
) {
final _that = this;
switch (_that) {
case _VideoPlayerSettingsModel():
return $default(_that);
case _:
throw StateError('Unexpected subclass');
}
}
/// 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(_VideoPlayerSettingsModel value)? $default,
) {
final _that = this;
switch (_that) {
case _VideoPlayerSettingsModel() 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(
double? screenBrightness,
BoxFit videoFit,
bool fillScreen,
bool hardwareAccel,
bool useLibass,
int bufferSize,
PlayerOptions? playerOptions,
double internalVolume,
Set<DeviceOrientation>? allowedOrientations,
AutoNextType nextVideoType,
Bitrate maxHomeBitrate,
Bitrate maxInternetBitrate,
String? audioDevice,
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
Map<VideoHotKeys, KeyCombination> hotKeys)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _VideoPlayerSettingsModel() when $default != null:
return $default(
_that.screenBrightness,
_that.videoFit,
_that.fillScreen,
_that.hardwareAccel,
_that.useLibass,
_that.bufferSize,
_that.playerOptions,
_that.internalVolume,
_that.allowedOrientations,
_that.nextVideoType,
_that.maxHomeBitrate,
_that.maxInternetBitrate,
_that.audioDevice,
_that.segmentSkipSettings,
_that.hotKeys);
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(
double? screenBrightness,
BoxFit videoFit,
bool fillScreen,
bool hardwareAccel,
bool useLibass,
int bufferSize,
PlayerOptions? playerOptions,
double internalVolume,
Set<DeviceOrientation>? allowedOrientations,
AutoNextType nextVideoType,
Bitrate maxHomeBitrate,
Bitrate maxInternetBitrate,
String? audioDevice,
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
Map<VideoHotKeys, KeyCombination> hotKeys)
$default,
) {
final _that = this;
switch (_that) {
case _VideoPlayerSettingsModel():
return $default(
_that.screenBrightness,
_that.videoFit,
_that.fillScreen,
_that.hardwareAccel,
_that.useLibass,
_that.bufferSize,
_that.playerOptions,
_that.internalVolume,
_that.allowedOrientations,
_that.nextVideoType,
_that.maxHomeBitrate,
_that.maxInternetBitrate,
_that.audioDevice,
_that.segmentSkipSettings,
_that.hotKeys);
case _:
throw StateError('Unexpected subclass');
}
}
/// 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(
double? screenBrightness,
BoxFit videoFit,
bool fillScreen,
bool hardwareAccel,
bool useLibass,
int bufferSize,
PlayerOptions? playerOptions,
double internalVolume,
Set<DeviceOrientation>? allowedOrientations,
AutoNextType nextVideoType,
Bitrate maxHomeBitrate,
Bitrate maxInternetBitrate,
String? audioDevice,
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
Map<VideoHotKeys, KeyCombination> hotKeys)?
$default,
) {
final _that = this;
switch (_that) {
case _VideoPlayerSettingsModel() when $default != null:
return $default(
_that.screenBrightness,
_that.videoFit,
_that.fillScreen,
_that.hardwareAccel,
_that.useLibass,
_that.bufferSize,
_that.playerOptions,
_that.internalVolume,
_that.allowedOrientations,
_that.nextVideoType,
_that.maxHomeBitrate,
_that.maxInternetBitrate,
_that.audioDevice,
_that.segmentSkipSettings,
_that.hotKeys);
case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
class _VideoPlayerSettingsModel extends VideoPlayerSettingsModel
with DiagnosticableTreeMixin {
_$VideoPlayerSettingsModelImpl(
_VideoPlayerSettingsModel(
{this.screenBrightness,
this.videoFit = BoxFit.contain,
this.fillScreen = false,
@ -319,9 +461,8 @@ class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
_segmentSkipSettings = segmentSkipSettings,
_hotKeys = hotKeys,
super._();
factory _$VideoPlayerSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
_$$VideoPlayerSettingsModelImplFromJson(json);
factory _VideoPlayerSettingsModel.fromJson(Map<String, dynamic> json) =>
_$VideoPlayerSettingsModelFromJson(json);
@override
final double? screenBrightness;
@ -386,14 +527,24 @@ class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
return EqualUnmodifiableMapView(_hotKeys);
}
/// Create a copy of VideoPlayerSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'VideoPlayerSettingsModel(screenBrightness: $screenBrightness, videoFit: $videoFit, fillScreen: $fillScreen, hardwareAccel: $hardwareAccel, useLibass: $useLibass, bufferSize: $bufferSize, playerOptions: $playerOptions, internalVolume: $internalVolume, allowedOrientations: $allowedOrientations, nextVideoType: $nextVideoType, maxHomeBitrate: $maxHomeBitrate, maxInternetBitrate: $maxInternetBitrate, audioDevice: $audioDevice, segmentSkipSettings: $segmentSkipSettings, hotKeys: $hotKeys)';
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$VideoPlayerSettingsModelCopyWith<_VideoPlayerSettingsModel> get copyWith =>
__$VideoPlayerSettingsModelCopyWithImpl<_VideoPlayerSettingsModel>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$VideoPlayerSettingsModelToJson(
this,
);
}
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties
..add(DiagnosticsProperty('type', 'VideoPlayerSettingsModel'))
..add(DiagnosticsProperty('screenBrightness', screenBrightness))
@ -413,81 +564,130 @@ class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
..add(DiagnosticsProperty('hotKeys', hotKeys));
}
/// Create a copy of VideoPlayerSettingsModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$VideoPlayerSettingsModelImplCopyWith<_$VideoPlayerSettingsModelImpl>
get copyWith => __$$VideoPlayerSettingsModelImplCopyWithImpl<
_$VideoPlayerSettingsModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$VideoPlayerSettingsModelImplToJson(
this,
);
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'VideoPlayerSettingsModel(screenBrightness: $screenBrightness, videoFit: $videoFit, fillScreen: $fillScreen, hardwareAccel: $hardwareAccel, useLibass: $useLibass, bufferSize: $bufferSize, playerOptions: $playerOptions, internalVolume: $internalVolume, allowedOrientations: $allowedOrientations, nextVideoType: $nextVideoType, maxHomeBitrate: $maxHomeBitrate, maxInternetBitrate: $maxInternetBitrate, audioDevice: $audioDevice, segmentSkipSettings: $segmentSkipSettings, hotKeys: $hotKeys)';
}
}
abstract class _VideoPlayerSettingsModel extends VideoPlayerSettingsModel {
factory _VideoPlayerSettingsModel(
{final double? screenBrightness,
final BoxFit videoFit,
final bool fillScreen,
final bool hardwareAccel,
final bool useLibass,
final int bufferSize,
final PlayerOptions? playerOptions,
final double internalVolume,
final Set<DeviceOrientation>? allowedOrientations,
final AutoNextType nextVideoType,
final Bitrate maxHomeBitrate,
final Bitrate maxInternetBitrate,
final String? audioDevice,
final Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
final Map<VideoHotKeys, KeyCombination> hotKeys}) =
_$VideoPlayerSettingsModelImpl;
_VideoPlayerSettingsModel._() : super._();
/// @nodoc
abstract mixin class _$VideoPlayerSettingsModelCopyWith<$Res>
implements $VideoPlayerSettingsModelCopyWith<$Res> {
factory _$VideoPlayerSettingsModelCopyWith(_VideoPlayerSettingsModel value,
$Res Function(_VideoPlayerSettingsModel) _then) =
__$VideoPlayerSettingsModelCopyWithImpl;
@override
@useResult
$Res call(
{double? screenBrightness,
BoxFit videoFit,
bool fillScreen,
bool hardwareAccel,
bool useLibass,
int bufferSize,
PlayerOptions? playerOptions,
double internalVolume,
Set<DeviceOrientation>? allowedOrientations,
AutoNextType nextVideoType,
Bitrate maxHomeBitrate,
Bitrate maxInternetBitrate,
String? audioDevice,
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
Map<VideoHotKeys, KeyCombination> hotKeys});
}
factory _VideoPlayerSettingsModel.fromJson(Map<String, dynamic> json) =
_$VideoPlayerSettingsModelImpl.fromJson;
/// @nodoc
class __$VideoPlayerSettingsModelCopyWithImpl<$Res>
implements _$VideoPlayerSettingsModelCopyWith<$Res> {
__$VideoPlayerSettingsModelCopyWithImpl(this._self, this._then);
@override
double? get screenBrightness;
@override
BoxFit get videoFit;
@override
bool get fillScreen;
@override
bool get hardwareAccel;
@override
bool get useLibass;
@override
int get bufferSize;
@override
PlayerOptions? get playerOptions;
@override
double get internalVolume;
@override
Set<DeviceOrientation>? get allowedOrientations;
@override
AutoNextType get nextVideoType;
@override
Bitrate get maxHomeBitrate;
@override
Bitrate get maxInternetBitrate;
@override
String? get audioDevice;
@override
Map<MediaSegmentType, SegmentSkip> get segmentSkipSettings;
@override
Map<VideoHotKeys, KeyCombination> get hotKeys;
final _VideoPlayerSettingsModel _self;
final $Res Function(_VideoPlayerSettingsModel) _then;
/// Create a copy of VideoPlayerSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$VideoPlayerSettingsModelImplCopyWith<_$VideoPlayerSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
@pragma('vm:prefer-inline')
$Res call({
Object? screenBrightness = freezed,
Object? videoFit = null,
Object? fillScreen = null,
Object? hardwareAccel = null,
Object? useLibass = null,
Object? bufferSize = null,
Object? playerOptions = freezed,
Object? internalVolume = null,
Object? allowedOrientations = freezed,
Object? nextVideoType = null,
Object? maxHomeBitrate = null,
Object? maxInternetBitrate = null,
Object? audioDevice = freezed,
Object? segmentSkipSettings = null,
Object? hotKeys = null,
}) {
return _then(_VideoPlayerSettingsModel(
screenBrightness: freezed == screenBrightness
? _self.screenBrightness
: screenBrightness // ignore: cast_nullable_to_non_nullable
as double?,
videoFit: null == videoFit
? _self.videoFit
: videoFit // ignore: cast_nullable_to_non_nullable
as BoxFit,
fillScreen: null == fillScreen
? _self.fillScreen
: fillScreen // ignore: cast_nullable_to_non_nullable
as bool,
hardwareAccel: null == hardwareAccel
? _self.hardwareAccel
: hardwareAccel // ignore: cast_nullable_to_non_nullable
as bool,
useLibass: null == useLibass
? _self.useLibass
: useLibass // ignore: cast_nullable_to_non_nullable
as bool,
bufferSize: null == bufferSize
? _self.bufferSize
: bufferSize // ignore: cast_nullable_to_non_nullable
as int,
playerOptions: freezed == playerOptions
? _self.playerOptions
: playerOptions // ignore: cast_nullable_to_non_nullable
as PlayerOptions?,
internalVolume: null == internalVolume
? _self.internalVolume
: internalVolume // ignore: cast_nullable_to_non_nullable
as double,
allowedOrientations: freezed == allowedOrientations
? _self._allowedOrientations
: allowedOrientations // ignore: cast_nullable_to_non_nullable
as Set<DeviceOrientation>?,
nextVideoType: null == nextVideoType
? _self.nextVideoType
: nextVideoType // ignore: cast_nullable_to_non_nullable
as AutoNextType,
maxHomeBitrate: null == maxHomeBitrate
? _self.maxHomeBitrate
: maxHomeBitrate // ignore: cast_nullable_to_non_nullable
as Bitrate,
maxInternetBitrate: null == maxInternetBitrate
? _self.maxInternetBitrate
: maxInternetBitrate // ignore: cast_nullable_to_non_nullable
as Bitrate,
audioDevice: freezed == audioDevice
? _self.audioDevice
: audioDevice // ignore: cast_nullable_to_non_nullable
as String?,
segmentSkipSettings: null == segmentSkipSettings
? _self._segmentSkipSettings
: segmentSkipSettings // ignore: cast_nullable_to_non_nullable
as Map<MediaSegmentType, SegmentSkip>,
hotKeys: null == hotKeys
? _self._hotKeys
: hotKeys // ignore: cast_nullable_to_non_nullable
as Map<VideoHotKeys, KeyCombination>,
));
}
}
// dart format on

View file

@ -6,9 +6,9 @@ part of 'video_player_settings.dart';
// JsonSerializableGenerator
// **************************************************************************
_$VideoPlayerSettingsModelImpl _$$VideoPlayerSettingsModelImplFromJson(
_VideoPlayerSettingsModel _$VideoPlayerSettingsModelFromJson(
Map<String, dynamic> json) =>
_$VideoPlayerSettingsModelImpl(
_VideoPlayerSettingsModel(
screenBrightness: (json['screenBrightness'] as num?)?.toDouble(),
videoFit: $enumDecodeNullable(_$BoxFitEnumMap, json['videoFit']) ??
BoxFit.contain,
@ -45,8 +45,8 @@ _$VideoPlayerSettingsModelImpl _$$VideoPlayerSettingsModelImplFromJson(
const {},
);
Map<String, dynamic> _$$VideoPlayerSettingsModelImplToJson(
_$VideoPlayerSettingsModelImpl instance) =>
Map<String, dynamic> _$VideoPlayerSettingsModelToJson(
_VideoPlayerSettingsModel instance) =>
<String, dynamic>{
'screenBrightness': instance.screenBrightness,
'videoFit': _$BoxFitEnumMap[instance.videoFit]!,