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

@ -150,13 +150,14 @@ class EpisodeModelMapper extends SubClassMapperBase<EpisodeModel> {
mixin EpisodeModelMappable {
EpisodeModelCopyWith<EpisodeModel, EpisodeModel, EpisodeModel> get copyWith =>
_EpisodeModelCopyWithImpl(this as EpisodeModel, $identity, $identity);
_EpisodeModelCopyWithImpl<EpisodeModel, EpisodeModel>(
this as EpisodeModel, $identity, $identity);
}
extension EpisodeModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, EpisodeModel, $Out> {
EpisodeModelCopyWith<$R, EpisodeModel, $Out> get $asEpisodeModel =>
$base.as((v, t, t2) => _EpisodeModelCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _EpisodeModelCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class EpisodeModelCopyWith<$R, $In extends EpisodeModel, $Out>
@ -283,5 +284,5 @@ class _EpisodeModelCopyWithImpl<$R, $Out>
@override
EpisodeModelCopyWith<$R2, EpisodeModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_EpisodeModelCopyWithImpl($value, $cast, t);
_EpisodeModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
}

View file

@ -112,13 +112,14 @@ class FolderModelMapper extends SubClassMapperBase<FolderModel> {
mixin FolderModelMappable {
FolderModelCopyWith<FolderModel, FolderModel, FolderModel> get copyWith =>
_FolderModelCopyWithImpl(this as FolderModel, $identity, $identity);
_FolderModelCopyWithImpl<FolderModel, FolderModel>(
this as FolderModel, $identity, $identity);
}
extension FolderModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, FolderModel, $Out> {
FolderModelCopyWith<$R, FolderModel, $Out> get $asFolderModel =>
$base.as((v, t, t2) => _FolderModelCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _FolderModelCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class FolderModelCopyWith<$R, $In extends FolderModel, $Out>
@ -215,5 +216,5 @@ class _FolderModelCopyWithImpl<$R, $Out>
@override
FolderModelCopyWith<$R2, FolderModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_FolderModelCopyWithImpl($value, $cast, t);
_FolderModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
}

View file

@ -1,10 +1,11 @@
import 'package:fladder/jellyfin/jellyfin_open_api.swagger.dart' as dto;
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:fladder/jellyfin/jellyfin_open_api.swagger.dart' as dto;
part 'item_properties_model.freezed.dart';
@Freezed(fromJson: false, toJson: false)
class ItemPropertiesModel with _$ItemPropertiesModel {
abstract class ItemPropertiesModel with _$ItemPropertiesModel {
const ItemPropertiesModel._();
factory ItemPropertiesModel._internal({

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,22 +9,181 @@ part of 'item_properties_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 _$ItemPropertiesModel {
bool get canDelete => throw _privateConstructorUsedError;
bool get canDownload => throw _privateConstructorUsedError;
bool get canDelete;
bool get canDownload;
@override
String toString() {
return 'ItemPropertiesModel(canDelete: $canDelete, canDownload: $canDownload)';
}
}
/// Adds pattern-matching-related methods to [ItemPropertiesModel].
extension ItemPropertiesModelPatterns on ItemPropertiesModel {
/// 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(_ItemPropertiesModel value)? _internal,
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ItemPropertiesModel() when _internal != null:
return _internal(_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?>({
required TResult Function(_ItemPropertiesModel value) _internal,
}) {
final _that = this;
switch (_that) {
case _ItemPropertiesModel():
return _internal(_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(_ItemPropertiesModel value)? _internal,
}) {
final _that = this;
switch (_that) {
case _ItemPropertiesModel() when _internal != null:
return _internal(_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 canDelete, bool canDownload)? _internal,
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ItemPropertiesModel() when _internal != null:
return _internal(_that.canDelete, _that.canDownload);
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?>({
required TResult Function(bool canDelete, bool canDownload) _internal,
}) {
final _that = this;
switch (_that) {
case _ItemPropertiesModel():
return _internal(_that.canDelete, _that.canDownload);
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 canDelete, bool canDownload)? _internal,
}) {
final _that = this;
switch (_that) {
case _ItemPropertiesModel() when _internal != null:
return _internal(_that.canDelete, _that.canDownload);
case _:
return null;
}
}
}
/// @nodoc
class _$ItemPropertiesModelImpl extends _ItemPropertiesModel {
_$ItemPropertiesModelImpl(
{required this.canDelete, required this.canDownload})
class _ItemPropertiesModel extends ItemPropertiesModel {
_ItemPropertiesModel({required this.canDelete, required this.canDownload})
: super._();
@override
@ -38,14 +197,4 @@ class _$ItemPropertiesModelImpl extends _ItemPropertiesModel {
}
}
abstract class _ItemPropertiesModel extends ItemPropertiesModel {
factory _ItemPropertiesModel(
{required final bool canDelete,
required final bool canDownload}) = _$ItemPropertiesModelImpl;
_ItemPropertiesModel._() : super._();
@override
bool get canDelete;
@override
bool get canDownload;
}
// dart format on

View file

@ -91,12 +91,13 @@ mixin UserDataMappable {
}
UserDataCopyWith<UserData, UserData, UserData> get copyWith =>
_UserDataCopyWithImpl(this as UserData, $identity, $identity);
_UserDataCopyWithImpl<UserData, UserData>(
this as UserData, $identity, $identity);
}
extension UserDataValueCopy<$R, $Out> on ObjectCopyWith<$R, UserData, $Out> {
UserDataCopyWith<$R, UserData, $Out> get $asUserData =>
$base.as((v, t, t2) => _UserDataCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _UserDataCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class UserDataCopyWith<$R, $In extends UserData, $Out>
@ -154,5 +155,5 @@ class _UserDataCopyWithImpl<$R, $Out>
@override
UserDataCopyWith<$R2, UserData, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_UserDataCopyWithImpl($value, $cast, t);
_UserDataCopyWithImpl<$R2, $Out2>($value, $cast, t);
}

View file

@ -116,14 +116,15 @@ class ItemStreamModelMapper extends SubClassMapperBase<ItemStreamModel> {
mixin ItemStreamModelMappable {
ItemStreamModelCopyWith<ItemStreamModel, ItemStreamModel, ItemStreamModel>
get copyWith => _ItemStreamModelCopyWithImpl(
this as ItemStreamModel, $identity, $identity);
get copyWith =>
_ItemStreamModelCopyWithImpl<ItemStreamModel, ItemStreamModel>(
this as ItemStreamModel, $identity, $identity);
}
extension ItemStreamModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, ItemStreamModel, $Out> {
ItemStreamModelCopyWith<$R, ItemStreamModel, $Out> get $asItemStreamModel =>
$base.as((v, t, t2) => _ItemStreamModelCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _ItemStreamModelCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class ItemStreamModelCopyWith<$R, $In extends ItemStreamModel, $Out>
@ -218,5 +219,5 @@ class _ItemStreamModelCopyWithImpl<$R, $Out>
@override
ItemStreamModelCopyWith<$R2, ItemStreamModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_ItemStreamModelCopyWithImpl($value, $cast, t);
_ItemStreamModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
}

View file

@ -11,7 +11,7 @@ part 'media_segments_model.freezed.dart';
part 'media_segments_model.g.dart';
@freezed
class MediaSegmentsModel with _$MediaSegmentsModel {
abstract class MediaSegmentsModel with _$MediaSegmentsModel {
const MediaSegmentsModel._();
factory MediaSegmentsModel({
@ -27,7 +27,7 @@ class MediaSegmentsModel with _$MediaSegmentsModel {
}
@freezed
class MediaSegment with _$MediaSegment {
abstract class MediaSegment with _$MediaSegment {
const MediaSegment._();
factory MediaSegment({

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,32 +9,187 @@ part of 'media_segments_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');
MediaSegmentsModel _$MediaSegmentsModelFromJson(Map<String, dynamic> json) {
return _MediaSegmentsModel.fromJson(json);
}
/// @nodoc
mixin _$MediaSegmentsModel {
List<MediaSegment> get segments => throw _privateConstructorUsedError;
List<MediaSegment> get segments;
/// Serializes this MediaSegmentsModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Map<String, dynamic> toJson();
@override
String toString() {
return 'MediaSegmentsModel(segments: $segments)';
}
}
/// Adds pattern-matching-related methods to [MediaSegmentsModel].
extension MediaSegmentsModelPatterns on MediaSegmentsModel {
/// 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(_MediaSegmentsModel value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _MediaSegmentsModel() 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(_MediaSegmentsModel value) $default,
) {
final _that = this;
switch (_that) {
case _MediaSegmentsModel():
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(_MediaSegmentsModel value)? $default,
) {
final _that = this;
switch (_that) {
case _MediaSegmentsModel() 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(List<MediaSegment> segments)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _MediaSegmentsModel() when $default != null:
return $default(_that.segments);
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(List<MediaSegment> segments) $default,
) {
final _that = this;
switch (_that) {
case _MediaSegmentsModel():
return $default(_that.segments);
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(List<MediaSegment> segments)? $default,
) {
final _that = this;
switch (_that) {
case _MediaSegmentsModel() when $default != null:
return $default(_that.segments);
case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _$MediaSegmentsModelImpl extends _MediaSegmentsModel {
_$MediaSegmentsModelImpl({final List<MediaSegment> segments = const []})
class _MediaSegmentsModel extends MediaSegmentsModel {
_MediaSegmentsModel({final List<MediaSegment> segments = const []})
: _segments = segments,
super._();
factory _$MediaSegmentsModelImpl.fromJson(Map<String, dynamic> json) =>
_$$MediaSegmentsModelImplFromJson(json);
factory _MediaSegmentsModel.fromJson(Map<String, dynamic> json) =>
_$MediaSegmentsModelFromJson(json);
final List<MediaSegment> _segments;
@override
@ -45,54 +200,201 @@ class _$MediaSegmentsModelImpl extends _MediaSegmentsModel {
return EqualUnmodifiableListView(_segments);
}
@override
String toString() {
return 'MediaSegmentsModel(segments: $segments)';
}
@override
Map<String, dynamic> toJson() {
return _$$MediaSegmentsModelImplToJson(
return _$MediaSegmentsModelToJson(
this,
);
}
}
abstract class _MediaSegmentsModel extends MediaSegmentsModel {
factory _MediaSegmentsModel({final List<MediaSegment> segments}) =
_$MediaSegmentsModelImpl;
_MediaSegmentsModel._() : super._();
factory _MediaSegmentsModel.fromJson(Map<String, dynamic> json) =
_$MediaSegmentsModelImpl.fromJson;
@override
List<MediaSegment> get segments;
}
MediaSegment _$MediaSegmentFromJson(Map<String, dynamic> json) {
return _MediaSegment.fromJson(json);
String toString() {
return 'MediaSegmentsModel(segments: $segments)';
}
}
/// @nodoc
mixin _$MediaSegment {
MediaSegmentType get type => throw _privateConstructorUsedError;
Duration get start => throw _privateConstructorUsedError;
Duration get end => throw _privateConstructorUsedError;
MediaSegmentType get type;
Duration get start;
Duration get end;
/// Serializes this MediaSegment to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Map<String, dynamic> toJson();
@override
String toString() {
return 'MediaSegment(type: $type, start: $start, end: $end)';
}
}
/// Adds pattern-matching-related methods to [MediaSegment].
extension MediaSegmentPatterns on MediaSegment {
/// 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(_MediaSegment value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _MediaSegment() 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(_MediaSegment value) $default,
) {
final _that = this;
switch (_that) {
case _MediaSegment():
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(_MediaSegment value)? $default,
) {
final _that = this;
switch (_that) {
case _MediaSegment() 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(MediaSegmentType type, Duration start, Duration end)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _MediaSegment() when $default != null:
return $default(_that.type, _that.start, _that.end);
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(MediaSegmentType type, Duration start, Duration end)
$default,
) {
final _that = this;
switch (_that) {
case _MediaSegment():
return $default(_that.type, _that.start, _that.end);
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(MediaSegmentType type, Duration start, Duration end)?
$default,
) {
final _that = this;
switch (_that) {
case _MediaSegment() when $default != null:
return $default(_that.type, _that.start, _that.end);
case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _$MediaSegmentImpl extends _MediaSegment {
_$MediaSegmentImpl(
{required this.type, required this.start, required this.end})
class _MediaSegment extends MediaSegment {
_MediaSegment({required this.type, required this.start, required this.end})
: super._();
factory _$MediaSegmentImpl.fromJson(Map<String, dynamic> json) =>
_$$MediaSegmentImplFromJson(json);
factory _MediaSegment.fromJson(Map<String, dynamic> json) =>
_$MediaSegmentFromJson(json);
@override
final MediaSegmentType type;
@ -101,33 +403,17 @@ class _$MediaSegmentImpl extends _MediaSegment {
@override
final Duration end;
@override
String toString() {
return 'MediaSegment(type: $type, start: $start, end: $end)';
}
@override
Map<String, dynamic> toJson() {
return _$$MediaSegmentImplToJson(
return _$MediaSegmentToJson(
this,
);
}
@override
String toString() {
return 'MediaSegment(type: $type, start: $start, end: $end)';
}
}
abstract class _MediaSegment extends MediaSegment {
factory _MediaSegment(
{required final MediaSegmentType type,
required final Duration start,
required final Duration end}) = _$MediaSegmentImpl;
_MediaSegment._() : super._();
factory _MediaSegment.fromJson(Map<String, dynamic> json) =
_$MediaSegmentImpl.fromJson;
@override
MediaSegmentType get type;
@override
Duration get start;
@override
Duration get end;
}
// dart format on

View file

@ -6,29 +6,27 @@ part of 'media_segments_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$MediaSegmentsModelImpl _$$MediaSegmentsModelImplFromJson(
Map<String, dynamic> json) =>
_$MediaSegmentsModelImpl(
_MediaSegmentsModel _$MediaSegmentsModelFromJson(Map<String, dynamic> json) =>
_MediaSegmentsModel(
segments: (json['segments'] as List<dynamic>?)
?.map((e) => MediaSegment.fromJson(e as Map<String, dynamic>))
.toList() ??
const [],
);
Map<String, dynamic> _$$MediaSegmentsModelImplToJson(
_$MediaSegmentsModelImpl instance) =>
Map<String, dynamic> _$MediaSegmentsModelToJson(_MediaSegmentsModel instance) =>
<String, dynamic>{
'segments': instance.segments,
};
_$MediaSegmentImpl _$$MediaSegmentImplFromJson(Map<String, dynamic> json) =>
_$MediaSegmentImpl(
_MediaSegment _$MediaSegmentFromJson(Map<String, dynamic> json) =>
_MediaSegment(
type: $enumDecode(_$MediaSegmentTypeEnumMap, json['type']),
start: Duration(microseconds: (json['start'] as num).toInt()),
end: Duration(microseconds: (json['end'] as num).toInt()),
);
Map<String, dynamic> _$$MediaSegmentImplToJson(_$MediaSegmentImpl instance) =>
Map<String, dynamic> _$MediaSegmentToJson(_MediaSegment instance) =>
<String, dynamic>{
'type': _$MediaSegmentTypeEnumMap[instance.type]!,
'start': instance.start.inMicroseconds,

View file

@ -151,13 +151,14 @@ class MovieModelMapper extends SubClassMapperBase<MovieModel> {
mixin MovieModelMappable {
MovieModelCopyWith<MovieModel, MovieModel, MovieModel> get copyWith =>
_MovieModelCopyWithImpl(this as MovieModel, $identity, $identity);
_MovieModelCopyWithImpl<MovieModel, MovieModel>(
this as MovieModel, $identity, $identity);
}
extension MovieModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, MovieModel, $Out> {
MovieModelCopyWith<$R, MovieModel, $Out> get $asMovieModel =>
$base.as((v, t, t2) => _MovieModelCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _MovieModelCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class MovieModelCopyWith<$R, $In extends MovieModel, $Out>
@ -291,5 +292,5 @@ class _MovieModelCopyWithImpl<$R, $Out>
@override
MovieModelCopyWith<$R2, MovieModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_MovieModelCopyWithImpl($value, $cast, t);
_MovieModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
}

View file

@ -118,14 +118,14 @@ class OverviewModelMapper extends ClassMapperBase<OverviewModel> {
mixin OverviewModelMappable {
OverviewModelCopyWith<OverviewModel, OverviewModel, OverviewModel>
get copyWith => _OverviewModelCopyWithImpl(
get copyWith => _OverviewModelCopyWithImpl<OverviewModel, OverviewModel>(
this as OverviewModel, $identity, $identity);
}
extension OverviewModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, OverviewModel, $Out> {
OverviewModelCopyWith<$R, OverviewModel, $Out> get $asOverviewModel =>
$base.as((v, t, t2) => _OverviewModelCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _OverviewModelCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class OverviewModelCopyWith<$R, $In extends OverviewModel, $Out>
@ -275,5 +275,5 @@ class _OverviewModelCopyWithImpl<$R, $Out>
@override
OverviewModelCopyWith<$R2, OverviewModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_OverviewModelCopyWithImpl($value, $cast, t);
_OverviewModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
}

View file

@ -128,13 +128,14 @@ class PersonModelMapper extends SubClassMapperBase<PersonModel> {
mixin PersonModelMappable {
PersonModelCopyWith<PersonModel, PersonModel, PersonModel> get copyWith =>
_PersonModelCopyWithImpl(this as PersonModel, $identity, $identity);
_PersonModelCopyWithImpl<PersonModel, PersonModel>(
this as PersonModel, $identity, $identity);
}
extension PersonModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, PersonModel, $Out> {
PersonModelCopyWith<$R, PersonModel, $Out> get $asPersonModel =>
$base.as((v, t, t2) => _PersonModelCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _PersonModelCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class PersonModelCopyWith<$R, $In extends PersonModel, $Out>
@ -254,5 +255,5 @@ class _PersonModelCopyWithImpl<$R, $Out>
@override
PersonModelCopyWith<$R2, PersonModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_PersonModelCopyWithImpl($value, $cast, t);
_PersonModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
}

View file

@ -112,14 +112,15 @@ class PhotoAlbumModelMapper extends SubClassMapperBase<PhotoAlbumModel> {
mixin PhotoAlbumModelMappable {
PhotoAlbumModelCopyWith<PhotoAlbumModel, PhotoAlbumModel, PhotoAlbumModel>
get copyWith => _PhotoAlbumModelCopyWithImpl(
this as PhotoAlbumModel, $identity, $identity);
get copyWith =>
_PhotoAlbumModelCopyWithImpl<PhotoAlbumModel, PhotoAlbumModel>(
this as PhotoAlbumModel, $identity, $identity);
}
extension PhotoAlbumModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, PhotoAlbumModel, $Out> {
PhotoAlbumModelCopyWith<$R, PhotoAlbumModel, $Out> get $asPhotoAlbumModel =>
$base.as((v, t, t2) => _PhotoAlbumModelCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _PhotoAlbumModelCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class PhotoAlbumModelCopyWith<$R, $In extends PhotoAlbumModel, $Out>
@ -217,7 +218,7 @@ class _PhotoAlbumModelCopyWithImpl<$R, $Out>
@override
PhotoAlbumModelCopyWith<$R2, PhotoAlbumModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_PhotoAlbumModelCopyWithImpl($value, $cast, t);
_PhotoAlbumModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
}
class PhotoModelMapper extends SubClassMapperBase<PhotoModel> {
@ -340,13 +341,14 @@ class PhotoModelMapper extends SubClassMapperBase<PhotoModel> {
mixin PhotoModelMappable {
PhotoModelCopyWith<PhotoModel, PhotoModel, PhotoModel> get copyWith =>
_PhotoModelCopyWithImpl(this as PhotoModel, $identity, $identity);
_PhotoModelCopyWithImpl<PhotoModel, PhotoModel>(
this as PhotoModel, $identity, $identity);
}
extension PhotoModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, PhotoModel, $Out> {
PhotoModelCopyWith<$R, PhotoModel, $Out> get $asPhotoModel =>
$base.as((v, t, t2) => _PhotoModelCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _PhotoModelCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class PhotoModelCopyWith<$R, $In extends PhotoModel, $Out>
@ -448,5 +450,5 @@ class _PhotoModelCopyWithImpl<$R, $Out>
@override
PhotoModelCopyWith<$R2, PhotoModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_PhotoModelCopyWithImpl($value, $cast, t);
_PhotoModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
}

View file

@ -141,13 +141,14 @@ class SeasonModelMapper extends SubClassMapperBase<SeasonModel> {
mixin SeasonModelMappable {
SeasonModelCopyWith<SeasonModel, SeasonModel, SeasonModel> get copyWith =>
_SeasonModelCopyWithImpl(this as SeasonModel, $identity, $identity);
_SeasonModelCopyWithImpl<SeasonModel, SeasonModel>(
this as SeasonModel, $identity, $identity);
}
extension SeasonModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, SeasonModel, $Out> {
SeasonModelCopyWith<$R, SeasonModel, $Out> get $asSeasonModel =>
$base.as((v, t, t2) => _SeasonModelCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _SeasonModelCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class SeasonModelCopyWith<$R, $In extends SeasonModel, $Out>
@ -268,5 +269,5 @@ class _SeasonModelCopyWithImpl<$R, $Out>
@override
SeasonModelCopyWith<$R2, SeasonModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_SeasonModelCopyWithImpl($value, $cast, t);
_SeasonModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
}

View file

@ -139,13 +139,14 @@ class SeriesModelMapper extends SubClassMapperBase<SeriesModel> {
mixin SeriesModelMappable {
SeriesModelCopyWith<SeriesModel, SeriesModel, SeriesModel> get copyWith =>
_SeriesModelCopyWithImpl(this as SeriesModel, $identity, $identity);
_SeriesModelCopyWithImpl<SeriesModel, SeriesModel>(
this as SeriesModel, $identity, $identity);
}
extension SeriesModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, SeriesModel, $Out> {
SeriesModelCopyWith<$R, SeriesModel, $Out> get $asSeriesModel =>
$base.as((v, t, t2) => _SeriesModelCopyWithImpl(v, t, t2));
$base.as((v, t, t2) => _SeriesModelCopyWithImpl<$R, $Out>(v, t, t2));
}
abstract class SeriesModelCopyWith<$R, $In extends SeriesModel, $Out>
@ -282,5 +283,5 @@ class _SeriesModelCopyWithImpl<$R, $Out>
@override
SeriesModelCopyWith<$R2, SeriesModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_SeriesModelCopyWithImpl($value, $cast, t);
_SeriesModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
}

View file

@ -6,7 +6,7 @@ part 'trick_play_model.freezed.dart';
part 'trick_play_model.g.dart';
@Freezed(copyWith: true)
class TrickPlayModel with _$TrickPlayModel {
abstract class TrickPlayModel with _$TrickPlayModel {
factory TrickPlayModel({
required int width,
required int height,

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,114 +9,41 @@ part of 'trick_play_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');
TrickPlayModel _$TrickPlayModelFromJson(Map<String, dynamic> json) {
return _TrickPlayModel.fromJson(json);
}
/// @nodoc
mixin _$TrickPlayModel {
int get width => throw _privateConstructorUsedError;
int get height => throw _privateConstructorUsedError;
int get tileWidth => throw _privateConstructorUsedError;
int get tileHeight => throw _privateConstructorUsedError;
int get thumbnailCount => throw _privateConstructorUsedError;
Duration get interval => throw _privateConstructorUsedError;
List<String> get images => throw _privateConstructorUsedError;
/// Serializes this TrickPlayModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
int get width;
int get height;
int get tileWidth;
int get tileHeight;
int get thumbnailCount;
Duration get interval;
List<String> get images;
/// Create a copy of TrickPlayModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$TrickPlayModelCopyWith<TrickPlayModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $TrickPlayModelCopyWith<$Res> {
factory $TrickPlayModelCopyWith(
TrickPlayModel value, $Res Function(TrickPlayModel) then) =
_$TrickPlayModelCopyWithImpl<$Res, TrickPlayModel>;
@useResult
$Res call(
{int width,
int height,
int tileWidth,
int tileHeight,
int thumbnailCount,
Duration interval,
List<String> images});
}
/// @nodoc
class _$TrickPlayModelCopyWithImpl<$Res, $Val extends TrickPlayModel>
implements $TrickPlayModelCopyWith<$Res> {
_$TrickPlayModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of TrickPlayModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
$TrickPlayModelCopyWith<TrickPlayModel> get copyWith =>
_$TrickPlayModelCopyWithImpl<TrickPlayModel>(
this as TrickPlayModel, _$identity);
/// Serializes this TrickPlayModel to a JSON map.
Map<String, dynamic> toJson();
@override
$Res call({
Object? width = null,
Object? height = null,
Object? tileWidth = null,
Object? tileHeight = null,
Object? thumbnailCount = null,
Object? interval = null,
Object? images = null,
}) {
return _then(_value.copyWith(
width: null == width
? _value.width
: width // ignore: cast_nullable_to_non_nullable
as int,
height: null == height
? _value.height
: height // ignore: cast_nullable_to_non_nullable
as int,
tileWidth: null == tileWidth
? _value.tileWidth
: tileWidth // ignore: cast_nullable_to_non_nullable
as int,
tileHeight: null == tileHeight
? _value.tileHeight
: tileHeight // ignore: cast_nullable_to_non_nullable
as int,
thumbnailCount: null == thumbnailCount
? _value.thumbnailCount
: thumbnailCount // ignore: cast_nullable_to_non_nullable
as int,
interval: null == interval
? _value.interval
: interval // ignore: cast_nullable_to_non_nullable
as Duration,
images: null == images
? _value.images
: images // ignore: cast_nullable_to_non_nullable
as List<String>,
) as $Val);
String toString() {
return 'TrickPlayModel(width: $width, height: $height, tileWidth: $tileWidth, tileHeight: $tileHeight, thumbnailCount: $thumbnailCount, interval: $interval, images: $images)';
}
}
/// @nodoc
abstract class _$$TrickPlayModelImplCopyWith<$Res>
implements $TrickPlayModelCopyWith<$Res> {
factory _$$TrickPlayModelImplCopyWith(_$TrickPlayModelImpl value,
$Res Function(_$TrickPlayModelImpl) then) =
__$$TrickPlayModelImplCopyWithImpl<$Res>;
@override
abstract mixin class $TrickPlayModelCopyWith<$Res> {
factory $TrickPlayModelCopyWith(
TrickPlayModel value, $Res Function(TrickPlayModel) _then) =
_$TrickPlayModelCopyWithImpl;
@useResult
$Res call(
{int width,
@ -129,12 +56,12 @@ abstract class _$$TrickPlayModelImplCopyWith<$Res>
}
/// @nodoc
class __$$TrickPlayModelImplCopyWithImpl<$Res>
extends _$TrickPlayModelCopyWithImpl<$Res, _$TrickPlayModelImpl>
implements _$$TrickPlayModelImplCopyWith<$Res> {
__$$TrickPlayModelImplCopyWithImpl(
_$TrickPlayModelImpl _value, $Res Function(_$TrickPlayModelImpl) _then)
: super(_value, _then);
class _$TrickPlayModelCopyWithImpl<$Res>
implements $TrickPlayModelCopyWith<$Res> {
_$TrickPlayModelCopyWithImpl(this._self, this._then);
final TrickPlayModel _self;
final $Res Function(TrickPlayModel) _then;
/// Create a copy of TrickPlayModel
/// with the given fields replaced by the non-null parameter values.
@ -149,43 +76,227 @@ class __$$TrickPlayModelImplCopyWithImpl<$Res>
Object? interval = null,
Object? images = null,
}) {
return _then(_$TrickPlayModelImpl(
return _then(_self.copyWith(
width: null == width
? _value.width
? _self.width
: width // ignore: cast_nullable_to_non_nullable
as int,
height: null == height
? _value.height
? _self.height
: height // ignore: cast_nullable_to_non_nullable
as int,
tileWidth: null == tileWidth
? _value.tileWidth
? _self.tileWidth
: tileWidth // ignore: cast_nullable_to_non_nullable
as int,
tileHeight: null == tileHeight
? _value.tileHeight
? _self.tileHeight
: tileHeight // ignore: cast_nullable_to_non_nullable
as int,
thumbnailCount: null == thumbnailCount
? _value.thumbnailCount
? _self.thumbnailCount
: thumbnailCount // ignore: cast_nullable_to_non_nullable
as int,
interval: null == interval
? _value.interval
? _self.interval
: interval // ignore: cast_nullable_to_non_nullable
as Duration,
images: null == images
? _value._images
? _self.images
: images // ignore: cast_nullable_to_non_nullable
as List<String>,
));
}
}
/// Adds pattern-matching-related methods to [TrickPlayModel].
extension TrickPlayModelPatterns on TrickPlayModel {
/// 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(_TrickPlayModel value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _TrickPlayModel() 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(_TrickPlayModel value) $default,
) {
final _that = this;
switch (_that) {
case _TrickPlayModel():
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(_TrickPlayModel value)? $default,
) {
final _that = this;
switch (_that) {
case _TrickPlayModel() 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(int width, int height, int tileWidth, int tileHeight,
int thumbnailCount, Duration interval, List<String> images)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _TrickPlayModel() when $default != null:
return $default(
_that.width,
_that.height,
_that.tileWidth,
_that.tileHeight,
_that.thumbnailCount,
_that.interval,
_that.images);
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(int width, int height, int tileWidth, int tileHeight,
int thumbnailCount, Duration interval, List<String> images)
$default,
) {
final _that = this;
switch (_that) {
case _TrickPlayModel():
return $default(
_that.width,
_that.height,
_that.tileWidth,
_that.tileHeight,
_that.thumbnailCount,
_that.interval,
_that.images);
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(int width, int height, int tileWidth, int tileHeight,
int thumbnailCount, Duration interval, List<String> images)?
$default,
) {
final _that = this;
switch (_that) {
case _TrickPlayModel() when $default != null:
return $default(
_that.width,
_that.height,
_that.tileWidth,
_that.tileHeight,
_that.thumbnailCount,
_that.interval,
_that.images);
case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _$TrickPlayModelImpl extends _TrickPlayModel {
_$TrickPlayModelImpl(
class _TrickPlayModel extends TrickPlayModel {
_TrickPlayModel(
{required this.width,
required this.height,
required this.tileWidth,
@ -195,9 +306,8 @@ class _$TrickPlayModelImpl extends _TrickPlayModel {
final List<String> images = const []})
: _images = images,
super._();
factory _$TrickPlayModelImpl.fromJson(Map<String, dynamic> json) =>
_$$TrickPlayModelImplFromJson(json);
factory _TrickPlayModel.fromJson(Map<String, dynamic> json) =>
_$TrickPlayModelFromJson(json);
@override
final int width;
@ -220,61 +330,97 @@ class _$TrickPlayModelImpl extends _TrickPlayModel {
return EqualUnmodifiableListView(_images);
}
/// Create a copy of TrickPlayModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$TrickPlayModelCopyWith<_TrickPlayModel> get copyWith =>
__$TrickPlayModelCopyWithImpl<_TrickPlayModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$TrickPlayModelToJson(
this,
);
}
@override
String toString() {
return 'TrickPlayModel(width: $width, height: $height, tileWidth: $tileWidth, tileHeight: $tileHeight, thumbnailCount: $thumbnailCount, interval: $interval, images: $images)';
}
}
/// @nodoc
abstract mixin class _$TrickPlayModelCopyWith<$Res>
implements $TrickPlayModelCopyWith<$Res> {
factory _$TrickPlayModelCopyWith(
_TrickPlayModel value, $Res Function(_TrickPlayModel) _then) =
__$TrickPlayModelCopyWithImpl;
@override
@useResult
$Res call(
{int width,
int height,
int tileWidth,
int tileHeight,
int thumbnailCount,
Duration interval,
List<String> images});
}
/// @nodoc
class __$TrickPlayModelCopyWithImpl<$Res>
implements _$TrickPlayModelCopyWith<$Res> {
__$TrickPlayModelCopyWithImpl(this._self, this._then);
final _TrickPlayModel _self;
final $Res Function(_TrickPlayModel) _then;
/// Create a copy of TrickPlayModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$TrickPlayModelImplCopyWith<_$TrickPlayModelImpl> get copyWith =>
__$$TrickPlayModelImplCopyWithImpl<_$TrickPlayModelImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$TrickPlayModelImplToJson(
this,
);
$Res call({
Object? width = null,
Object? height = null,
Object? tileWidth = null,
Object? tileHeight = null,
Object? thumbnailCount = null,
Object? interval = null,
Object? images = null,
}) {
return _then(_TrickPlayModel(
width: null == width
? _self.width
: width // ignore: cast_nullable_to_non_nullable
as int,
height: null == height
? _self.height
: height // ignore: cast_nullable_to_non_nullable
as int,
tileWidth: null == tileWidth
? _self.tileWidth
: tileWidth // ignore: cast_nullable_to_non_nullable
as int,
tileHeight: null == tileHeight
? _self.tileHeight
: tileHeight // ignore: cast_nullable_to_non_nullable
as int,
thumbnailCount: null == thumbnailCount
? _self.thumbnailCount
: thumbnailCount // ignore: cast_nullable_to_non_nullable
as int,
interval: null == interval
? _self.interval
: interval // ignore: cast_nullable_to_non_nullable
as Duration,
images: null == images
? _self._images
: images // ignore: cast_nullable_to_non_nullable
as List<String>,
));
}
}
abstract class _TrickPlayModel extends TrickPlayModel {
factory _TrickPlayModel(
{required final int width,
required final int height,
required final int tileWidth,
required final int tileHeight,
required final int thumbnailCount,
required final Duration interval,
final List<String> images}) = _$TrickPlayModelImpl;
_TrickPlayModel._() : super._();
factory _TrickPlayModel.fromJson(Map<String, dynamic> json) =
_$TrickPlayModelImpl.fromJson;
@override
int get width;
@override
int get height;
@override
int get tileWidth;
@override
int get tileHeight;
@override
int get thumbnailCount;
@override
Duration get interval;
@override
List<String> get images;
/// Create a copy of TrickPlayModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$TrickPlayModelImplCopyWith<_$TrickPlayModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
// dart format on

View file

@ -6,8 +6,8 @@ part of 'trick_play_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$TrickPlayModelImpl _$$TrickPlayModelImplFromJson(Map<String, dynamic> json) =>
_$TrickPlayModelImpl(
_TrickPlayModel _$TrickPlayModelFromJson(Map<String, dynamic> json) =>
_TrickPlayModel(
width: (json['width'] as num).toInt(),
height: (json['height'] as num).toInt(),
tileWidth: (json['tileWidth'] as num).toInt(),
@ -20,8 +20,7 @@ _$TrickPlayModelImpl _$$TrickPlayModelImplFromJson(Map<String, dynamic> json) =>
const [],
);
Map<String, dynamic> _$$TrickPlayModelImplToJson(
_$TrickPlayModelImpl instance) =>
Map<String, dynamic> _$TrickPlayModelToJson(_TrickPlayModel instance) =>
<String, dynamic>{
'width': instance.width,
'height': instance.height,