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

2
.fvmrc
View file

@ -1,3 +1,3 @@
{ {
"flutter": "3.32.8" "flutter": "3.35.1"
} }

1
.vscode/launch.json vendored
View file

@ -81,7 +81,6 @@
"args": [ "args": [
"--web-port", "--web-port",
"9090", "9090",
"--web-experimental-hot-reload",
], ],
}, },
{ {

View file

@ -7,7 +7,7 @@
"LTWH", "LTWH",
"outro" "outro"
], ],
"dart.flutterSdkPath": ".fvm/versions/3.32.8", "dart.flutterSdkPath": ".fvm/versions/3.35.1",
"search.exclude": { "search.exclude": {
"**/.fvm": true "**/.fvm": true
}, },

View file

@ -2565,7 +2565,8 @@ enum AudioItemIdHls1PlaylistIdSegmentIdContainerGetSubtitleMethod {
final String? value; final String? value;
const AudioItemIdHls1PlaylistIdSegmentIdContainerGetSubtitleMethod( const AudioItemIdHls1PlaylistIdSegmentIdContainerGetSubtitleMethod(
this.value); this.value,
);
} }
enum AudioItemIdHls1PlaylistIdSegmentIdContainerGetContext { enum AudioItemIdHls1PlaylistIdSegmentIdContainerGetContext {
@ -2702,7 +2703,8 @@ enum VideosItemIdHls1PlaylistIdSegmentIdContainerGetSubtitleMethod {
final String? value; final String? value;
const VideosItemIdHls1PlaylistIdSegmentIdContainerGetSubtitleMethod( const VideosItemIdHls1PlaylistIdSegmentIdContainerGetSubtitleMethod(
this.value); this.value,
);
} }
enum VideosItemIdHls1PlaylistIdSegmentIdContainerGetContext { enum VideosItemIdHls1PlaylistIdSegmentIdContainerGetContext {
@ -3635,7 +3637,8 @@ enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayed
final String? value; final String? value;
const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountGetImageType( const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountGetImageType(
this.value); this.value,
);
} }
enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountGetFormat { enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountGetFormat {
@ -3658,7 +3661,8 @@ enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayed
final String? value; final String? value;
const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountGetFormat( const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountGetFormat(
this.value); this.value,
);
} }
enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadImageType { enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadImageType {
@ -3695,7 +3699,8 @@ enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayed
final String? value; final String? value;
const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadImageType( const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadImageType(
this.value); this.value,
);
} }
enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadFormat { enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadFormat {
@ -3718,7 +3723,8 @@ enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayed
final String? value; final String? value;
const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadFormat( const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadFormat(
this.value); this.value,
);
} }
enum ItemsItemIdImagesImageTypeImageIndexIndexPostImageType { enum ItemsItemIdImagesImageTypeImageIndexIndexPostImageType {

View file

@ -1,3 +1,4 @@
// dart format width=80
//Generated jellyfin api code //Generated jellyfin api code
part of 'jellyfin_open_api.swagger.dart'; part of 'jellyfin_open_api.swagger.dart';

File diff suppressed because it is too large Load diff

View file

@ -17,7 +17,7 @@ part 'account_model.freezed.dart';
part 'account_model.g.dart'; part 'account_model.g.dart';
@Freezed(copyWith: true) @Freezed(copyWith: true)
class AccountModel with _$AccountModel { abstract class AccountModel with _$AccountModel {
const AccountModel._(); const AccountModel._();
const factory AccountModel({ const factory AccountModel({
@ -52,7 +52,7 @@ class AccountModel with _$AccountModel {
} }
@Freezed(copyWith: true) @Freezed(copyWith: true)
class UserSettings with _$UserSettings { abstract class UserSettings with _$UserSettings {
factory UserSettings({ factory UserSettings({
@Default(Duration(seconds: 30)) Duration skipForwardDuration, @Default(Duration(seconds: 30)) Duration skipForwardDuration,
@Default(Duration(seconds: 10)) Duration skipBackDuration, @Default(Duration(seconds: 10)) Duration skipBackDuration,

File diff suppressed because it is too large Load diff

View file

@ -6,8 +6,8 @@ part of 'account_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$AccountModelImpl _$$AccountModelImplFromJson(Map<String, dynamic> json) => _AccountModel _$AccountModelFromJson(Map<String, dynamic> json) =>
_$AccountModelImpl( _AccountModel(
name: json['name'] as String, name: json['name'] as String,
id: json['id'] as String, id: json['id'] as String,
avatar: json['avatar'] as String, avatar: json['avatar'] as String,
@ -36,7 +36,7 @@ _$AccountModelImpl _$$AccountModelImplFromJson(Map<String, dynamic> json) =>
: UserSettings.fromJson(json['userSettings'] as Map<String, dynamic>), : UserSettings.fromJson(json['userSettings'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$AccountModelImplToJson(_$AccountModelImpl instance) => Map<String, dynamic> _$AccountModelToJson(_AccountModel instance) =>
<String, dynamic>{ <String, dynamic>{
'name': instance.name, 'name': instance.name,
'id': instance.id, 'id': instance.id,
@ -59,8 +59,8 @@ const _$AuthenticationEnumMap = {
Authentication.none: 'none', Authentication.none: 'none',
}; };
_$UserSettingsImpl _$$UserSettingsImplFromJson(Map<String, dynamic> json) => _UserSettings _$UserSettingsFromJson(Map<String, dynamic> json) =>
_$UserSettingsImpl( _UserSettings(
skipForwardDuration: json['skipForwardDuration'] == null skipForwardDuration: json['skipForwardDuration'] == null
? const Duration(seconds: 30) ? const Duration(seconds: 30)
: Duration( : Duration(
@ -70,7 +70,7 @@ _$UserSettingsImpl _$$UserSettingsImplFromJson(Map<String, dynamic> json) =>
: Duration(microseconds: (json['skipBackDuration'] as num).toInt()), : Duration(microseconds: (json['skipBackDuration'] as num).toInt()),
); );
Map<String, dynamic> _$$UserSettingsImplToJson(_$UserSettingsImpl instance) => Map<String, dynamic> _$UserSettingsToJson(_UserSettings instance) =>
<String, dynamic>{ <String, dynamic>{
'skipForwardDuration': instance.skipForwardDuration.inMicroseconds, 'skipForwardDuration': instance.skipForwardDuration.inMicroseconds,
'skipBackDuration': instance.skipBackDuration.inMicroseconds, 'skipBackDuration': instance.skipBackDuration.inMicroseconds,

View file

@ -112,13 +112,14 @@ class BoxSetModelMapper extends SubClassMapperBase<BoxSetModel> {
mixin BoxSetModelMappable { mixin BoxSetModelMappable {
BoxSetModelCopyWith<BoxSetModel, BoxSetModel, BoxSetModel> get copyWith => BoxSetModelCopyWith<BoxSetModel, BoxSetModel, BoxSetModel> get copyWith =>
_BoxSetModelCopyWithImpl(this as BoxSetModel, $identity, $identity); _BoxSetModelCopyWithImpl<BoxSetModel, BoxSetModel>(
this as BoxSetModel, $identity, $identity);
} }
extension BoxSetModelValueCopy<$R, $Out> extension BoxSetModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, BoxSetModel, $Out> { on ObjectCopyWith<$R, BoxSetModel, $Out> {
BoxSetModelCopyWith<$R, BoxSetModel, $Out> get $asBoxSetModel => BoxSetModelCopyWith<$R, BoxSetModel, $Out> get $asBoxSetModel =>
$base.as((v, t, t2) => _BoxSetModelCopyWithImpl(v, t, t2)); $base.as((v, t, t2) => _BoxSetModelCopyWithImpl<$R, $Out>(v, t, t2));
} }
abstract class BoxSetModelCopyWith<$R, $In extends BoxSetModel, $Out> abstract class BoxSetModelCopyWith<$R, $In extends BoxSetModel, $Out>
@ -215,5 +216,5 @@ class _BoxSetModelCopyWithImpl<$R, $Out>
@override @override
BoxSetModelCopyWith<$R2, BoxSetModel, $Out2> $chain<$R2, $Out2>( BoxSetModelCopyWith<$R2, BoxSetModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => Then<$Out2, $R2> t) =>
_BoxSetModelCopyWithImpl($value, $cast, t); _BoxSetModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
} }

View file

@ -97,14 +97,14 @@ class ItemBaseModelMapper extends ClassMapperBase<ItemBaseModel> {
mixin ItemBaseModelMappable { mixin ItemBaseModelMappable {
ItemBaseModelCopyWith<ItemBaseModel, ItemBaseModel, ItemBaseModel> ItemBaseModelCopyWith<ItemBaseModel, ItemBaseModel, ItemBaseModel>
get copyWith => _ItemBaseModelCopyWithImpl( get copyWith => _ItemBaseModelCopyWithImpl<ItemBaseModel, ItemBaseModel>(
this as ItemBaseModel, $identity, $identity); this as ItemBaseModel, $identity, $identity);
} }
extension ItemBaseModelValueCopy<$R, $Out> extension ItemBaseModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, ItemBaseModel, $Out> { on ObjectCopyWith<$R, ItemBaseModel, $Out> {
ItemBaseModelCopyWith<$R, ItemBaseModel, $Out> get $asItemBaseModel => ItemBaseModelCopyWith<$R, ItemBaseModel, $Out> get $asItemBaseModel =>
$base.as((v, t, t2) => _ItemBaseModelCopyWithImpl(v, t, t2)); $base.as((v, t, t2) => _ItemBaseModelCopyWithImpl<$R, $Out>(v, t, t2));
} }
abstract class ItemBaseModelCopyWith<$R, $In extends ItemBaseModel, $Out> abstract class ItemBaseModelCopyWith<$R, $In extends ItemBaseModel, $Out>
@ -187,5 +187,5 @@ class _ItemBaseModelCopyWithImpl<$R, $Out>
@override @override
ItemBaseModelCopyWith<$R2, ItemBaseModel, $Out2> $chain<$R2, $Out2>( ItemBaseModelCopyWith<$R2, ItemBaseModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => Then<$Out2, $R2> t) =>
_ItemBaseModelCopyWithImpl($value, $cast, t); _ItemBaseModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
} }

View file

@ -150,13 +150,14 @@ class EpisodeModelMapper extends SubClassMapperBase<EpisodeModel> {
mixin EpisodeModelMappable { mixin EpisodeModelMappable {
EpisodeModelCopyWith<EpisodeModel, EpisodeModel, EpisodeModel> get copyWith => EpisodeModelCopyWith<EpisodeModel, EpisodeModel, EpisodeModel> get copyWith =>
_EpisodeModelCopyWithImpl(this as EpisodeModel, $identity, $identity); _EpisodeModelCopyWithImpl<EpisodeModel, EpisodeModel>(
this as EpisodeModel, $identity, $identity);
} }
extension EpisodeModelValueCopy<$R, $Out> extension EpisodeModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, EpisodeModel, $Out> { on ObjectCopyWith<$R, EpisodeModel, $Out> {
EpisodeModelCopyWith<$R, EpisodeModel, $Out> get $asEpisodeModel => 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> abstract class EpisodeModelCopyWith<$R, $In extends EpisodeModel, $Out>
@ -283,5 +284,5 @@ class _EpisodeModelCopyWithImpl<$R, $Out>
@override @override
EpisodeModelCopyWith<$R2, EpisodeModel, $Out2> $chain<$R2, $Out2>( EpisodeModelCopyWith<$R2, EpisodeModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => 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 { mixin FolderModelMappable {
FolderModelCopyWith<FolderModel, FolderModel, FolderModel> get copyWith => FolderModelCopyWith<FolderModel, FolderModel, FolderModel> get copyWith =>
_FolderModelCopyWithImpl(this as FolderModel, $identity, $identity); _FolderModelCopyWithImpl<FolderModel, FolderModel>(
this as FolderModel, $identity, $identity);
} }
extension FolderModelValueCopy<$R, $Out> extension FolderModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, FolderModel, $Out> { on ObjectCopyWith<$R, FolderModel, $Out> {
FolderModelCopyWith<$R, FolderModel, $Out> get $asFolderModel => 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> abstract class FolderModelCopyWith<$R, $In extends FolderModel, $Out>
@ -215,5 +216,5 @@ class _FolderModelCopyWithImpl<$R, $Out>
@override @override
FolderModelCopyWith<$R2, FolderModel, $Out2> $chain<$R2, $Out2>( FolderModelCopyWith<$R2, FolderModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => 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:freezed_annotation/freezed_annotation.dart';
import 'package:fladder/jellyfin/jellyfin_open_api.swagger.dart' as dto;
part 'item_properties_model.freezed.dart'; part 'item_properties_model.freezed.dart';
@Freezed(fromJson: false, toJson: false) @Freezed(fromJson: false, toJson: false)
class ItemPropertiesModel with _$ItemPropertiesModel { abstract class ItemPropertiesModel with _$ItemPropertiesModel {
const ItemPropertiesModel._(); const ItemPropertiesModel._();
factory ItemPropertiesModel._internal({ factory ItemPropertiesModel._internal({

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,22 +9,181 @@ part of 'item_properties_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc /// @nodoc
mixin _$ItemPropertiesModel { mixin _$ItemPropertiesModel {
bool get canDelete => throw _privateConstructorUsedError; bool get canDelete;
bool get canDownload => throw _privateConstructorUsedError; 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 /// @nodoc
class _$ItemPropertiesModelImpl extends _ItemPropertiesModel { class _ItemPropertiesModel extends ItemPropertiesModel {
_$ItemPropertiesModelImpl( _ItemPropertiesModel({required this.canDelete, required this.canDownload})
{required this.canDelete, required this.canDownload})
: super._(); : super._();
@override @override
@ -38,14 +197,4 @@ class _$ItemPropertiesModelImpl extends _ItemPropertiesModel {
} }
} }
abstract class _ItemPropertiesModel extends ItemPropertiesModel { // dart format on
factory _ItemPropertiesModel(
{required final bool canDelete,
required final bool canDownload}) = _$ItemPropertiesModelImpl;
_ItemPropertiesModel._() : super._();
@override
bool get canDelete;
@override
bool get canDownload;
}

View file

@ -91,12 +91,13 @@ mixin UserDataMappable {
} }
UserDataCopyWith<UserData, UserData, UserData> get copyWith => 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> { extension UserDataValueCopy<$R, $Out> on ObjectCopyWith<$R, UserData, $Out> {
UserDataCopyWith<$R, UserData, $Out> get $asUserData => 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> abstract class UserDataCopyWith<$R, $In extends UserData, $Out>
@ -154,5 +155,5 @@ class _UserDataCopyWithImpl<$R, $Out>
@override @override
UserDataCopyWith<$R2, UserData, $Out2> $chain<$R2, $Out2>( UserDataCopyWith<$R2, UserData, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => 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 { mixin ItemStreamModelMappable {
ItemStreamModelCopyWith<ItemStreamModel, ItemStreamModel, ItemStreamModel> ItemStreamModelCopyWith<ItemStreamModel, ItemStreamModel, ItemStreamModel>
get copyWith => _ItemStreamModelCopyWithImpl( get copyWith =>
_ItemStreamModelCopyWithImpl<ItemStreamModel, ItemStreamModel>(
this as ItemStreamModel, $identity, $identity); this as ItemStreamModel, $identity, $identity);
} }
extension ItemStreamModelValueCopy<$R, $Out> extension ItemStreamModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, ItemStreamModel, $Out> { on ObjectCopyWith<$R, ItemStreamModel, $Out> {
ItemStreamModelCopyWith<$R, ItemStreamModel, $Out> get $asItemStreamModel => 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> abstract class ItemStreamModelCopyWith<$R, $In extends ItemStreamModel, $Out>
@ -218,5 +219,5 @@ class _ItemStreamModelCopyWithImpl<$R, $Out>
@override @override
ItemStreamModelCopyWith<$R2, ItemStreamModel, $Out2> $chain<$R2, $Out2>( ItemStreamModelCopyWith<$R2, ItemStreamModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => 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'; part 'media_segments_model.g.dart';
@freezed @freezed
class MediaSegmentsModel with _$MediaSegmentsModel { abstract class MediaSegmentsModel with _$MediaSegmentsModel {
const MediaSegmentsModel._(); const MediaSegmentsModel._();
factory MediaSegmentsModel({ factory MediaSegmentsModel({
@ -27,7 +27,7 @@ class MediaSegmentsModel with _$MediaSegmentsModel {
} }
@freezed @freezed
class MediaSegment with _$MediaSegment { abstract class MediaSegment with _$MediaSegment {
const MediaSegment._(); const MediaSegment._();
factory MediaSegment({ factory MediaSegment({

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,32 +9,187 @@ part of 'media_segments_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
MediaSegmentsModel _$MediaSegmentsModelFromJson(Map<String, dynamic> json) {
return _MediaSegmentsModel.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$MediaSegmentsModel { mixin _$MediaSegmentsModel {
List<MediaSegment> get segments => throw _privateConstructorUsedError; List<MediaSegment> get segments;
/// Serializes this MediaSegmentsModel to a JSON map. /// 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 /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$MediaSegmentsModelImpl extends _MediaSegmentsModel { class _MediaSegmentsModel extends MediaSegmentsModel {
_$MediaSegmentsModelImpl({final List<MediaSegment> segments = const []}) _MediaSegmentsModel({final List<MediaSegment> segments = const []})
: _segments = segments, : _segments = segments,
super._(); super._();
factory _MediaSegmentsModel.fromJson(Map<String, dynamic> json) =>
factory _$MediaSegmentsModelImpl.fromJson(Map<String, dynamic> json) => _$MediaSegmentsModelFromJson(json);
_$$MediaSegmentsModelImplFromJson(json);
final List<MediaSegment> _segments; final List<MediaSegment> _segments;
@override @override
@ -45,54 +200,201 @@ class _$MediaSegmentsModelImpl extends _MediaSegmentsModel {
return EqualUnmodifiableListView(_segments); return EqualUnmodifiableListView(_segments);
} }
@override
String toString() {
return 'MediaSegmentsModel(segments: $segments)';
}
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$MediaSegmentsModelImplToJson( return _$MediaSegmentsModelToJson(
this, 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 @override
List<MediaSegment> get segments; String toString() {
} return 'MediaSegmentsModel(segments: $segments)';
}
MediaSegment _$MediaSegmentFromJson(Map<String, dynamic> json) {
return _MediaSegment.fromJson(json);
} }
/// @nodoc /// @nodoc
mixin _$MediaSegment { mixin _$MediaSegment {
MediaSegmentType get type => throw _privateConstructorUsedError; MediaSegmentType get type;
Duration get start => throw _privateConstructorUsedError; Duration get start;
Duration get end => throw _privateConstructorUsedError; Duration get end;
/// Serializes this MediaSegment to a JSON map. /// 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 /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$MediaSegmentImpl extends _MediaSegment { class _MediaSegment extends MediaSegment {
_$MediaSegmentImpl( _MediaSegment({required this.type, required this.start, required this.end})
{required this.type, required this.start, required this.end})
: super._(); : super._();
factory _MediaSegment.fromJson(Map<String, dynamic> json) =>
factory _$MediaSegmentImpl.fromJson(Map<String, dynamic> json) => _$MediaSegmentFromJson(json);
_$$MediaSegmentImplFromJson(json);
@override @override
final MediaSegmentType type; final MediaSegmentType type;
@ -101,33 +403,17 @@ class _$MediaSegmentImpl extends _MediaSegment {
@override @override
final Duration end; final Duration end;
@override
String toString() {
return 'MediaSegment(type: $type, start: $start, end: $end)';
}
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$MediaSegmentImplToJson( return _$MediaSegmentToJson(
this, this,
); );
} }
@override
String toString() {
return 'MediaSegment(type: $type, start: $start, end: $end)';
}
} }
abstract class _MediaSegment extends MediaSegment { // dart format on
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;
}

View file

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

View file

@ -151,13 +151,14 @@ class MovieModelMapper extends SubClassMapperBase<MovieModel> {
mixin MovieModelMappable { mixin MovieModelMappable {
MovieModelCopyWith<MovieModel, MovieModel, MovieModel> get copyWith => MovieModelCopyWith<MovieModel, MovieModel, MovieModel> get copyWith =>
_MovieModelCopyWithImpl(this as MovieModel, $identity, $identity); _MovieModelCopyWithImpl<MovieModel, MovieModel>(
this as MovieModel, $identity, $identity);
} }
extension MovieModelValueCopy<$R, $Out> extension MovieModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, MovieModel, $Out> { on ObjectCopyWith<$R, MovieModel, $Out> {
MovieModelCopyWith<$R, MovieModel, $Out> get $asMovieModel => 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> abstract class MovieModelCopyWith<$R, $In extends MovieModel, $Out>
@ -291,5 +292,5 @@ class _MovieModelCopyWithImpl<$R, $Out>
@override @override
MovieModelCopyWith<$R2, MovieModel, $Out2> $chain<$R2, $Out2>( MovieModelCopyWith<$R2, MovieModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => 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 { mixin OverviewModelMappable {
OverviewModelCopyWith<OverviewModel, OverviewModel, OverviewModel> OverviewModelCopyWith<OverviewModel, OverviewModel, OverviewModel>
get copyWith => _OverviewModelCopyWithImpl( get copyWith => _OverviewModelCopyWithImpl<OverviewModel, OverviewModel>(
this as OverviewModel, $identity, $identity); this as OverviewModel, $identity, $identity);
} }
extension OverviewModelValueCopy<$R, $Out> extension OverviewModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, OverviewModel, $Out> { on ObjectCopyWith<$R, OverviewModel, $Out> {
OverviewModelCopyWith<$R, OverviewModel, $Out> get $asOverviewModel => 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> abstract class OverviewModelCopyWith<$R, $In extends OverviewModel, $Out>
@ -275,5 +275,5 @@ class _OverviewModelCopyWithImpl<$R, $Out>
@override @override
OverviewModelCopyWith<$R2, OverviewModel, $Out2> $chain<$R2, $Out2>( OverviewModelCopyWith<$R2, OverviewModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => 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 { mixin PersonModelMappable {
PersonModelCopyWith<PersonModel, PersonModel, PersonModel> get copyWith => PersonModelCopyWith<PersonModel, PersonModel, PersonModel> get copyWith =>
_PersonModelCopyWithImpl(this as PersonModel, $identity, $identity); _PersonModelCopyWithImpl<PersonModel, PersonModel>(
this as PersonModel, $identity, $identity);
} }
extension PersonModelValueCopy<$R, $Out> extension PersonModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, PersonModel, $Out> { on ObjectCopyWith<$R, PersonModel, $Out> {
PersonModelCopyWith<$R, PersonModel, $Out> get $asPersonModel => 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> abstract class PersonModelCopyWith<$R, $In extends PersonModel, $Out>
@ -254,5 +255,5 @@ class _PersonModelCopyWithImpl<$R, $Out>
@override @override
PersonModelCopyWith<$R2, PersonModel, $Out2> $chain<$R2, $Out2>( PersonModelCopyWith<$R2, PersonModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => 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 { mixin PhotoAlbumModelMappable {
PhotoAlbumModelCopyWith<PhotoAlbumModel, PhotoAlbumModel, PhotoAlbumModel> PhotoAlbumModelCopyWith<PhotoAlbumModel, PhotoAlbumModel, PhotoAlbumModel>
get copyWith => _PhotoAlbumModelCopyWithImpl( get copyWith =>
_PhotoAlbumModelCopyWithImpl<PhotoAlbumModel, PhotoAlbumModel>(
this as PhotoAlbumModel, $identity, $identity); this as PhotoAlbumModel, $identity, $identity);
} }
extension PhotoAlbumModelValueCopy<$R, $Out> extension PhotoAlbumModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, PhotoAlbumModel, $Out> { on ObjectCopyWith<$R, PhotoAlbumModel, $Out> {
PhotoAlbumModelCopyWith<$R, PhotoAlbumModel, $Out> get $asPhotoAlbumModel => 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> abstract class PhotoAlbumModelCopyWith<$R, $In extends PhotoAlbumModel, $Out>
@ -217,7 +218,7 @@ class _PhotoAlbumModelCopyWithImpl<$R, $Out>
@override @override
PhotoAlbumModelCopyWith<$R2, PhotoAlbumModel, $Out2> $chain<$R2, $Out2>( PhotoAlbumModelCopyWith<$R2, PhotoAlbumModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => Then<$Out2, $R2> t) =>
_PhotoAlbumModelCopyWithImpl($value, $cast, t); _PhotoAlbumModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
} }
class PhotoModelMapper extends SubClassMapperBase<PhotoModel> { class PhotoModelMapper extends SubClassMapperBase<PhotoModel> {
@ -340,13 +341,14 @@ class PhotoModelMapper extends SubClassMapperBase<PhotoModel> {
mixin PhotoModelMappable { mixin PhotoModelMappable {
PhotoModelCopyWith<PhotoModel, PhotoModel, PhotoModel> get copyWith => PhotoModelCopyWith<PhotoModel, PhotoModel, PhotoModel> get copyWith =>
_PhotoModelCopyWithImpl(this as PhotoModel, $identity, $identity); _PhotoModelCopyWithImpl<PhotoModel, PhotoModel>(
this as PhotoModel, $identity, $identity);
} }
extension PhotoModelValueCopy<$R, $Out> extension PhotoModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, PhotoModel, $Out> { on ObjectCopyWith<$R, PhotoModel, $Out> {
PhotoModelCopyWith<$R, PhotoModel, $Out> get $asPhotoModel => 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> abstract class PhotoModelCopyWith<$R, $In extends PhotoModel, $Out>
@ -448,5 +450,5 @@ class _PhotoModelCopyWithImpl<$R, $Out>
@override @override
PhotoModelCopyWith<$R2, PhotoModel, $Out2> $chain<$R2, $Out2>( PhotoModelCopyWith<$R2, PhotoModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => 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 { mixin SeasonModelMappable {
SeasonModelCopyWith<SeasonModel, SeasonModel, SeasonModel> get copyWith => SeasonModelCopyWith<SeasonModel, SeasonModel, SeasonModel> get copyWith =>
_SeasonModelCopyWithImpl(this as SeasonModel, $identity, $identity); _SeasonModelCopyWithImpl<SeasonModel, SeasonModel>(
this as SeasonModel, $identity, $identity);
} }
extension SeasonModelValueCopy<$R, $Out> extension SeasonModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, SeasonModel, $Out> { on ObjectCopyWith<$R, SeasonModel, $Out> {
SeasonModelCopyWith<$R, SeasonModel, $Out> get $asSeasonModel => 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> abstract class SeasonModelCopyWith<$R, $In extends SeasonModel, $Out>
@ -268,5 +269,5 @@ class _SeasonModelCopyWithImpl<$R, $Out>
@override @override
SeasonModelCopyWith<$R2, SeasonModel, $Out2> $chain<$R2, $Out2>( SeasonModelCopyWith<$R2, SeasonModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => 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 { mixin SeriesModelMappable {
SeriesModelCopyWith<SeriesModel, SeriesModel, SeriesModel> get copyWith => SeriesModelCopyWith<SeriesModel, SeriesModel, SeriesModel> get copyWith =>
_SeriesModelCopyWithImpl(this as SeriesModel, $identity, $identity); _SeriesModelCopyWithImpl<SeriesModel, SeriesModel>(
this as SeriesModel, $identity, $identity);
} }
extension SeriesModelValueCopy<$R, $Out> extension SeriesModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, SeriesModel, $Out> { on ObjectCopyWith<$R, SeriesModel, $Out> {
SeriesModelCopyWith<$R, SeriesModel, $Out> get $asSeriesModel => 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> abstract class SeriesModelCopyWith<$R, $In extends SeriesModel, $Out>
@ -282,5 +283,5 @@ class _SeriesModelCopyWithImpl<$R, $Out>
@override @override
SeriesModelCopyWith<$R2, SeriesModel, $Out2> $chain<$R2, $Out2>( SeriesModelCopyWith<$R2, SeriesModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => 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'; part 'trick_play_model.g.dart';
@Freezed(copyWith: true) @Freezed(copyWith: true)
class TrickPlayModel with _$TrickPlayModel { abstract class TrickPlayModel with _$TrickPlayModel {
factory TrickPlayModel({ factory TrickPlayModel({
required int width, required int width,
required int height, required int height,

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,114 +9,41 @@ part of 'trick_play_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
TrickPlayModel _$TrickPlayModelFromJson(Map<String, dynamic> json) {
return _TrickPlayModel.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$TrickPlayModel { mixin _$TrickPlayModel {
int get width => throw _privateConstructorUsedError; int get width;
int get height => throw _privateConstructorUsedError; int get height;
int get tileWidth => throw _privateConstructorUsedError; int get tileWidth;
int get tileHeight => throw _privateConstructorUsedError; int get tileHeight;
int get thumbnailCount => throw _privateConstructorUsedError; int get thumbnailCount;
Duration get interval => throw _privateConstructorUsedError; Duration get interval;
List<String> get images => throw _privateConstructorUsedError; List<String> get images;
/// Serializes this TrickPlayModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of TrickPlayModel /// Create a copy of TrickPlayModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @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') @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 @override
$Res call({ String toString() {
Object? width = null, return 'TrickPlayModel(width: $width, height: $height, tileWidth: $tileWidth, tileHeight: $tileHeight, thumbnailCount: $thumbnailCount, interval: $interval, images: $images)';
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);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$TrickPlayModelImplCopyWith<$Res> abstract mixin class $TrickPlayModelCopyWith<$Res> {
implements $TrickPlayModelCopyWith<$Res> { factory $TrickPlayModelCopyWith(
factory _$$TrickPlayModelImplCopyWith(_$TrickPlayModelImpl value, TrickPlayModel value, $Res Function(TrickPlayModel) _then) =
$Res Function(_$TrickPlayModelImpl) then) = _$TrickPlayModelCopyWithImpl;
__$$TrickPlayModelImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{int width, {int width,
@ -129,12 +56,12 @@ abstract class _$$TrickPlayModelImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$TrickPlayModelImplCopyWithImpl<$Res> class _$TrickPlayModelCopyWithImpl<$Res>
extends _$TrickPlayModelCopyWithImpl<$Res, _$TrickPlayModelImpl> implements $TrickPlayModelCopyWith<$Res> {
implements _$$TrickPlayModelImplCopyWith<$Res> { _$TrickPlayModelCopyWithImpl(this._self, this._then);
__$$TrickPlayModelImplCopyWithImpl(
_$TrickPlayModelImpl _value, $Res Function(_$TrickPlayModelImpl) _then) final TrickPlayModel _self;
: super(_value, _then); final $Res Function(TrickPlayModel) _then;
/// Create a copy of TrickPlayModel /// Create a copy of TrickPlayModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -149,43 +76,227 @@ class __$$TrickPlayModelImplCopyWithImpl<$Res>
Object? interval = null, Object? interval = null,
Object? images = null, Object? images = null,
}) { }) {
return _then(_$TrickPlayModelImpl( return _then(_self.copyWith(
width: null == width width: null == width
? _value.width ? _self.width
: width // ignore: cast_nullable_to_non_nullable : width // ignore: cast_nullable_to_non_nullable
as int, as int,
height: null == height height: null == height
? _value.height ? _self.height
: height // ignore: cast_nullable_to_non_nullable : height // ignore: cast_nullable_to_non_nullable
as int, as int,
tileWidth: null == tileWidth tileWidth: null == tileWidth
? _value.tileWidth ? _self.tileWidth
: tileWidth // ignore: cast_nullable_to_non_nullable : tileWidth // ignore: cast_nullable_to_non_nullable
as int, as int,
tileHeight: null == tileHeight tileHeight: null == tileHeight
? _value.tileHeight ? _self.tileHeight
: tileHeight // ignore: cast_nullable_to_non_nullable : tileHeight // ignore: cast_nullable_to_non_nullable
as int, as int,
thumbnailCount: null == thumbnailCount thumbnailCount: null == thumbnailCount
? _value.thumbnailCount ? _self.thumbnailCount
: thumbnailCount // ignore: cast_nullable_to_non_nullable : thumbnailCount // ignore: cast_nullable_to_non_nullable
as int, as int,
interval: null == interval interval: null == interval
? _value.interval ? _self.interval
: interval // ignore: cast_nullable_to_non_nullable : interval // ignore: cast_nullable_to_non_nullable
as Duration, as Duration,
images: null == images images: null == images
? _value._images ? _self.images
: images // ignore: cast_nullable_to_non_nullable : images // ignore: cast_nullable_to_non_nullable
as List<String>, 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 /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$TrickPlayModelImpl extends _TrickPlayModel { class _TrickPlayModel extends TrickPlayModel {
_$TrickPlayModelImpl( _TrickPlayModel(
{required this.width, {required this.width,
required this.height, required this.height,
required this.tileWidth, required this.tileWidth,
@ -195,9 +306,8 @@ class _$TrickPlayModelImpl extends _TrickPlayModel {
final List<String> images = const []}) final List<String> images = const []})
: _images = images, : _images = images,
super._(); super._();
factory _TrickPlayModel.fromJson(Map<String, dynamic> json) =>
factory _$TrickPlayModelImpl.fromJson(Map<String, dynamic> json) => _$TrickPlayModelFromJson(json);
_$$TrickPlayModelImplFromJson(json);
@override @override
final int width; final int width;
@ -220,61 +330,97 @@ class _$TrickPlayModelImpl extends _TrickPlayModel {
return EqualUnmodifiableListView(_images); 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 @override
String toString() { String toString() {
return 'TrickPlayModel(width: $width, height: $height, tileWidth: $tileWidth, tileHeight: $tileHeight, thumbnailCount: $thumbnailCount, interval: $interval, images: $images)'; 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 /// Create a copy of TrickPlayModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$TrickPlayModelImplCopyWith<_$TrickPlayModelImpl> get copyWith => $Res call({
__$$TrickPlayModelImplCopyWithImpl<_$TrickPlayModelImpl>( Object? width = null,
this, _$identity); Object? height = null,
Object? tileWidth = null,
@override Object? tileHeight = null,
Map<String, dynamic> toJson() { Object? thumbnailCount = null,
return _$$TrickPlayModelImplToJson( Object? interval = null,
this, 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 { // dart format on
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;
}

View file

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

View file

@ -15,10 +15,10 @@ part 'library_filters_model.freezed.dart';
part 'library_filters_model.g.dart'; part 'library_filters_model.g.dart';
@Freezed(copyWith: true) @Freezed(copyWith: true)
class LibraryFiltersModel with _$LibraryFiltersModel { abstract class LibraryFiltersModel with _$LibraryFiltersModel {
const LibraryFiltersModel._(); const LibraryFiltersModel._();
factory LibraryFiltersModel._internal({ factory LibraryFiltersModel({
required String id, required String id,
required String name, required String name,
required bool isFavourite, required bool isFavourite,
@ -46,7 +46,7 @@ class LibraryFiltersModel with _$LibraryFiltersModel {
bool? isFavourite, bool? isFavourite,
String? id, String? id,
}) { }) {
return LibraryFiltersModel._internal( return LibraryFiltersModel(
id: id ?? Xid().toString(), id: id ?? Xid().toString(),
name: name, name: name,
isFavourite: isFavourite ?? false, isFavourite: isFavourite ?? false,

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,185 +9,52 @@ part of 'library_filters_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
LibraryFiltersModel _$LibraryFiltersModelFromJson(Map<String, dynamic> json) {
return _LibraryFiltersModel.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$LibraryFiltersModel { mixin _$LibraryFiltersModel {
String get id => throw _privateConstructorUsedError; String get id;
String get name => throw _privateConstructorUsedError; String get name;
bool get isFavourite => throw _privateConstructorUsedError; bool get isFavourite;
List<String> get ids => throw _privateConstructorUsedError; List<String> get ids;
Map<String, bool> get genres => throw _privateConstructorUsedError; Map<String, bool> get genres;
Map<ItemFilter, bool> get filters => throw _privateConstructorUsedError; Map<ItemFilter, bool> get filters;
@StudioEncoder() @StudioEncoder()
Map<Studio, bool> get studios => throw _privateConstructorUsedError; Map<Studio, bool> get studios;
Map<String, bool> get tags => throw _privateConstructorUsedError; Map<String, bool> get tags;
Map<int, bool> get years => throw _privateConstructorUsedError; Map<int, bool> get years;
Map<String, bool> get officialRatings => throw _privateConstructorUsedError; Map<String, bool> get officialRatings;
Map<FladderItemType, bool> get types => throw _privateConstructorUsedError; Map<FladderItemType, bool> get types;
SortingOptions get sortingOption => throw _privateConstructorUsedError; SortingOptions get sortingOption;
SortingOrder get sortOrder => throw _privateConstructorUsedError; SortingOrder get sortOrder;
bool get favourites => throw _privateConstructorUsedError; bool get favourites;
bool get hideEmptyShows => throw _privateConstructorUsedError; bool get hideEmptyShows;
bool get recursive => throw _privateConstructorUsedError; bool get recursive;
GroupBy get groupBy => throw _privateConstructorUsedError; GroupBy get groupBy;
/// Serializes this LibraryFiltersModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of LibraryFiltersModel /// Create a copy of LibraryFiltersModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$LibraryFiltersModelCopyWith<LibraryFiltersModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $LibraryFiltersModelCopyWith<$Res> {
factory $LibraryFiltersModelCopyWith(
LibraryFiltersModel value, $Res Function(LibraryFiltersModel) then) =
_$LibraryFiltersModelCopyWithImpl<$Res, LibraryFiltersModel>;
@useResult
$Res call(
{String id,
String name,
bool isFavourite,
List<String> ids,
Map<String, bool> genres,
Map<ItemFilter, bool> filters,
@StudioEncoder() Map<Studio, bool> studios,
Map<String, bool> tags,
Map<int, bool> years,
Map<String, bool> officialRatings,
Map<FladderItemType, bool> types,
SortingOptions sortingOption,
SortingOrder sortOrder,
bool favourites,
bool hideEmptyShows,
bool recursive,
GroupBy groupBy});
}
/// @nodoc
class _$LibraryFiltersModelCopyWithImpl<$Res, $Val extends LibraryFiltersModel>
implements $LibraryFiltersModelCopyWith<$Res> {
_$LibraryFiltersModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of LibraryFiltersModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$LibraryFiltersModelCopyWith<LibraryFiltersModel> get copyWith =>
_$LibraryFiltersModelCopyWithImpl<LibraryFiltersModel>(
this as LibraryFiltersModel, _$identity);
/// Serializes this LibraryFiltersModel to a JSON map.
Map<String, dynamic> toJson();
@override @override
$Res call({ String toString() {
Object? id = null, return 'LibraryFiltersModel(id: $id, name: $name, isFavourite: $isFavourite, ids: $ids, genres: $genres, filters: $filters, studios: $studios, tags: $tags, years: $years, officialRatings: $officialRatings, types: $types, sortingOption: $sortingOption, sortOrder: $sortOrder, favourites: $favourites, hideEmptyShows: $hideEmptyShows, recursive: $recursive, groupBy: $groupBy)';
Object? name = null,
Object? isFavourite = null,
Object? ids = null,
Object? genres = null,
Object? filters = null,
Object? studios = null,
Object? tags = null,
Object? years = null,
Object? officialRatings = null,
Object? types = null,
Object? sortingOption = null,
Object? sortOrder = null,
Object? favourites = null,
Object? hideEmptyShows = null,
Object? recursive = null,
Object? groupBy = null,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
isFavourite: null == isFavourite
? _value.isFavourite
: isFavourite // ignore: cast_nullable_to_non_nullable
as bool,
ids: null == ids
? _value.ids
: ids // ignore: cast_nullable_to_non_nullable
as List<String>,
genres: null == genres
? _value.genres
: genres // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
filters: null == filters
? _value.filters
: filters // ignore: cast_nullable_to_non_nullable
as Map<ItemFilter, bool>,
studios: null == studios
? _value.studios
: studios // ignore: cast_nullable_to_non_nullable
as Map<Studio, bool>,
tags: null == tags
? _value.tags
: tags // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
years: null == years
? _value.years
: years // ignore: cast_nullable_to_non_nullable
as Map<int, bool>,
officialRatings: null == officialRatings
? _value.officialRatings
: officialRatings // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
types: null == types
? _value.types
: types // ignore: cast_nullable_to_non_nullable
as Map<FladderItemType, bool>,
sortingOption: null == sortingOption
? _value.sortingOption
: sortingOption // ignore: cast_nullable_to_non_nullable
as SortingOptions,
sortOrder: null == sortOrder
? _value.sortOrder
: sortOrder // ignore: cast_nullable_to_non_nullable
as SortingOrder,
favourites: null == favourites
? _value.favourites
: favourites // ignore: cast_nullable_to_non_nullable
as bool,
hideEmptyShows: null == hideEmptyShows
? _value.hideEmptyShows
: hideEmptyShows // ignore: cast_nullable_to_non_nullable
as bool,
recursive: null == recursive
? _value.recursive
: recursive // ignore: cast_nullable_to_non_nullable
as bool,
groupBy: null == groupBy
? _value.groupBy
: groupBy // ignore: cast_nullable_to_non_nullable
as GroupBy,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$LibraryFiltersModelImplCopyWith<$Res> abstract mixin class $LibraryFiltersModelCopyWith<$Res> {
implements $LibraryFiltersModelCopyWith<$Res> { factory $LibraryFiltersModelCopyWith(
factory _$$LibraryFiltersModelImplCopyWith(_$LibraryFiltersModelImpl value, LibraryFiltersModel value, $Res Function(LibraryFiltersModel) _then) =
$Res Function(_$LibraryFiltersModelImpl) then) = _$LibraryFiltersModelCopyWithImpl;
__$$LibraryFiltersModelImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{String id, {String id,
@ -210,12 +77,12 @@ abstract class _$$LibraryFiltersModelImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$LibraryFiltersModelImplCopyWithImpl<$Res> class _$LibraryFiltersModelCopyWithImpl<$Res>
extends _$LibraryFiltersModelCopyWithImpl<$Res, _$LibraryFiltersModelImpl> implements $LibraryFiltersModelCopyWith<$Res> {
implements _$$LibraryFiltersModelImplCopyWith<$Res> { _$LibraryFiltersModelCopyWithImpl(this._self, this._then);
__$$LibraryFiltersModelImplCopyWithImpl(_$LibraryFiltersModelImpl _value,
$Res Function(_$LibraryFiltersModelImpl) _then) final LibraryFiltersModel _self;
: super(_value, _then); final $Res Function(LibraryFiltersModel) _then;
/// Create a copy of LibraryFiltersModel /// Create a copy of LibraryFiltersModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -240,83 +107,345 @@ class __$$LibraryFiltersModelImplCopyWithImpl<$Res>
Object? recursive = null, Object? recursive = null,
Object? groupBy = null, Object? groupBy = null,
}) { }) {
return _then(_$LibraryFiltersModelImpl( return _then(_self.copyWith(
id: null == id id: null == id
? _value.id ? _self.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as String, as String,
name: null == name name: null == name
? _value.name ? _self.name
: name // ignore: cast_nullable_to_non_nullable : name // ignore: cast_nullable_to_non_nullable
as String, as String,
isFavourite: null == isFavourite isFavourite: null == isFavourite
? _value.isFavourite ? _self.isFavourite
: isFavourite // ignore: cast_nullable_to_non_nullable : isFavourite // ignore: cast_nullable_to_non_nullable
as bool, as bool,
ids: null == ids ids: null == ids
? _value._ids ? _self.ids
: ids // ignore: cast_nullable_to_non_nullable : ids // ignore: cast_nullable_to_non_nullable
as List<String>, as List<String>,
genres: null == genres genres: null == genres
? _value._genres ? _self.genres
: genres // ignore: cast_nullable_to_non_nullable : genres // ignore: cast_nullable_to_non_nullable
as Map<String, bool>, as Map<String, bool>,
filters: null == filters filters: null == filters
? _value._filters ? _self.filters
: filters // ignore: cast_nullable_to_non_nullable : filters // ignore: cast_nullable_to_non_nullable
as Map<ItemFilter, bool>, as Map<ItemFilter, bool>,
studios: null == studios studios: null == studios
? _value._studios ? _self.studios
: studios // ignore: cast_nullable_to_non_nullable : studios // ignore: cast_nullable_to_non_nullable
as Map<Studio, bool>, as Map<Studio, bool>,
tags: null == tags tags: null == tags
? _value._tags ? _self.tags
: tags // ignore: cast_nullable_to_non_nullable : tags // ignore: cast_nullable_to_non_nullable
as Map<String, bool>, as Map<String, bool>,
years: null == years years: null == years
? _value._years ? _self.years
: years // ignore: cast_nullable_to_non_nullable : years // ignore: cast_nullable_to_non_nullable
as Map<int, bool>, as Map<int, bool>,
officialRatings: null == officialRatings officialRatings: null == officialRatings
? _value._officialRatings ? _self.officialRatings
: officialRatings // ignore: cast_nullable_to_non_nullable : officialRatings // ignore: cast_nullable_to_non_nullable
as Map<String, bool>, as Map<String, bool>,
types: null == types types: null == types
? _value._types ? _self.types
: types // ignore: cast_nullable_to_non_nullable : types // ignore: cast_nullable_to_non_nullable
as Map<FladderItemType, bool>, as Map<FladderItemType, bool>,
sortingOption: null == sortingOption sortingOption: null == sortingOption
? _value.sortingOption ? _self.sortingOption
: sortingOption // ignore: cast_nullable_to_non_nullable : sortingOption // ignore: cast_nullable_to_non_nullable
as SortingOptions, as SortingOptions,
sortOrder: null == sortOrder sortOrder: null == sortOrder
? _value.sortOrder ? _self.sortOrder
: sortOrder // ignore: cast_nullable_to_non_nullable : sortOrder // ignore: cast_nullable_to_non_nullable
as SortingOrder, as SortingOrder,
favourites: null == favourites favourites: null == favourites
? _value.favourites ? _self.favourites
: favourites // ignore: cast_nullable_to_non_nullable : favourites // ignore: cast_nullable_to_non_nullable
as bool, as bool,
hideEmptyShows: null == hideEmptyShows hideEmptyShows: null == hideEmptyShows
? _value.hideEmptyShows ? _self.hideEmptyShows
: hideEmptyShows // ignore: cast_nullable_to_non_nullable : hideEmptyShows // ignore: cast_nullable_to_non_nullable
as bool, as bool,
recursive: null == recursive recursive: null == recursive
? _value.recursive ? _self.recursive
: recursive // ignore: cast_nullable_to_non_nullable : recursive // ignore: cast_nullable_to_non_nullable
as bool, as bool,
groupBy: null == groupBy groupBy: null == groupBy
? _value.groupBy ? _self.groupBy
: groupBy // ignore: cast_nullable_to_non_nullable : groupBy // ignore: cast_nullable_to_non_nullable
as GroupBy, as GroupBy,
)); ));
} }
} }
/// Adds pattern-matching-related methods to [LibraryFiltersModel].
extension LibraryFiltersModelPatterns on LibraryFiltersModel {
/// 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(_LibraryFiltersModel value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _LibraryFiltersModel() 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(_LibraryFiltersModel value) $default,
) {
final _that = this;
switch (_that) {
case _LibraryFiltersModel():
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(_LibraryFiltersModel value)? $default,
) {
final _that = this;
switch (_that) {
case _LibraryFiltersModel() when $default != null:
return $default(_that);
case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>(
TResult Function(
String id,
String name,
bool isFavourite,
List<String> ids,
Map<String, bool> genres,
Map<ItemFilter, bool> filters,
@StudioEncoder() Map<Studio, bool> studios,
Map<String, bool> tags,
Map<int, bool> years,
Map<String, bool> officialRatings,
Map<FladderItemType, bool> types,
SortingOptions sortingOption,
SortingOrder sortOrder,
bool favourites,
bool hideEmptyShows,
bool recursive,
GroupBy groupBy)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _LibraryFiltersModel() when $default != null:
return $default(
_that.id,
_that.name,
_that.isFavourite,
_that.ids,
_that.genres,
_that.filters,
_that.studios,
_that.tags,
_that.years,
_that.officialRatings,
_that.types,
_that.sortingOption,
_that.sortOrder,
_that.favourites,
_that.hideEmptyShows,
_that.recursive,
_that.groupBy);
case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function(
String id,
String name,
bool isFavourite,
List<String> ids,
Map<String, bool> genres,
Map<ItemFilter, bool> filters,
@StudioEncoder() Map<Studio, bool> studios,
Map<String, bool> tags,
Map<int, bool> years,
Map<String, bool> officialRatings,
Map<FladderItemType, bool> types,
SortingOptions sortingOption,
SortingOrder sortOrder,
bool favourites,
bool hideEmptyShows,
bool recursive,
GroupBy groupBy)
$default,
) {
final _that = this;
switch (_that) {
case _LibraryFiltersModel():
return $default(
_that.id,
_that.name,
_that.isFavourite,
_that.ids,
_that.genres,
_that.filters,
_that.studios,
_that.tags,
_that.years,
_that.officialRatings,
_that.types,
_that.sortingOption,
_that.sortOrder,
_that.favourites,
_that.hideEmptyShows,
_that.recursive,
_that.groupBy);
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(
String id,
String name,
bool isFavourite,
List<String> ids,
Map<String, bool> genres,
Map<ItemFilter, bool> filters,
@StudioEncoder() Map<Studio, bool> studios,
Map<String, bool> tags,
Map<int, bool> years,
Map<String, bool> officialRatings,
Map<FladderItemType, bool> types,
SortingOptions sortingOption,
SortingOrder sortOrder,
bool favourites,
bool hideEmptyShows,
bool recursive,
GroupBy groupBy)?
$default,
) {
final _that = this;
switch (_that) {
case _LibraryFiltersModel() when $default != null:
return $default(
_that.id,
_that.name,
_that.isFavourite,
_that.ids,
_that.genres,
_that.filters,
_that.studios,
_that.tags,
_that.years,
_that.officialRatings,
_that.types,
_that.sortingOption,
_that.sortOrder,
_that.favourites,
_that.hideEmptyShows,
_that.recursive,
_that.groupBy);
case _:
return null;
}
}
}
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$LibraryFiltersModelImpl extends _LibraryFiltersModel { class _LibraryFiltersModel extends LibraryFiltersModel {
_$LibraryFiltersModelImpl( _LibraryFiltersModel(
{required this.id, {required this.id,
required this.name, required this.name,
required this.isFavourite, required this.isFavourite,
@ -343,9 +472,8 @@ class _$LibraryFiltersModelImpl extends _LibraryFiltersModel {
_officialRatings = officialRatings, _officialRatings = officialRatings,
_types = types, _types = types,
super._(); super._();
factory _LibraryFiltersModel.fromJson(Map<String, dynamic> json) =>
factory _$LibraryFiltersModelImpl.fromJson(Map<String, dynamic> json) => _$LibraryFiltersModelFromJson(json);
_$$LibraryFiltersModelImplFromJson(json);
@override @override
final String id; final String id;
@ -431,92 +559,158 @@ class _$LibraryFiltersModelImpl extends _LibraryFiltersModel {
@override @override
final GroupBy groupBy; final GroupBy groupBy;
@override
String toString() {
return 'LibraryFiltersModel._internal(id: $id, name: $name, isFavourite: $isFavourite, ids: $ids, genres: $genres, filters: $filters, studios: $studios, tags: $tags, years: $years, officialRatings: $officialRatings, types: $types, sortingOption: $sortingOption, sortOrder: $sortOrder, favourites: $favourites, hideEmptyShows: $hideEmptyShows, recursive: $recursive, groupBy: $groupBy)';
}
/// Create a copy of LibraryFiltersModel /// Create a copy of LibraryFiltersModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$LibraryFiltersModelImplCopyWith<_$LibraryFiltersModelImpl> get copyWith => _$LibraryFiltersModelCopyWith<_LibraryFiltersModel> get copyWith =>
__$$LibraryFiltersModelImplCopyWithImpl<_$LibraryFiltersModelImpl>( __$LibraryFiltersModelCopyWithImpl<_LibraryFiltersModel>(
this, _$identity); this, _$identity);
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$LibraryFiltersModelImplToJson( return _$LibraryFiltersModelToJson(
this, this,
); );
} }
@override
String toString() {
return 'LibraryFiltersModel(id: $id, name: $name, isFavourite: $isFavourite, ids: $ids, genres: $genres, filters: $filters, studios: $studios, tags: $tags, years: $years, officialRatings: $officialRatings, types: $types, sortingOption: $sortingOption, sortOrder: $sortOrder, favourites: $favourites, hideEmptyShows: $hideEmptyShows, recursive: $recursive, groupBy: $groupBy)';
}
} }
abstract class _LibraryFiltersModel extends LibraryFiltersModel { /// @nodoc
factory _LibraryFiltersModel( abstract mixin class _$LibraryFiltersModelCopyWith<$Res>
{required final String id, implements $LibraryFiltersModelCopyWith<$Res> {
required final String name, factory _$LibraryFiltersModelCopyWith(_LibraryFiltersModel value,
required final bool isFavourite, $Res Function(_LibraryFiltersModel) _then) =
required final List<String> ids, __$LibraryFiltersModelCopyWithImpl;
required final Map<String, bool> genres, @override
required final Map<ItemFilter, bool> filters, @useResult
@StudioEncoder() required final Map<Studio, bool> studios, $Res call(
required final Map<String, bool> tags, {String id,
required final Map<int, bool> years, String name,
required final Map<String, bool> officialRatings, bool isFavourite,
required final Map<FladderItemType, bool> types, List<String> ids,
required final SortingOptions sortingOption, Map<String, bool> genres,
required final SortingOrder sortOrder, Map<ItemFilter, bool> filters,
required final bool favourites, @StudioEncoder() Map<Studio, bool> studios,
required final bool hideEmptyShows, Map<String, bool> tags,
required final bool recursive, Map<int, bool> years,
required final GroupBy groupBy}) = _$LibraryFiltersModelImpl; Map<String, bool> officialRatings,
_LibraryFiltersModel._() : super._(); Map<FladderItemType, bool> types,
SortingOptions sortingOption,
SortingOrder sortOrder,
bool favourites,
bool hideEmptyShows,
bool recursive,
GroupBy groupBy});
}
factory _LibraryFiltersModel.fromJson(Map<String, dynamic> json) = /// @nodoc
_$LibraryFiltersModelImpl.fromJson; class __$LibraryFiltersModelCopyWithImpl<$Res>
implements _$LibraryFiltersModelCopyWith<$Res> {
__$LibraryFiltersModelCopyWithImpl(this._self, this._then);
@override final _LibraryFiltersModel _self;
String get id; final $Res Function(_LibraryFiltersModel) _then;
@override
String get name;
@override
bool get isFavourite;
@override
List<String> get ids;
@override
Map<String, bool> get genres;
@override
Map<ItemFilter, bool> get filters;
@override
@StudioEncoder()
Map<Studio, bool> get studios;
@override
Map<String, bool> get tags;
@override
Map<int, bool> get years;
@override
Map<String, bool> get officialRatings;
@override
Map<FladderItemType, bool> get types;
@override
SortingOptions get sortingOption;
@override
SortingOrder get sortOrder;
@override
bool get favourites;
@override
bool get hideEmptyShows;
@override
bool get recursive;
@override
GroupBy get groupBy;
/// Create a copy of LibraryFiltersModel /// Create a copy of LibraryFiltersModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline')
_$$LibraryFiltersModelImplCopyWith<_$LibraryFiltersModelImpl> get copyWith => $Res call({
throw _privateConstructorUsedError; Object? id = null,
Object? name = null,
Object? isFavourite = null,
Object? ids = null,
Object? genres = null,
Object? filters = null,
Object? studios = null,
Object? tags = null,
Object? years = null,
Object? officialRatings = null,
Object? types = null,
Object? sortingOption = null,
Object? sortOrder = null,
Object? favourites = null,
Object? hideEmptyShows = null,
Object? recursive = null,
Object? groupBy = null,
}) {
return _then(_LibraryFiltersModel(
id: null == id
? _self.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _self.name
: name // ignore: cast_nullable_to_non_nullable
as String,
isFavourite: null == isFavourite
? _self.isFavourite
: isFavourite // ignore: cast_nullable_to_non_nullable
as bool,
ids: null == ids
? _self._ids
: ids // ignore: cast_nullable_to_non_nullable
as List<String>,
genres: null == genres
? _self._genres
: genres // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
filters: null == filters
? _self._filters
: filters // ignore: cast_nullable_to_non_nullable
as Map<ItemFilter, bool>,
studios: null == studios
? _self._studios
: studios // ignore: cast_nullable_to_non_nullable
as Map<Studio, bool>,
tags: null == tags
? _self._tags
: tags // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
years: null == years
? _self._years
: years // ignore: cast_nullable_to_non_nullable
as Map<int, bool>,
officialRatings: null == officialRatings
? _self._officialRatings
: officialRatings // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
types: null == types
? _self._types
: types // ignore: cast_nullable_to_non_nullable
as Map<FladderItemType, bool>,
sortingOption: null == sortingOption
? _self.sortingOption
: sortingOption // ignore: cast_nullable_to_non_nullable
as SortingOptions,
sortOrder: null == sortOrder
? _self.sortOrder
: sortOrder // ignore: cast_nullable_to_non_nullable
as SortingOrder,
favourites: null == favourites
? _self.favourites
: favourites // ignore: cast_nullable_to_non_nullable
as bool,
hideEmptyShows: null == hideEmptyShows
? _self.hideEmptyShows
: hideEmptyShows // ignore: cast_nullable_to_non_nullable
as bool,
recursive: null == recursive
? _self.recursive
: recursive // ignore: cast_nullable_to_non_nullable
as bool,
groupBy: null == groupBy
? _self.groupBy
: groupBy // ignore: cast_nullable_to_non_nullable
as GroupBy,
));
}
} }
// dart format on

View file

@ -6,9 +6,8 @@ part of 'library_filters_model.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$LibraryFiltersModelImpl _$$LibraryFiltersModelImplFromJson( _LibraryFiltersModel _$LibraryFiltersModelFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _LibraryFiltersModel(
_$LibraryFiltersModelImpl(
id: json['id'] as String, id: json['id'] as String,
name: json['name'] as String, name: json['name'] as String,
isFavourite: json['isFavourite'] as bool, isFavourite: json['isFavourite'] as bool,
@ -35,8 +34,8 @@ _$LibraryFiltersModelImpl _$$LibraryFiltersModelImplFromJson(
groupBy: $enumDecode(_$GroupByEnumMap, json['groupBy']), groupBy: $enumDecode(_$GroupByEnumMap, json['groupBy']),
); );
Map<String, dynamic> _$$LibraryFiltersModelImplToJson( Map<String, dynamic> _$LibraryFiltersModelToJson(
_$LibraryFiltersModelImpl instance) => _LibraryFiltersModel instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'name': instance.name, 'name': instance.name,

View file

@ -182,15 +182,15 @@ class LibrarySearchModelMapper extends ClassMapperBase<LibrarySearchModel> {
mixin LibrarySearchModelMappable { mixin LibrarySearchModelMappable {
LibrarySearchModelCopyWith<LibrarySearchModel, LibrarySearchModel, LibrarySearchModelCopyWith<LibrarySearchModel, LibrarySearchModel,
LibrarySearchModel> LibrarySearchModel>
get copyWith => _LibrarySearchModelCopyWithImpl( get copyWith => _LibrarySearchModelCopyWithImpl<LibrarySearchModel,
this as LibrarySearchModel, $identity, $identity); LibrarySearchModel>(this as LibrarySearchModel, $identity, $identity);
} }
extension LibrarySearchModelValueCopy<$R, $Out> extension LibrarySearchModelValueCopy<$R, $Out>
on ObjectCopyWith<$R, LibrarySearchModel, $Out> { on ObjectCopyWith<$R, LibrarySearchModel, $Out> {
LibrarySearchModelCopyWith<$R, LibrarySearchModel, $Out> LibrarySearchModelCopyWith<$R, LibrarySearchModel, $Out>
get $asLibrarySearchModel => get $asLibrarySearchModel => $base.as(
$base.as((v, t, t2) => _LibrarySearchModelCopyWithImpl(v, t, t2)); (v, t, t2) => _LibrarySearchModelCopyWithImpl<$R, $Out>(v, t, t2));
} }
abstract class LibrarySearchModelCopyWith<$R, $In extends LibrarySearchModel, abstract class LibrarySearchModelCopyWith<$R, $In extends LibrarySearchModel,
@ -391,5 +391,5 @@ class _LibrarySearchModelCopyWithImpl<$R, $Out>
@override @override
LibrarySearchModelCopyWith<$R2, LibrarySearchModel, $Out2> $chain<$R2, $Out2>( LibrarySearchModelCopyWith<$R2, LibrarySearchModel, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) => Then<$Out2, $R2> t) =>
_LibrarySearchModelCopyWithImpl($value, $cast, t); _LibrarySearchModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
} }

View file

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

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,20 +9,180 @@ part of 'arguments_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc /// @nodoc
mixin _$ArgumentsModel { 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 /// @nodoc
class _$ArgumentsModelImpl extends _ArgumentsModel { class _ArgumentsModel extends ArgumentsModel {
_$ArgumentsModelImpl({this.htpcMode = false}) : super._(); _ArgumentsModel({this.htpcMode = false}) : super._();
@override @override
@JsonKey() @JsonKey()
@ -34,10 +194,4 @@ class _$ArgumentsModelImpl extends _ArgumentsModel {
} }
} }
abstract class _ArgumentsModel extends ArgumentsModel { // dart format on
factory _ArgumentsModel({final bool htpcMode}) = _$ArgumentsModelImpl;
_ArgumentsModel._() : super._();
@override
bool get htpcMode;
}

View file

@ -51,7 +51,7 @@ enum BackgroundType {
} }
@Freezed(copyWith: true) @Freezed(copyWith: true)
class ClientSettingsModel with _$ClientSettingsModel { abstract class ClientSettingsModel with _$ClientSettingsModel {
const ClientSettingsModel._(); const ClientSettingsModel._();
factory 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 // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson( _ClientSettingsModel _$ClientSettingsModelFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _ClientSettingsModel(
_$ClientSettingsModelImpl(
syncPath: json['syncPath'] as String?, syncPath: json['syncPath'] as String?,
position: json['position'] == null position: json['position'] == null
? const Vector2(x: 0, y: 0) ? const Vector2(x: 0, y: 0)
@ -55,8 +54,8 @@ _$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson(
const {}, const {},
); );
Map<String, dynamic> _$$ClientSettingsModelImplToJson( Map<String, dynamic> _$ClientSettingsModelToJson(
_$ClientSettingsModelImpl instance) => _ClientSettingsModel instance) =>
<String, dynamic>{ <String, dynamic>{
'syncPath': instance.syncPath, 'syncPath': instance.syncPath,
'position': instance.position, 'position': instance.position,

View file

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

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,101 +9,39 @@ part of 'home_settings_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
HomeSettingsModel _$HomeSettingsModelFromJson(Map<String, dynamic> json) {
return _HomeSettingsModel.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$HomeSettingsModel { mixin _$HomeSettingsModel {
Set<LayoutMode> get screenLayouts => throw _privateConstructorUsedError; Set<LayoutMode> get screenLayouts;
Set<ViewSize> get layoutStates => throw _privateConstructorUsedError; Set<ViewSize> get layoutStates;
HomeBanner get homeBanner => throw _privateConstructorUsedError; HomeBanner get homeBanner;
HomeCarouselSettings get carouselSettings => HomeCarouselSettings get carouselSettings;
throw _privateConstructorUsedError; HomeNextUp get nextUp;
HomeNextUp get nextUp => throw _privateConstructorUsedError;
/// Serializes this HomeSettingsModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of HomeSettingsModel /// Create a copy of HomeSettingsModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @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') @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 @override
$Res call({ String toString() {
Object? screenLayouts = null, return 'HomeSettingsModel(screenLayouts: $screenLayouts, layoutStates: $layoutStates, homeBanner: $homeBanner, carouselSettings: $carouselSettings, nextUp: $nextUp)';
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);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$HomeSettingsModelImplCopyWith<$Res> abstract mixin class $HomeSettingsModelCopyWith<$Res> {
implements $HomeSettingsModelCopyWith<$Res> { factory $HomeSettingsModelCopyWith(
factory _$$HomeSettingsModelImplCopyWith(_$HomeSettingsModelImpl value, HomeSettingsModel value, $Res Function(HomeSettingsModel) _then) =
$Res Function(_$HomeSettingsModelImpl) then) = _$HomeSettingsModelCopyWithImpl;
__$$HomeSettingsModelImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{Set<LayoutMode> screenLayouts, {Set<LayoutMode> screenLayouts,
@ -114,12 +52,12 @@ abstract class _$$HomeSettingsModelImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$HomeSettingsModelImplCopyWithImpl<$Res> class _$HomeSettingsModelCopyWithImpl<$Res>
extends _$HomeSettingsModelCopyWithImpl<$Res, _$HomeSettingsModelImpl> implements $HomeSettingsModelCopyWith<$Res> {
implements _$$HomeSettingsModelImplCopyWith<$Res> { _$HomeSettingsModelCopyWithImpl(this._self, this._then);
__$$HomeSettingsModelImplCopyWithImpl(_$HomeSettingsModelImpl _value,
$Res Function(_$HomeSettingsModelImpl) _then) final HomeSettingsModel _self;
: super(_value, _then); final $Res Function(HomeSettingsModel) _then;
/// Create a copy of HomeSettingsModel /// Create a copy of HomeSettingsModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -132,35 +70,213 @@ class __$$HomeSettingsModelImplCopyWithImpl<$Res>
Object? carouselSettings = null, Object? carouselSettings = null,
Object? nextUp = null, Object? nextUp = null,
}) { }) {
return _then(_$HomeSettingsModelImpl( return _then(_self.copyWith(
screenLayouts: null == screenLayouts screenLayouts: null == screenLayouts
? _value._screenLayouts ? _self.screenLayouts
: screenLayouts // ignore: cast_nullable_to_non_nullable : screenLayouts // ignore: cast_nullable_to_non_nullable
as Set<LayoutMode>, as Set<LayoutMode>,
layoutStates: null == layoutStates layoutStates: null == layoutStates
? _value._layoutStates ? _self.layoutStates
: layoutStates // ignore: cast_nullable_to_non_nullable : layoutStates // ignore: cast_nullable_to_non_nullable
as Set<ViewSize>, as Set<ViewSize>,
homeBanner: null == homeBanner homeBanner: null == homeBanner
? _value.homeBanner ? _self.homeBanner
: homeBanner // ignore: cast_nullable_to_non_nullable : homeBanner // ignore: cast_nullable_to_non_nullable
as HomeBanner, as HomeBanner,
carouselSettings: null == carouselSettings carouselSettings: null == carouselSettings
? _value.carouselSettings ? _self.carouselSettings
: carouselSettings // ignore: cast_nullable_to_non_nullable : carouselSettings // ignore: cast_nullable_to_non_nullable
as HomeCarouselSettings, as HomeCarouselSettings,
nextUp: null == nextUp nextUp: null == nextUp
? _value.nextUp ? _self.nextUp
: nextUp // ignore: cast_nullable_to_non_nullable : nextUp // ignore: cast_nullable_to_non_nullable
as HomeNextUp, 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 /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$HomeSettingsModelImpl implements _HomeSettingsModel { class _HomeSettingsModel implements HomeSettingsModel {
_$HomeSettingsModelImpl( _HomeSettingsModel(
{final Set<LayoutMode> screenLayouts = const {...LayoutMode.values}, {final Set<LayoutMode> screenLayouts = const {...LayoutMode.values},
final Set<ViewSize> layoutStates = const {...ViewSize.values}, final Set<ViewSize> layoutStates = const {...ViewSize.values},
this.homeBanner = HomeBanner.carousel, this.homeBanner = HomeBanner.carousel,
@ -168,9 +284,8 @@ class _$HomeSettingsModelImpl implements _HomeSettingsModel {
this.nextUp = HomeNextUp.separate}) this.nextUp = HomeNextUp.separate})
: _screenLayouts = screenLayouts, : _screenLayouts = screenLayouts,
_layoutStates = layoutStates; _layoutStates = layoutStates;
factory _HomeSettingsModel.fromJson(Map<String, dynamic> json) =>
factory _$HomeSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$HomeSettingsModelFromJson(json);
_$$HomeSettingsModelImplFromJson(json);
final Set<LayoutMode> _screenLayouts; final Set<LayoutMode> _screenLayouts;
@override @override
@ -200,54 +315,85 @@ class _$HomeSettingsModelImpl implements _HomeSettingsModel {
@JsonKey() @JsonKey()
final HomeNextUp nextUp; 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 @override
String toString() { String toString() {
return 'HomeSettingsModel(screenLayouts: $screenLayouts, layoutStates: $layoutStates, homeBanner: $homeBanner, carouselSettings: $carouselSettings, nextUp: $nextUp)'; 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 /// Create a copy of HomeSettingsModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$HomeSettingsModelImplCopyWith<_$HomeSettingsModelImpl> get copyWith => $Res call({
__$$HomeSettingsModelImplCopyWithImpl<_$HomeSettingsModelImpl>( Object? screenLayouts = null,
this, _$identity); Object? layoutStates = null,
Object? homeBanner = null,
@override Object? carouselSettings = null,
Map<String, dynamic> toJson() { Object? nextUp = null,
return _$$HomeSettingsModelImplToJson( }) {
this, 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 { // dart format on
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;
}

View file

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

View file

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

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,97 +9,42 @@ part of 'key_combinations.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
KeyCombination _$KeyCombinationFromJson(Map<String, dynamic> json) {
return _KeyCombination.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$KeyCombination { mixin _$KeyCombination {
@LogicalKeyboardSerializer() @LogicalKeyboardSerializer()
LogicalKeyboardKey? get key => throw _privateConstructorUsedError; LogicalKeyboardKey? get key;
@LogicalKeyboardSerializer() @LogicalKeyboardSerializer()
LogicalKeyboardKey? get modifier => throw _privateConstructorUsedError; LogicalKeyboardKey? get modifier;
@LogicalKeyboardSerializer() @LogicalKeyboardSerializer()
LogicalKeyboardKey? get altKey => throw _privateConstructorUsedError; LogicalKeyboardKey? get altKey;
@LogicalKeyboardSerializer() @LogicalKeyboardSerializer()
LogicalKeyboardKey? get altModifier => throw _privateConstructorUsedError; LogicalKeyboardKey? get altModifier;
/// Serializes this KeyCombination to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of KeyCombination /// Create a copy of KeyCombination
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @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') @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 @override
$Res call({ String toString() {
Object? key = freezed, return 'KeyCombination(key: $key, modifier: $modifier, altKey: $altKey, altModifier: $altModifier)';
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);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$KeyCombinationImplCopyWith<$Res> abstract mixin class $KeyCombinationCopyWith<$Res> {
implements $KeyCombinationCopyWith<$Res> { factory $KeyCombinationCopyWith(
factory _$$KeyCombinationImplCopyWith(_$KeyCombinationImpl value, KeyCombination value, $Res Function(KeyCombination) _then) =
$Res Function(_$KeyCombinationImpl) then) = _$KeyCombinationCopyWithImpl;
__$$KeyCombinationImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{@LogicalKeyboardSerializer() LogicalKeyboardKey? key, {@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
@ -109,12 +54,12 @@ abstract class _$$KeyCombinationImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$KeyCombinationImplCopyWithImpl<$Res> class _$KeyCombinationCopyWithImpl<$Res>
extends _$KeyCombinationCopyWithImpl<$Res, _$KeyCombinationImpl> implements $KeyCombinationCopyWith<$Res> {
implements _$$KeyCombinationImplCopyWith<$Res> { _$KeyCombinationCopyWithImpl(this._self, this._then);
__$$KeyCombinationImplCopyWithImpl(
_$KeyCombinationImpl _value, $Res Function(_$KeyCombinationImpl) _then) final KeyCombination _self;
: super(_value, _then); final $Res Function(KeyCombination) _then;
/// Create a copy of KeyCombination /// Create a copy of KeyCombination
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -126,39 +71,213 @@ class __$$KeyCombinationImplCopyWithImpl<$Res>
Object? altKey = freezed, Object? altKey = freezed,
Object? altModifier = freezed, Object? altModifier = freezed,
}) { }) {
return _then(_$KeyCombinationImpl( return _then(_self.copyWith(
key: freezed == key key: freezed == key
? _value.key ? _self.key
: key // ignore: cast_nullable_to_non_nullable : key // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?, as LogicalKeyboardKey?,
modifier: freezed == modifier modifier: freezed == modifier
? _value.modifier ? _self.modifier
: modifier // ignore: cast_nullable_to_non_nullable : modifier // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?, as LogicalKeyboardKey?,
altKey: freezed == altKey altKey: freezed == altKey
? _value.altKey ? _self.altKey
: altKey // ignore: cast_nullable_to_non_nullable : altKey // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?, as LogicalKeyboardKey?,
altModifier: freezed == altModifier altModifier: freezed == altModifier
? _value.altModifier ? _self.altModifier
: altModifier // ignore: cast_nullable_to_non_nullable : altModifier // ignore: cast_nullable_to_non_nullable
as LogicalKeyboardKey?, 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 /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$KeyCombinationImpl extends _KeyCombination { class _KeyCombination extends KeyCombination {
_$KeyCombinationImpl( _KeyCombination(
{@LogicalKeyboardSerializer() this.key, {@LogicalKeyboardSerializer() this.key,
@LogicalKeyboardSerializer() this.modifier, @LogicalKeyboardSerializer() this.modifier,
@LogicalKeyboardSerializer() this.altKey, @LogicalKeyboardSerializer() this.altKey,
@LogicalKeyboardSerializer() this.altModifier}) @LogicalKeyboardSerializer() this.altModifier})
: super._(); : super._();
factory _KeyCombination.fromJson(Map<String, dynamic> json) =>
factory _$KeyCombinationImpl.fromJson(Map<String, dynamic> json) => _$KeyCombinationFromJson(json);
_$$KeyCombinationImplFromJson(json);
@override @override
@LogicalKeyboardSerializer() @LogicalKeyboardSerializer()
@ -173,57 +292,79 @@ class _$KeyCombinationImpl extends _KeyCombination {
@LogicalKeyboardSerializer() @LogicalKeyboardSerializer()
final LogicalKeyboardKey? altModifier; 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 @override
String toString() { String toString() {
return 'KeyCombination(key: $key, modifier: $modifier, altKey: $altKey, altModifier: $altModifier)'; 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 /// Create a copy of KeyCombination
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$KeyCombinationImplCopyWith<_$KeyCombinationImpl> get copyWith => $Res call({
__$$KeyCombinationImplCopyWithImpl<_$KeyCombinationImpl>( Object? key = freezed,
this, _$identity); Object? modifier = freezed,
Object? altKey = freezed,
@override Object? altModifier = freezed,
Map<String, dynamic> toJson() { }) {
return _$$KeyCombinationImplToJson( return _then(_KeyCombination(
this, 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 { // dart format on
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;
}

View file

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

View file

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

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,176 +9,70 @@ part of 'video_player_settings.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
VideoPlayerSettingsModel _$VideoPlayerSettingsModelFromJson(
Map<String, dynamic> json) {
return _VideoPlayerSettingsModel.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$VideoPlayerSettingsModel { mixin _$VideoPlayerSettingsModel implements DiagnosticableTreeMixin {
double? get screenBrightness => throw _privateConstructorUsedError; double? get screenBrightness;
BoxFit get videoFit => throw _privateConstructorUsedError; BoxFit get videoFit;
bool get fillScreen => throw _privateConstructorUsedError; bool get fillScreen;
bool get hardwareAccel => throw _privateConstructorUsedError; bool get hardwareAccel;
bool get useLibass => throw _privateConstructorUsedError; bool get useLibass;
int get bufferSize => throw _privateConstructorUsedError; int get bufferSize;
PlayerOptions? get playerOptions => throw _privateConstructorUsedError; PlayerOptions? get playerOptions;
double get internalVolume => throw _privateConstructorUsedError; double get internalVolume;
Set<DeviceOrientation>? get allowedOrientations => Set<DeviceOrientation>? get allowedOrientations;
throw _privateConstructorUsedError; AutoNextType get nextVideoType;
AutoNextType get nextVideoType => throw _privateConstructorUsedError; Bitrate get maxHomeBitrate;
Bitrate get maxHomeBitrate => throw _privateConstructorUsedError; Bitrate get maxInternetBitrate;
Bitrate get maxInternetBitrate => throw _privateConstructorUsedError; String? get audioDevice;
String? get audioDevice => throw _privateConstructorUsedError; Map<MediaSegmentType, SegmentSkip> get segmentSkipSettings;
Map<MediaSegmentType, SegmentSkip> get segmentSkipSettings => Map<VideoHotKeys, KeyCombination> get hotKeys;
throw _privateConstructorUsedError;
Map<VideoHotKeys, KeyCombination> get hotKeys =>
throw _privateConstructorUsedError;
/// Serializes this VideoPlayerSettingsModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of VideoPlayerSettingsModel /// Create a copy of VideoPlayerSettingsModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @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') @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 @override
$Res call({ void debugFillProperties(DiagnosticPropertiesBuilder properties) {
Object? screenBrightness = freezed, properties
Object? videoFit = null, ..add(DiagnosticsProperty('type', 'VideoPlayerSettingsModel'))
Object? fillScreen = null, ..add(DiagnosticsProperty('screenBrightness', screenBrightness))
Object? hardwareAccel = null, ..add(DiagnosticsProperty('videoFit', videoFit))
Object? useLibass = null, ..add(DiagnosticsProperty('fillScreen', fillScreen))
Object? bufferSize = null, ..add(DiagnosticsProperty('hardwareAccel', hardwareAccel))
Object? playerOptions = freezed, ..add(DiagnosticsProperty('useLibass', useLibass))
Object? internalVolume = null, ..add(DiagnosticsProperty('bufferSize', bufferSize))
Object? allowedOrientations = freezed, ..add(DiagnosticsProperty('playerOptions', playerOptions))
Object? nextVideoType = null, ..add(DiagnosticsProperty('internalVolume', internalVolume))
Object? maxHomeBitrate = null, ..add(DiagnosticsProperty('allowedOrientations', allowedOrientations))
Object? maxInternetBitrate = null, ..add(DiagnosticsProperty('nextVideoType', nextVideoType))
Object? audioDevice = freezed, ..add(DiagnosticsProperty('maxHomeBitrate', maxHomeBitrate))
Object? segmentSkipSettings = null, ..add(DiagnosticsProperty('maxInternetBitrate', maxInternetBitrate))
Object? hotKeys = null, ..add(DiagnosticsProperty('audioDevice', audioDevice))
}) { ..add(DiagnosticsProperty('segmentSkipSettings', segmentSkipSettings))
return _then(_value.copyWith( ..add(DiagnosticsProperty('hotKeys', hotKeys));
screenBrightness: freezed == screenBrightness }
? _value.screenBrightness
: screenBrightness // ignore: cast_nullable_to_non_nullable @override
as double?, String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
videoFit: null == videoFit 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)';
? _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);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$VideoPlayerSettingsModelImplCopyWith<$Res> abstract mixin class $VideoPlayerSettingsModelCopyWith<$Res> {
implements $VideoPlayerSettingsModelCopyWith<$Res> { factory $VideoPlayerSettingsModelCopyWith(VideoPlayerSettingsModel value,
factory _$$VideoPlayerSettingsModelImplCopyWith( $Res Function(VideoPlayerSettingsModel) _then) =
_$VideoPlayerSettingsModelImpl value, _$VideoPlayerSettingsModelCopyWithImpl;
$Res Function(_$VideoPlayerSettingsModelImpl) then) =
__$$VideoPlayerSettingsModelImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{double? screenBrightness, {double? screenBrightness,
@ -199,14 +93,12 @@ abstract class _$$VideoPlayerSettingsModelImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$VideoPlayerSettingsModelImplCopyWithImpl<$Res> class _$VideoPlayerSettingsModelCopyWithImpl<$Res>
extends _$VideoPlayerSettingsModelCopyWithImpl<$Res, implements $VideoPlayerSettingsModelCopyWith<$Res> {
_$VideoPlayerSettingsModelImpl> _$VideoPlayerSettingsModelCopyWithImpl(this._self, this._then);
implements _$$VideoPlayerSettingsModelImplCopyWith<$Res> {
__$$VideoPlayerSettingsModelImplCopyWithImpl( final VideoPlayerSettingsModel _self;
_$VideoPlayerSettingsModelImpl _value, final $Res Function(VideoPlayerSettingsModel) _then;
$Res Function(_$VideoPlayerSettingsModelImpl) _then)
: super(_value, _then);
/// Create a copy of VideoPlayerSettingsModel /// Create a copy of VideoPlayerSettingsModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -229,76 +121,326 @@ class __$$VideoPlayerSettingsModelImplCopyWithImpl<$Res>
Object? segmentSkipSettings = null, Object? segmentSkipSettings = null,
Object? hotKeys = null, Object? hotKeys = null,
}) { }) {
return _then(_$VideoPlayerSettingsModelImpl( return _then(_self.copyWith(
screenBrightness: freezed == screenBrightness screenBrightness: freezed == screenBrightness
? _value.screenBrightness ? _self.screenBrightness
: screenBrightness // ignore: cast_nullable_to_non_nullable : screenBrightness // ignore: cast_nullable_to_non_nullable
as double?, as double?,
videoFit: null == videoFit videoFit: null == videoFit
? _value.videoFit ? _self.videoFit
: videoFit // ignore: cast_nullable_to_non_nullable : videoFit // ignore: cast_nullable_to_non_nullable
as BoxFit, as BoxFit,
fillScreen: null == fillScreen fillScreen: null == fillScreen
? _value.fillScreen ? _self.fillScreen
: fillScreen // ignore: cast_nullable_to_non_nullable : fillScreen // ignore: cast_nullable_to_non_nullable
as bool, as bool,
hardwareAccel: null == hardwareAccel hardwareAccel: null == hardwareAccel
? _value.hardwareAccel ? _self.hardwareAccel
: hardwareAccel // ignore: cast_nullable_to_non_nullable : hardwareAccel // ignore: cast_nullable_to_non_nullable
as bool, as bool,
useLibass: null == useLibass useLibass: null == useLibass
? _value.useLibass ? _self.useLibass
: useLibass // ignore: cast_nullable_to_non_nullable : useLibass // ignore: cast_nullable_to_non_nullable
as bool, as bool,
bufferSize: null == bufferSize bufferSize: null == bufferSize
? _value.bufferSize ? _self.bufferSize
: bufferSize // ignore: cast_nullable_to_non_nullable : bufferSize // ignore: cast_nullable_to_non_nullable
as int, as int,
playerOptions: freezed == playerOptions playerOptions: freezed == playerOptions
? _value.playerOptions ? _self.playerOptions
: playerOptions // ignore: cast_nullable_to_non_nullable : playerOptions // ignore: cast_nullable_to_non_nullable
as PlayerOptions?, as PlayerOptions?,
internalVolume: null == internalVolume internalVolume: null == internalVolume
? _value.internalVolume ? _self.internalVolume
: internalVolume // ignore: cast_nullable_to_non_nullable : internalVolume // ignore: cast_nullable_to_non_nullable
as double, as double,
allowedOrientations: freezed == allowedOrientations allowedOrientations: freezed == allowedOrientations
? _value._allowedOrientations ? _self.allowedOrientations
: allowedOrientations // ignore: cast_nullable_to_non_nullable : allowedOrientations // ignore: cast_nullable_to_non_nullable
as Set<DeviceOrientation>?, as Set<DeviceOrientation>?,
nextVideoType: null == nextVideoType nextVideoType: null == nextVideoType
? _value.nextVideoType ? _self.nextVideoType
: nextVideoType // ignore: cast_nullable_to_non_nullable : nextVideoType // ignore: cast_nullable_to_non_nullable
as AutoNextType, as AutoNextType,
maxHomeBitrate: null == maxHomeBitrate maxHomeBitrate: null == maxHomeBitrate
? _value.maxHomeBitrate ? _self.maxHomeBitrate
: maxHomeBitrate // ignore: cast_nullable_to_non_nullable : maxHomeBitrate // ignore: cast_nullable_to_non_nullable
as Bitrate, as Bitrate,
maxInternetBitrate: null == maxInternetBitrate maxInternetBitrate: null == maxInternetBitrate
? _value.maxInternetBitrate ? _self.maxInternetBitrate
: maxInternetBitrate // ignore: cast_nullable_to_non_nullable : maxInternetBitrate // ignore: cast_nullable_to_non_nullable
as Bitrate, as Bitrate,
audioDevice: freezed == audioDevice audioDevice: freezed == audioDevice
? _value.audioDevice ? _self.audioDevice
: audioDevice // ignore: cast_nullable_to_non_nullable : audioDevice // ignore: cast_nullable_to_non_nullable
as String?, as String?,
segmentSkipSettings: null == segmentSkipSettings segmentSkipSettings: null == segmentSkipSettings
? _value._segmentSkipSettings ? _self.segmentSkipSettings
: segmentSkipSettings // ignore: cast_nullable_to_non_nullable : segmentSkipSettings // ignore: cast_nullable_to_non_nullable
as Map<MediaSegmentType, SegmentSkip>, as Map<MediaSegmentType, SegmentSkip>,
hotKeys: null == hotKeys hotKeys: null == hotKeys
? _value._hotKeys ? _self.hotKeys
: hotKeys // ignore: cast_nullable_to_non_nullable : hotKeys // ignore: cast_nullable_to_non_nullable
as Map<VideoHotKeys, KeyCombination>, 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 /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel class _VideoPlayerSettingsModel extends VideoPlayerSettingsModel
with DiagnosticableTreeMixin { with DiagnosticableTreeMixin {
_$VideoPlayerSettingsModelImpl( _VideoPlayerSettingsModel(
{this.screenBrightness, {this.screenBrightness,
this.videoFit = BoxFit.contain, this.videoFit = BoxFit.contain,
this.fillScreen = false, this.fillScreen = false,
@ -319,9 +461,8 @@ class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
_segmentSkipSettings = segmentSkipSettings, _segmentSkipSettings = segmentSkipSettings,
_hotKeys = hotKeys, _hotKeys = hotKeys,
super._(); super._();
factory _VideoPlayerSettingsModel.fromJson(Map<String, dynamic> json) =>
factory _$VideoPlayerSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$VideoPlayerSettingsModelFromJson(json);
_$$VideoPlayerSettingsModelImplFromJson(json);
@override @override
final double? screenBrightness; final double? screenBrightness;
@ -386,14 +527,24 @@ class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
return EqualUnmodifiableMapView(_hotKeys); return EqualUnmodifiableMapView(_hotKeys);
} }
/// Create a copy of VideoPlayerSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { @JsonKey(includeFromJson: false, includeToJson: false)
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)'; @pragma('vm:prefer-inline')
_$VideoPlayerSettingsModelCopyWith<_VideoPlayerSettingsModel> get copyWith =>
__$VideoPlayerSettingsModelCopyWithImpl<_VideoPlayerSettingsModel>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$VideoPlayerSettingsModelToJson(
this,
);
} }
@override @override
void debugFillProperties(DiagnosticPropertiesBuilder properties) { void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties properties
..add(DiagnosticsProperty('type', 'VideoPlayerSettingsModel')) ..add(DiagnosticsProperty('type', 'VideoPlayerSettingsModel'))
..add(DiagnosticsProperty('screenBrightness', screenBrightness)) ..add(DiagnosticsProperty('screenBrightness', screenBrightness))
@ -413,81 +564,130 @@ class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
..add(DiagnosticsProperty('hotKeys', hotKeys)); ..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 @override
@pragma('vm:prefer-inline') String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
_$$VideoPlayerSettingsModelImplCopyWith<_$VideoPlayerSettingsModelImpl> 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)';
get copyWith => __$$VideoPlayerSettingsModelImplCopyWithImpl<
_$VideoPlayerSettingsModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$VideoPlayerSettingsModelImplToJson(
this,
);
} }
} }
abstract class _VideoPlayerSettingsModel extends VideoPlayerSettingsModel { /// @nodoc
factory _VideoPlayerSettingsModel( abstract mixin class _$VideoPlayerSettingsModelCopyWith<$Res>
{final double? screenBrightness, implements $VideoPlayerSettingsModelCopyWith<$Res> {
final BoxFit videoFit, factory _$VideoPlayerSettingsModelCopyWith(_VideoPlayerSettingsModel value,
final bool fillScreen, $Res Function(_VideoPlayerSettingsModel) _then) =
final bool hardwareAccel, __$VideoPlayerSettingsModelCopyWithImpl;
final bool useLibass, @override
final int bufferSize, @useResult
final PlayerOptions? playerOptions, $Res call(
final double internalVolume, {double? screenBrightness,
final Set<DeviceOrientation>? allowedOrientations, BoxFit videoFit,
final AutoNextType nextVideoType, bool fillScreen,
final Bitrate maxHomeBitrate, bool hardwareAccel,
final Bitrate maxInternetBitrate, bool useLibass,
final String? audioDevice, int bufferSize,
final Map<MediaSegmentType, SegmentSkip> segmentSkipSettings, PlayerOptions? playerOptions,
final Map<VideoHotKeys, KeyCombination> hotKeys}) = double internalVolume,
_$VideoPlayerSettingsModelImpl; Set<DeviceOrientation>? allowedOrientations,
_VideoPlayerSettingsModel._() : super._(); AutoNextType nextVideoType,
Bitrate maxHomeBitrate,
Bitrate maxInternetBitrate,
String? audioDevice,
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
Map<VideoHotKeys, KeyCombination> hotKeys});
}
factory _VideoPlayerSettingsModel.fromJson(Map<String, dynamic> json) = /// @nodoc
_$VideoPlayerSettingsModelImpl.fromJson; class __$VideoPlayerSettingsModelCopyWithImpl<$Res>
implements _$VideoPlayerSettingsModelCopyWith<$Res> {
__$VideoPlayerSettingsModelCopyWithImpl(this._self, this._then);
@override final _VideoPlayerSettingsModel _self;
double? get screenBrightness; final $Res Function(_VideoPlayerSettingsModel) _then;
@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;
/// Create a copy of VideoPlayerSettingsModel /// Create a copy of VideoPlayerSettingsModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline')
_$$VideoPlayerSettingsModelImplCopyWith<_$VideoPlayerSettingsModelImpl> $Res call({
get copyWith => throw _privateConstructorUsedError; 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 // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$VideoPlayerSettingsModelImpl _$$VideoPlayerSettingsModelImplFromJson( _VideoPlayerSettingsModel _$VideoPlayerSettingsModelFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$VideoPlayerSettingsModelImpl( _VideoPlayerSettingsModel(
screenBrightness: (json['screenBrightness'] as num?)?.toDouble(), screenBrightness: (json['screenBrightness'] as num?)?.toDouble(),
videoFit: $enumDecodeNullable(_$BoxFitEnumMap, json['videoFit']) ?? videoFit: $enumDecodeNullable(_$BoxFitEnumMap, json['videoFit']) ??
BoxFit.contain, BoxFit.contain,
@ -45,8 +45,8 @@ _$VideoPlayerSettingsModelImpl _$$VideoPlayerSettingsModelImplFromJson(
const {}, const {},
); );
Map<String, dynamic> _$$VideoPlayerSettingsModelImplToJson( Map<String, dynamic> _$VideoPlayerSettingsModelToJson(
_$VideoPlayerSettingsModelImpl instance) => _VideoPlayerSettingsModel instance) =>
<String, dynamic>{ <String, dynamic>{
'screenBrightness': instance.screenBrightness, 'screenBrightness': instance.screenBrightness,
'videoFit': _$BoxFitEnumMap[instance.videoFit]!, 'videoFit': _$BoxFitEnumMap[instance.videoFit]!,

View file

@ -1,61 +0,0 @@
import 'dart:convert';
import 'package:isar/isar.dart';
import 'package:fladder/models/syncing/sync_item.dart';
part 'i_synced_item.g.dart';
@collection
class ISyncedItem {
String? userId;
String id;
bool syncing;
String? sortName;
@Index()
String? parentId;
String? path;
int? fileSize;
String? videoFileName;
String? trickPlayModel;
String? mediaSegments;
String? images;
List<String>? chapters;
List<String>? subtitles;
String? userData;
ISyncedItem({
this.userId,
required this.id,
required this.syncing,
this.sortName,
this.parentId,
this.path,
this.fileSize,
this.videoFileName,
this.trickPlayModel,
this.mediaSegments,
this.images,
this.chapters,
this.subtitles,
this.userData,
});
factory ISyncedItem.fromSynced(SyncedItem syncedItem, String? path) {
return ISyncedItem(
id: syncedItem.id,
parentId: syncedItem.parentId,
syncing: syncedItem.syncing,
userId: syncedItem.userId,
path: syncedItem.path?.replaceAll(path ?? "", '').substring(1),
fileSize: syncedItem.fileSize,
sortName: syncedItem.sortName,
videoFileName: syncedItem.videoFileName,
trickPlayModel: syncedItem.fTrickPlayModel != null ? jsonEncode(syncedItem.fTrickPlayModel?.toJson()) : null,
mediaSegments: syncedItem.mediaSegments != null ? jsonEncode(syncedItem.mediaSegments?.toJson()) : null,
images: syncedItem.fImages != null ? jsonEncode(syncedItem.fImages?.toJson()) : null,
chapters: syncedItem.fChapters.map((e) => jsonEncode(e.toJson())).toList(),
subtitles: syncedItem.subtitles.map((e) => jsonEncode(e.toJson())).toList(),
userData: syncedItem.userData != null ? jsonEncode(syncedItem.userData?.toJson()) : null,
);
}
}

File diff suppressed because it is too large Load diff

View file

@ -17,13 +17,12 @@ import 'package:fladder/models/items/item_shared_models.dart';
import 'package:fladder/models/items/media_segments_model.dart'; import 'package:fladder/models/items/media_segments_model.dart';
import 'package:fladder/models/items/media_streams_model.dart'; import 'package:fladder/models/items/media_streams_model.dart';
import 'package:fladder/models/items/trick_play_model.dart'; import 'package:fladder/models/items/trick_play_model.dart';
import 'package:fladder/models/syncing/i_synced_item.dart';
import 'package:fladder/util/localization_helper.dart'; import 'package:fladder/util/localization_helper.dart';
part 'sync_item.freezed.dart'; part 'sync_item.freezed.dart';
@Freezed(copyWith: true) @Freezed(copyWith: true)
class SyncedItem with _$SyncedItem { abstract class SyncedItem with _$SyncedItem {
const SyncedItem._(); const SyncedItem._();
factory SyncedItem({ factory SyncedItem({
@ -126,39 +125,6 @@ class SyncedItem with _$SyncedItem {
userData: userData, userData: userData,
); );
} }
factory SyncedItem.fromIsar(ISyncedItem isarSyncedItem, String savePath) {
return SyncedItem(
id: isarSyncedItem.id,
parentId: isarSyncedItem.parentId,
userId: isarSyncedItem.userId ?? "",
sortName: isarSyncedItem.sortName,
syncing: isarSyncedItem.syncing,
path: joinAll([savePath, isarSyncedItem.path ?? ""]),
fileSize: isarSyncedItem.fileSize,
videoFileName: isarSyncedItem.videoFileName,
mediaSegments: isarSyncedItem.mediaSegments != null
? MediaSegmentsModel.fromJson(jsonDecode(isarSyncedItem.mediaSegments!))
: null,
fTrickPlayModel: isarSyncedItem.trickPlayModel != null
? TrickPlayModel.fromJson(jsonDecode(isarSyncedItem.trickPlayModel!))
: null,
fImages: isarSyncedItem.images != null ? ImagesData.fromJson(jsonDecode(isarSyncedItem.images!)) : null,
fChapters: isarSyncedItem.chapters
?.map(
(e) => Chapter.fromJson(jsonDecode(e)),
)
.toList() ??
[],
subtitles: isarSyncedItem.subtitles
?.map(
(e) => SubStreamModel.fromJson(jsonDecode(e)),
)
.toList() ??
[],
userData: isarSyncedItem.userData != null ? UserData.fromJson(jsonDecode(isarSyncedItem.userData!)) : null,
);
}
} }
extension StatusExtension on TaskStatus { extension StatusExtension on TaskStatus {

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,46 +9,49 @@ part of 'sync_item.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc /// @nodoc
mixin _$SyncedItem { mixin _$SyncedItem {
String get id => throw _privateConstructorUsedError; String get id;
bool get syncing => throw _privateConstructorUsedError; bool get syncing;
String? get parentId => throw _privateConstructorUsedError; String? get parentId;
String get userId => throw _privateConstructorUsedError; String get userId;
String? get path => throw _privateConstructorUsedError; String? get path;
bool get markedForDelete => throw _privateConstructorUsedError; bool get markedForDelete;
String? get sortName => throw _privateConstructorUsedError; String? get sortName;
int? get fileSize => throw _privateConstructorUsedError; int? get fileSize;
String? get videoFileName => throw _privateConstructorUsedError; String? get videoFileName;
MediaSegmentsModel? get mediaSegments => throw _privateConstructorUsedError; MediaSegmentsModel? get mediaSegments;
TrickPlayModel? get fTrickPlayModel => throw _privateConstructorUsedError; TrickPlayModel? get fTrickPlayModel;
ImagesData? get fImages => throw _privateConstructorUsedError; ImagesData? get fImages;
List<Chapter> get fChapters => throw _privateConstructorUsedError; List<Chapter> get fChapters;
List<SubStreamModel> get subtitles => throw _privateConstructorUsedError; List<SubStreamModel> get subtitles;
bool get unSyncedData => throw _privateConstructorUsedError; bool get unSyncedData;
@UserDataJsonSerializer() @UserDataJsonSerializer()
UserData? get userData => UserData? get userData; // ignore: invalid_annotation_target
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
ItemBaseModel? get itemModel => throw _privateConstructorUsedError; ItemBaseModel? get itemModel;
/// Create a copy of SyncedItem /// Create a copy of SyncedItem
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SyncedItemCopyWith<SyncedItem> get copyWith => $SyncedItemCopyWith<SyncedItem> get copyWith =>
throw _privateConstructorUsedError; _$SyncedItemCopyWithImpl<SyncedItem>(this as SyncedItem, _$identity);
@override
String toString() {
return 'SyncedItem(id: $id, syncing: $syncing, parentId: $parentId, userId: $userId, path: $path, markedForDelete: $markedForDelete, sortName: $sortName, fileSize: $fileSize, videoFileName: $videoFileName, mediaSegments: $mediaSegments, fTrickPlayModel: $fTrickPlayModel, fImages: $fImages, fChapters: $fChapters, subtitles: $subtitles, unSyncedData: $unSyncedData, userData: $userData, itemModel: $itemModel)';
}
} }
/// @nodoc /// @nodoc
abstract class $SyncedItemCopyWith<$Res> { abstract mixin class $SyncedItemCopyWith<$Res> {
factory $SyncedItemCopyWith( factory $SyncedItemCopyWith(
SyncedItem value, $Res Function(SyncedItem) then) = SyncedItem value, $Res Function(SyncedItem) _then) =
_$SyncedItemCopyWithImpl<$Res, SyncedItem>; _$SyncedItemCopyWithImpl;
@useResult @useResult
$Res call( $Res call(
{String id, {String id,
@ -74,14 +77,11 @@ abstract class $SyncedItemCopyWith<$Res> {
} }
/// @nodoc /// @nodoc
class _$SyncedItemCopyWithImpl<$Res, $Val extends SyncedItem> class _$SyncedItemCopyWithImpl<$Res> implements $SyncedItemCopyWith<$Res> {
implements $SyncedItemCopyWith<$Res> { _$SyncedItemCopyWithImpl(this._self, this._then);
_$SyncedItemCopyWithImpl(this._value, this._then);
// ignore: unused_field final SyncedItem _self;
final $Val _value; final $Res Function(SyncedItem) _then;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SyncedItem /// Create a copy of SyncedItem
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -106,76 +106,76 @@ class _$SyncedItemCopyWithImpl<$Res, $Val extends SyncedItem>
Object? userData = freezed, Object? userData = freezed,
Object? itemModel = freezed, Object? itemModel = freezed,
}) { }) {
return _then(_value.copyWith( return _then(_self.copyWith(
id: null == id id: null == id
? _value.id ? _self.id
: id // ignore: cast_nullable_to_non_nullable : id // ignore: cast_nullable_to_non_nullable
as String, as String,
syncing: null == syncing syncing: null == syncing
? _value.syncing ? _self.syncing
: syncing // ignore: cast_nullable_to_non_nullable : syncing // ignore: cast_nullable_to_non_nullable
as bool, as bool,
parentId: freezed == parentId parentId: freezed == parentId
? _value.parentId ? _self.parentId
: parentId // ignore: cast_nullable_to_non_nullable : parentId // ignore: cast_nullable_to_non_nullable
as String?, as String?,
userId: null == userId userId: null == userId
? _value.userId ? _self.userId
: userId // ignore: cast_nullable_to_non_nullable : userId // ignore: cast_nullable_to_non_nullable
as String, as String,
path: freezed == path path: freezed == path
? _value.path ? _self.path
: path // ignore: cast_nullable_to_non_nullable : path // ignore: cast_nullable_to_non_nullable
as String?, as String?,
markedForDelete: null == markedForDelete markedForDelete: null == markedForDelete
? _value.markedForDelete ? _self.markedForDelete
: markedForDelete // ignore: cast_nullable_to_non_nullable : markedForDelete // ignore: cast_nullable_to_non_nullable
as bool, as bool,
sortName: freezed == sortName sortName: freezed == sortName
? _value.sortName ? _self.sortName
: sortName // ignore: cast_nullable_to_non_nullable : sortName // ignore: cast_nullable_to_non_nullable
as String?, as String?,
fileSize: freezed == fileSize fileSize: freezed == fileSize
? _value.fileSize ? _self.fileSize
: fileSize // ignore: cast_nullable_to_non_nullable : fileSize // ignore: cast_nullable_to_non_nullable
as int?, as int?,
videoFileName: freezed == videoFileName videoFileName: freezed == videoFileName
? _value.videoFileName ? _self.videoFileName
: videoFileName // ignore: cast_nullable_to_non_nullable : videoFileName // ignore: cast_nullable_to_non_nullable
as String?, as String?,
mediaSegments: freezed == mediaSegments mediaSegments: freezed == mediaSegments
? _value.mediaSegments ? _self.mediaSegments
: mediaSegments // ignore: cast_nullable_to_non_nullable : mediaSegments // ignore: cast_nullable_to_non_nullable
as MediaSegmentsModel?, as MediaSegmentsModel?,
fTrickPlayModel: freezed == fTrickPlayModel fTrickPlayModel: freezed == fTrickPlayModel
? _value.fTrickPlayModel ? _self.fTrickPlayModel
: fTrickPlayModel // ignore: cast_nullable_to_non_nullable : fTrickPlayModel // ignore: cast_nullable_to_non_nullable
as TrickPlayModel?, as TrickPlayModel?,
fImages: freezed == fImages fImages: freezed == fImages
? _value.fImages ? _self.fImages
: fImages // ignore: cast_nullable_to_non_nullable : fImages // ignore: cast_nullable_to_non_nullable
as ImagesData?, as ImagesData?,
fChapters: null == fChapters fChapters: null == fChapters
? _value.fChapters ? _self.fChapters
: fChapters // ignore: cast_nullable_to_non_nullable : fChapters // ignore: cast_nullable_to_non_nullable
as List<Chapter>, as List<Chapter>,
subtitles: null == subtitles subtitles: null == subtitles
? _value.subtitles ? _self.subtitles
: subtitles // ignore: cast_nullable_to_non_nullable : subtitles // ignore: cast_nullable_to_non_nullable
as List<SubStreamModel>, as List<SubStreamModel>,
unSyncedData: null == unSyncedData unSyncedData: null == unSyncedData
? _value.unSyncedData ? _self.unSyncedData
: unSyncedData // ignore: cast_nullable_to_non_nullable : unSyncedData // ignore: cast_nullable_to_non_nullable
as bool, as bool,
userData: freezed == userData userData: freezed == userData
? _value.userData ? _self.userData
: userData // ignore: cast_nullable_to_non_nullable : userData // ignore: cast_nullable_to_non_nullable
as UserData?, as UserData?,
itemModel: freezed == itemModel itemModel: freezed == itemModel
? _value.itemModel ? _self.itemModel
: itemModel // ignore: cast_nullable_to_non_nullable : itemModel // ignore: cast_nullable_to_non_nullable
as ItemBaseModel?, as ItemBaseModel?,
) as $Val); ));
} }
/// Create a copy of SyncedItem /// Create a copy of SyncedItem
@ -183,26 +183,111 @@ class _$SyncedItemCopyWithImpl<$Res, $Val extends SyncedItem>
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$TrickPlayModelCopyWith<$Res>? get fTrickPlayModel { $TrickPlayModelCopyWith<$Res>? get fTrickPlayModel {
if (_value.fTrickPlayModel == null) { if (_self.fTrickPlayModel == null) {
return null; return null;
} }
return $TrickPlayModelCopyWith<$Res>(_value.fTrickPlayModel!, (value) { return $TrickPlayModelCopyWith<$Res>(_self.fTrickPlayModel!, (value) {
return _then(_value.copyWith(fTrickPlayModel: value) as $Val); return _then(_self.copyWith(fTrickPlayModel: value));
}); });
} }
} }
/// @nodoc /// Adds pattern-matching-related methods to [SyncedItem].
abstract class _$$SyncItemImplCopyWith<$Res> extension SyncedItemPatterns on SyncedItem {
implements $SyncedItemCopyWith<$Res> { /// A variant of `map` that fallback to returning `orElse`.
factory _$$SyncItemImplCopyWith( ///
_$SyncItemImpl value, $Res Function(_$SyncItemImpl) then) = /// It is equivalent to doing:
__$$SyncItemImplCopyWithImpl<$Res>; /// ```dart
@override /// switch (sealedClass) {
@useResult /// case final Subclass value:
$Res call( /// return ...;
{String id, /// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>(
TResult Function(_SyncItem value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _SyncItem() 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(_SyncItem value) $default,
) {
final _that = this;
switch (_that) {
case _SyncItem():
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(_SyncItem value)? $default,
) {
final _that = this;
switch (_that) {
case _SyncItem() when $default != null:
return $default(_that);
case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>(
TResult Function(
String id,
bool syncing, bool syncing,
String? parentId, String? parentId,
String userId, String userId,
@ -219,120 +304,164 @@ abstract class _$$SyncItemImplCopyWith<$Res>
bool unSyncedData, bool unSyncedData,
@UserDataJsonSerializer() UserData? userData, @UserDataJsonSerializer() UserData? userData,
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
ItemBaseModel? itemModel}); ItemBaseModel? itemModel)?
$default, {
@override required TResult orElse(),
$TrickPlayModelCopyWith<$Res>? get fTrickPlayModel;
}
/// @nodoc
class __$$SyncItemImplCopyWithImpl<$Res>
extends _$SyncedItemCopyWithImpl<$Res, _$SyncItemImpl>
implements _$$SyncItemImplCopyWith<$Res> {
__$$SyncItemImplCopyWithImpl(
_$SyncItemImpl _value, $Res Function(_$SyncItemImpl) _then)
: super(_value, _then);
/// Create a copy of SyncedItem
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? syncing = null,
Object? parentId = freezed,
Object? userId = null,
Object? path = freezed,
Object? markedForDelete = null,
Object? sortName = freezed,
Object? fileSize = freezed,
Object? videoFileName = freezed,
Object? mediaSegments = freezed,
Object? fTrickPlayModel = freezed,
Object? fImages = freezed,
Object? fChapters = null,
Object? subtitles = null,
Object? unSyncedData = null,
Object? userData = freezed,
Object? itemModel = freezed,
}) { }) {
return _then(_$SyncItemImpl( final _that = this;
id: null == id switch (_that) {
? _value.id case _SyncItem() when $default != null:
: id // ignore: cast_nullable_to_non_nullable return $default(
as String, _that.id,
syncing: null == syncing _that.syncing,
? _value.syncing _that.parentId,
: syncing // ignore: cast_nullable_to_non_nullable _that.userId,
as bool, _that.path,
parentId: freezed == parentId _that.markedForDelete,
? _value.parentId _that.sortName,
: parentId // ignore: cast_nullable_to_non_nullable _that.fileSize,
as String?, _that.videoFileName,
userId: null == userId _that.mediaSegments,
? _value.userId _that.fTrickPlayModel,
: userId // ignore: cast_nullable_to_non_nullable _that.fImages,
as String, _that.fChapters,
path: freezed == path _that.subtitles,
? _value.path _that.unSyncedData,
: path // ignore: cast_nullable_to_non_nullable _that.userData,
as String?, _that.itemModel);
markedForDelete: null == markedForDelete case _:
? _value.markedForDelete return orElse();
: markedForDelete // ignore: cast_nullable_to_non_nullable }
as bool, }
sortName: freezed == sortName
? _value.sortName /// A `switch`-like method, using callbacks.
: sortName // ignore: cast_nullable_to_non_nullable ///
as String?, /// As opposed to `map`, this offers destructuring.
fileSize: freezed == fileSize /// It is equivalent to doing:
? _value.fileSize /// ```dart
: fileSize // ignore: cast_nullable_to_non_nullable /// switch (sealedClass) {
as int?, /// case Subclass(:final field):
videoFileName: freezed == videoFileName /// return ...;
? _value.videoFileName /// case Subclass2(:final field2):
: videoFileName // ignore: cast_nullable_to_non_nullable /// return ...;
as String?, /// }
mediaSegments: freezed == mediaSegments /// ```
? _value.mediaSegments
: mediaSegments // ignore: cast_nullable_to_non_nullable @optionalTypeArgs
as MediaSegmentsModel?, TResult when<TResult extends Object?>(
fTrickPlayModel: freezed == fTrickPlayModel TResult Function(
? _value.fTrickPlayModel String id,
: fTrickPlayModel // ignore: cast_nullable_to_non_nullable bool syncing,
as TrickPlayModel?, String? parentId,
fImages: freezed == fImages String userId,
? _value.fImages String? path,
: fImages // ignore: cast_nullable_to_non_nullable bool markedForDelete,
as ImagesData?, String? sortName,
fChapters: null == fChapters int? fileSize,
? _value._fChapters String? videoFileName,
: fChapters // ignore: cast_nullable_to_non_nullable MediaSegmentsModel? mediaSegments,
as List<Chapter>, TrickPlayModel? fTrickPlayModel,
subtitles: null == subtitles ImagesData? fImages,
? _value._subtitles List<Chapter> fChapters,
: subtitles // ignore: cast_nullable_to_non_nullable List<SubStreamModel> subtitles,
as List<SubStreamModel>, bool unSyncedData,
unSyncedData: null == unSyncedData @UserDataJsonSerializer() UserData? userData,
? _value.unSyncedData @JsonKey(includeFromJson: false, includeToJson: false)
: unSyncedData // ignore: cast_nullable_to_non_nullable ItemBaseModel? itemModel)
as bool, $default,
userData: freezed == userData ) {
? _value.userData final _that = this;
: userData // ignore: cast_nullable_to_non_nullable switch (_that) {
as UserData?, case _SyncItem():
itemModel: freezed == itemModel return $default(
? _value.itemModel _that.id,
: itemModel // ignore: cast_nullable_to_non_nullable _that.syncing,
as ItemBaseModel?, _that.parentId,
)); _that.userId,
_that.path,
_that.markedForDelete,
_that.sortName,
_that.fileSize,
_that.videoFileName,
_that.mediaSegments,
_that.fTrickPlayModel,
_that.fImages,
_that.fChapters,
_that.subtitles,
_that.unSyncedData,
_that.userData,
_that.itemModel);
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(
String id,
bool syncing,
String? parentId,
String userId,
String? path,
bool markedForDelete,
String? sortName,
int? fileSize,
String? videoFileName,
MediaSegmentsModel? mediaSegments,
TrickPlayModel? fTrickPlayModel,
ImagesData? fImages,
List<Chapter> fChapters,
List<SubStreamModel> subtitles,
bool unSyncedData,
@UserDataJsonSerializer() UserData? userData,
@JsonKey(includeFromJson: false, includeToJson: false)
ItemBaseModel? itemModel)?
$default,
) {
final _that = this;
switch (_that) {
case _SyncItem() when $default != null:
return $default(
_that.id,
_that.syncing,
_that.parentId,
_that.userId,
_that.path,
_that.markedForDelete,
_that.sortName,
_that.fileSize,
_that.videoFileName,
_that.mediaSegments,
_that.fTrickPlayModel,
_that.fImages,
_that.fChapters,
_that.subtitles,
_that.unSyncedData,
_that.userData,
_that.itemModel);
case _:
return null;
}
} }
} }
/// @nodoc /// @nodoc
class _$SyncItemImpl extends _SyncItem { class _SyncItem extends SyncedItem {
_$SyncItemImpl( _SyncItem(
{required this.id, {required this.id,
this.syncing = false, this.syncing = false,
this.parentId, this.parentId,
@ -409,83 +538,166 @@ class _$SyncItemImpl extends _SyncItem {
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
final ItemBaseModel? itemModel; final ItemBaseModel? itemModel;
/// Create a copy of SyncedItem
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SyncItemCopyWith<_SyncItem> get copyWith =>
__$SyncItemCopyWithImpl<_SyncItem>(this, _$identity);
@override @override
String toString() { String toString() {
return 'SyncedItem(id: $id, syncing: $syncing, parentId: $parentId, userId: $userId, path: $path, markedForDelete: $markedForDelete, sortName: $sortName, fileSize: $fileSize, videoFileName: $videoFileName, mediaSegments: $mediaSegments, fTrickPlayModel: $fTrickPlayModel, fImages: $fImages, fChapters: $fChapters, subtitles: $subtitles, unSyncedData: $unSyncedData, userData: $userData, itemModel: $itemModel)'; return 'SyncedItem(id: $id, syncing: $syncing, parentId: $parentId, userId: $userId, path: $path, markedForDelete: $markedForDelete, sortName: $sortName, fileSize: $fileSize, videoFileName: $videoFileName, mediaSegments: $mediaSegments, fTrickPlayModel: $fTrickPlayModel, fImages: $fImages, fChapters: $fChapters, subtitles: $subtitles, unSyncedData: $unSyncedData, userData: $userData, itemModel: $itemModel)';
} }
}
/// @nodoc
abstract mixin class _$SyncItemCopyWith<$Res>
implements $SyncedItemCopyWith<$Res> {
factory _$SyncItemCopyWith(_SyncItem value, $Res Function(_SyncItem) _then) =
__$SyncItemCopyWithImpl;
@override
@useResult
$Res call(
{String id,
bool syncing,
String? parentId,
String userId,
String? path,
bool markedForDelete,
String? sortName,
int? fileSize,
String? videoFileName,
MediaSegmentsModel? mediaSegments,
TrickPlayModel? fTrickPlayModel,
ImagesData? fImages,
List<Chapter> fChapters,
List<SubStreamModel> subtitles,
bool unSyncedData,
@UserDataJsonSerializer() UserData? userData,
@JsonKey(includeFromJson: false, includeToJson: false)
ItemBaseModel? itemModel});
@override
$TrickPlayModelCopyWith<$Res>? get fTrickPlayModel;
}
/// @nodoc
class __$SyncItemCopyWithImpl<$Res> implements _$SyncItemCopyWith<$Res> {
__$SyncItemCopyWithImpl(this._self, this._then);
final _SyncItem _self;
final $Res Function(_SyncItem) _then;
/// Create a copy of SyncedItem /// Create a copy of SyncedItem
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$SyncItemImplCopyWith<_$SyncItemImpl> get copyWith => $Res call({
__$$SyncItemImplCopyWithImpl<_$SyncItemImpl>(this, _$identity); Object? id = null,
} Object? syncing = null,
Object? parentId = freezed,
abstract class _SyncItem extends SyncedItem { Object? userId = null,
factory _SyncItem( Object? path = freezed,
{required final String id, Object? markedForDelete = null,
final bool syncing, Object? sortName = freezed,
final String? parentId, Object? fileSize = freezed,
required final String userId, Object? videoFileName = freezed,
final String? path, Object? mediaSegments = freezed,
final bool markedForDelete, Object? fTrickPlayModel = freezed,
final String? sortName, Object? fImages = freezed,
final int? fileSize, Object? fChapters = null,
final String? videoFileName, Object? subtitles = null,
final MediaSegmentsModel? mediaSegments, Object? unSyncedData = null,
final TrickPlayModel? fTrickPlayModel, Object? userData = freezed,
final ImagesData? fImages, Object? itemModel = freezed,
final List<Chapter> fChapters, }) {
final List<SubStreamModel> subtitles, return _then(_SyncItem(
final bool unSyncedData, id: null == id
@UserDataJsonSerializer() final UserData? userData, ? _self.id
@JsonKey(includeFromJson: false, includeToJson: false) : id // ignore: cast_nullable_to_non_nullable
final ItemBaseModel? itemModel}) = _$SyncItemImpl; as String,
_SyncItem._() : super._(); syncing: null == syncing
? _self.syncing
@override : syncing // ignore: cast_nullable_to_non_nullable
String get id; as bool,
@override parentId: freezed == parentId
bool get syncing; ? _self.parentId
@override : parentId // ignore: cast_nullable_to_non_nullable
String? get parentId; as String?,
@override userId: null == userId
String get userId; ? _self.userId
@override : userId // ignore: cast_nullable_to_non_nullable
String? get path; as String,
@override path: freezed == path
bool get markedForDelete; ? _self.path
@override : path // ignore: cast_nullable_to_non_nullable
String? get sortName; as String?,
@override markedForDelete: null == markedForDelete
int? get fileSize; ? _self.markedForDelete
@override : markedForDelete // ignore: cast_nullable_to_non_nullable
String? get videoFileName; as bool,
@override sortName: freezed == sortName
MediaSegmentsModel? get mediaSegments; ? _self.sortName
@override : sortName // ignore: cast_nullable_to_non_nullable
TrickPlayModel? get fTrickPlayModel; as String?,
@override fileSize: freezed == fileSize
ImagesData? get fImages; ? _self.fileSize
@override : fileSize // ignore: cast_nullable_to_non_nullable
List<Chapter> get fChapters; as int?,
@override videoFileName: freezed == videoFileName
List<SubStreamModel> get subtitles; ? _self.videoFileName
@override : videoFileName // ignore: cast_nullable_to_non_nullable
bool get unSyncedData; as String?,
@override mediaSegments: freezed == mediaSegments
@UserDataJsonSerializer() ? _self.mediaSegments
UserData? get userData; // ignore: invalid_annotation_target : mediaSegments // ignore: cast_nullable_to_non_nullable
@override as MediaSegmentsModel?,
@JsonKey(includeFromJson: false, includeToJson: false) fTrickPlayModel: freezed == fTrickPlayModel
ItemBaseModel? get itemModel; ? _self.fTrickPlayModel
: fTrickPlayModel // ignore: cast_nullable_to_non_nullable
as TrickPlayModel?,
fImages: freezed == fImages
? _self.fImages
: fImages // ignore: cast_nullable_to_non_nullable
as ImagesData?,
fChapters: null == fChapters
? _self._fChapters
: fChapters // ignore: cast_nullable_to_non_nullable
as List<Chapter>,
subtitles: null == subtitles
? _self._subtitles
: subtitles // ignore: cast_nullable_to_non_nullable
as List<SubStreamModel>,
unSyncedData: null == unSyncedData
? _self.unSyncedData
: unSyncedData // ignore: cast_nullable_to_non_nullable
as bool,
userData: freezed == userData
? _self.userData
: userData // ignore: cast_nullable_to_non_nullable
as UserData?,
itemModel: freezed == itemModel
? _self.itemModel
: itemModel // ignore: cast_nullable_to_non_nullable
as ItemBaseModel?,
));
}
/// Create a copy of SyncedItem /// Create a copy of SyncedItem
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline')
_$$SyncItemImplCopyWith<_$SyncItemImpl> get copyWith => $TrickPlayModelCopyWith<$Res>? get fTrickPlayModel {
throw _privateConstructorUsedError; if (_self.fTrickPlayModel == null) {
return null;
}
return $TrickPlayModelCopyWith<$Res>(_self.fTrickPlayModel!, (value) {
return _then(_self.copyWith(fTrickPlayModel: value));
});
}
} }
// dart format on

View file

@ -7,7 +7,7 @@ import 'package:fladder/models/syncing/sync_item.dart';
part 'sync_settings_model.freezed.dart'; part 'sync_settings_model.freezed.dart';
@Freezed(toJson: false, fromJson: false, copyWith: true) @Freezed(toJson: false, fromJson: false, copyWith: true)
class SyncSettingsModel with _$SyncSettingsModel { abstract class SyncSettingsModel with _$SyncSettingsModel {
const SyncSettingsModel._(); const SyncSettingsModel._();
factory SyncSettingsModel({ factory SyncSettingsModel({

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,75 +9,43 @@ part of 'sync_settings_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc /// @nodoc
mixin _$SyncSettingsModel { mixin _$SyncSettingsModel {
List<SyncedItem> get items => throw _privateConstructorUsedError; List<SyncedItem> get items;
/// Create a copy of SyncSettingsModel /// Create a copy of SyncSettingsModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$SyncSettingsModelCopyWith<SyncSettingsModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $SyncSettingsModelCopyWith<$Res> {
factory $SyncSettingsModelCopyWith(
SyncSettingsModel value, $Res Function(SyncSettingsModel) then) =
_$SyncSettingsModelCopyWithImpl<$Res, SyncSettingsModel>;
@useResult
$Res call({List<SyncedItem> items});
}
/// @nodoc
class _$SyncSettingsModelCopyWithImpl<$Res, $Val extends SyncSettingsModel>
implements $SyncSettingsModelCopyWith<$Res> {
_$SyncSettingsModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SyncSettingsModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$SyncSettingsModelCopyWith<SyncSettingsModel> get copyWith =>
_$SyncSettingsModelCopyWithImpl<SyncSettingsModel>(
this as SyncSettingsModel, _$identity);
@override @override
$Res call({ String toString() {
Object? items = null, return 'SyncSettingsModel(items: $items)';
}) {
return _then(_value.copyWith(
items: null == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as List<SyncedItem>,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$SyncSettignsModelImplCopyWith<$Res> abstract mixin class $SyncSettingsModelCopyWith<$Res> {
implements $SyncSettingsModelCopyWith<$Res> { factory $SyncSettingsModelCopyWith(
factory _$$SyncSettignsModelImplCopyWith(_$SyncSettignsModelImpl value, SyncSettingsModel value, $Res Function(SyncSettingsModel) _then) =
$Res Function(_$SyncSettignsModelImpl) then) = _$SyncSettingsModelCopyWithImpl;
__$$SyncSettignsModelImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call({List<SyncedItem> items}); $Res call({List<SyncedItem> items});
} }
/// @nodoc /// @nodoc
class __$$SyncSettignsModelImplCopyWithImpl<$Res> class _$SyncSettingsModelCopyWithImpl<$Res>
extends _$SyncSettingsModelCopyWithImpl<$Res, _$SyncSettignsModelImpl> implements $SyncSettingsModelCopyWith<$Res> {
implements _$$SyncSettignsModelImplCopyWith<$Res> { _$SyncSettingsModelCopyWithImpl(this._self, this._then);
__$$SyncSettignsModelImplCopyWithImpl(_$SyncSettignsModelImpl _value,
$Res Function(_$SyncSettignsModelImpl) _then) final SyncSettingsModel _self;
: super(_value, _then); final $Res Function(SyncSettingsModel) _then;
/// Create a copy of SyncSettingsModel /// Create a copy of SyncSettingsModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -86,19 +54,176 @@ class __$$SyncSettignsModelImplCopyWithImpl<$Res>
$Res call({ $Res call({
Object? items = null, Object? items = null,
}) { }) {
return _then(_$SyncSettignsModelImpl( return _then(_self.copyWith(
items: null == items items: null == items
? _value._items ? _self.items
: items // ignore: cast_nullable_to_non_nullable : items // ignore: cast_nullable_to_non_nullable
as List<SyncedItem>, as List<SyncedItem>,
)); ));
} }
} }
/// Adds pattern-matching-related methods to [SyncSettingsModel].
extension SyncSettingsModelPatterns on SyncSettingsModel {
/// 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(_SyncSettignsModel value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _SyncSettignsModel() 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(_SyncSettignsModel value) $default,
) {
final _that = this;
switch (_that) {
case _SyncSettignsModel():
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(_SyncSettignsModel value)? $default,
) {
final _that = this;
switch (_that) {
case _SyncSettignsModel() 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<SyncedItem> items)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _SyncSettignsModel() when $default != null:
return $default(_that.items);
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<SyncedItem> items) $default,
) {
final _that = this;
switch (_that) {
case _SyncSettignsModel():
return $default(_that.items);
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<SyncedItem> items)? $default,
) {
final _that = this;
switch (_that) {
case _SyncSettignsModel() when $default != null:
return $default(_that.items);
case _:
return null;
}
}
}
/// @nodoc /// @nodoc
class _$SyncSettignsModelImpl extends _SyncSettignsModel { class _SyncSettignsModel extends SyncSettingsModel {
_$SyncSettignsModelImpl({final List<SyncedItem> items = const []}) _SyncSettignsModel({final List<SyncedItem> items = const []})
: _items = items, : _items = items,
super._(); super._();
@ -111,33 +236,53 @@ class _$SyncSettignsModelImpl extends _SyncSettignsModel {
return EqualUnmodifiableListView(_items); return EqualUnmodifiableListView(_items);
} }
/// Create a copy of SyncSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SyncSettignsModelCopyWith<_SyncSettignsModel> get copyWith =>
__$SyncSettignsModelCopyWithImpl<_SyncSettignsModel>(this, _$identity);
@override @override
String toString() { String toString() {
return 'SyncSettingsModel(items: $items)'; return 'SyncSettingsModel(items: $items)';
} }
}
/// @nodoc
abstract mixin class _$SyncSettignsModelCopyWith<$Res>
implements $SyncSettingsModelCopyWith<$Res> {
factory _$SyncSettignsModelCopyWith(
_SyncSettignsModel value, $Res Function(_SyncSettignsModel) _then) =
__$SyncSettignsModelCopyWithImpl;
@override
@useResult
$Res call({List<SyncedItem> items});
}
/// @nodoc
class __$SyncSettignsModelCopyWithImpl<$Res>
implements _$SyncSettignsModelCopyWith<$Res> {
__$SyncSettignsModelCopyWithImpl(this._self, this._then);
final _SyncSettignsModel _self;
final $Res Function(_SyncSettignsModel) _then;
/// Create a copy of SyncSettingsModel /// Create a copy of SyncSettingsModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$SyncSettignsModelImplCopyWith<_$SyncSettignsModelImpl> get copyWith => $Res call({
__$$SyncSettignsModelImplCopyWithImpl<_$SyncSettignsModelImpl>( Object? items = null,
this, _$identity); }) {
return _then(_SyncSettignsModel(
items: null == items
? _self._items
: items // ignore: cast_nullable_to_non_nullable
as List<SyncedItem>,
));
}
} }
abstract class _SyncSettignsModel extends SyncSettingsModel { // dart format on
factory _SyncSettignsModel({final List<SyncedItem> items}) =
_$SyncSettignsModelImpl;
_SyncSettignsModel._() : super._();
@override
List<SyncedItem> get items;
/// Create a copy of SyncSettingsModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SyncSettignsModelImplCopyWith<_$SyncSettignsModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View file

@ -46,7 +46,7 @@ enum LibraryViewType {
} }
@Freezed(fromJson: false, toJson: false, copyWith: true) @Freezed(fromJson: false, toJson: false, copyWith: true)
class LibraryScreenModel with _$LibraryScreenModel { abstract class LibraryScreenModel with _$LibraryScreenModel {
factory LibraryScreenModel({ factory LibraryScreenModel({
@Default([]) List<ViewModel> views, @Default([]) List<ViewModel> views,
ViewModel? selectedViewModel, ViewModel? selectedViewModel,

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,101 +9,37 @@ part of 'library_screen_provider.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc /// @nodoc
mixin _$LibraryScreenModel { mixin _$LibraryScreenModel {
List<ViewModel> get views => throw _privateConstructorUsedError; List<ViewModel> get views;
ViewModel? get selectedViewModel => throw _privateConstructorUsedError; ViewModel? get selectedViewModel;
Set<LibraryViewType> get viewType => throw _privateConstructorUsedError; Set<LibraryViewType> get viewType;
List<RecommendedModel> get recommendations => List<RecommendedModel> get recommendations;
throw _privateConstructorUsedError; List<RecommendedModel> get genres;
List<RecommendedModel> get genres => throw _privateConstructorUsedError; List<ItemBaseModel> get favourites;
List<ItemBaseModel> get favourites => throw _privateConstructorUsedError;
/// Create a copy of LibraryScreenModel /// Create a copy of LibraryScreenModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$LibraryScreenModelCopyWith<LibraryScreenModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $LibraryScreenModelCopyWith<$Res> {
factory $LibraryScreenModelCopyWith(
LibraryScreenModel value, $Res Function(LibraryScreenModel) then) =
_$LibraryScreenModelCopyWithImpl<$Res, LibraryScreenModel>;
@useResult
$Res call(
{List<ViewModel> views,
ViewModel? selectedViewModel,
Set<LibraryViewType> viewType,
List<RecommendedModel> recommendations,
List<RecommendedModel> genres,
List<ItemBaseModel> favourites});
}
/// @nodoc
class _$LibraryScreenModelCopyWithImpl<$Res, $Val extends LibraryScreenModel>
implements $LibraryScreenModelCopyWith<$Res> {
_$LibraryScreenModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of LibraryScreenModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$LibraryScreenModelCopyWith<LibraryScreenModel> get copyWith =>
_$LibraryScreenModelCopyWithImpl<LibraryScreenModel>(
this as LibraryScreenModel, _$identity);
@override @override
$Res call({ String toString() {
Object? views = null, return 'LibraryScreenModel(views: $views, selectedViewModel: $selectedViewModel, viewType: $viewType, recommendations: $recommendations, genres: $genres, favourites: $favourites)';
Object? selectedViewModel = freezed,
Object? viewType = null,
Object? recommendations = null,
Object? genres = null,
Object? favourites = null,
}) {
return _then(_value.copyWith(
views: null == views
? _value.views
: views // ignore: cast_nullable_to_non_nullable
as List<ViewModel>,
selectedViewModel: freezed == selectedViewModel
? _value.selectedViewModel
: selectedViewModel // ignore: cast_nullable_to_non_nullable
as ViewModel?,
viewType: null == viewType
? _value.viewType
: viewType // ignore: cast_nullable_to_non_nullable
as Set<LibraryViewType>,
recommendations: null == recommendations
? _value.recommendations
: recommendations // ignore: cast_nullable_to_non_nullable
as List<RecommendedModel>,
genres: null == genres
? _value.genres
: genres // ignore: cast_nullable_to_non_nullable
as List<RecommendedModel>,
favourites: null == favourites
? _value.favourites
: favourites // ignore: cast_nullable_to_non_nullable
as List<ItemBaseModel>,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$LibraryScreenModelImplCopyWith<$Res> abstract mixin class $LibraryScreenModelCopyWith<$Res> {
implements $LibraryScreenModelCopyWith<$Res> { factory $LibraryScreenModelCopyWith(
factory _$$LibraryScreenModelImplCopyWith(_$LibraryScreenModelImpl value, LibraryScreenModel value, $Res Function(LibraryScreenModel) _then) =
$Res Function(_$LibraryScreenModelImpl) then) = _$LibraryScreenModelCopyWithImpl;
__$$LibraryScreenModelImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{List<ViewModel> views, {List<ViewModel> views,
@ -115,12 +51,12 @@ abstract class _$$LibraryScreenModelImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$LibraryScreenModelImplCopyWithImpl<$Res> class _$LibraryScreenModelCopyWithImpl<$Res>
extends _$LibraryScreenModelCopyWithImpl<$Res, _$LibraryScreenModelImpl> implements $LibraryScreenModelCopyWith<$Res> {
implements _$$LibraryScreenModelImplCopyWith<$Res> { _$LibraryScreenModelCopyWithImpl(this._self, this._then);
__$$LibraryScreenModelImplCopyWithImpl(_$LibraryScreenModelImpl _value,
$Res Function(_$LibraryScreenModelImpl) _then) final LibraryScreenModel _self;
: super(_value, _then); final $Res Function(LibraryScreenModel) _then;
/// Create a copy of LibraryScreenModel /// Create a copy of LibraryScreenModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -134,39 +70,220 @@ class __$$LibraryScreenModelImplCopyWithImpl<$Res>
Object? genres = null, Object? genres = null,
Object? favourites = null, Object? favourites = null,
}) { }) {
return _then(_$LibraryScreenModelImpl( return _then(_self.copyWith(
views: null == views views: null == views
? _value._views ? _self.views
: views // ignore: cast_nullable_to_non_nullable : views // ignore: cast_nullable_to_non_nullable
as List<ViewModel>, as List<ViewModel>,
selectedViewModel: freezed == selectedViewModel selectedViewModel: freezed == selectedViewModel
? _value.selectedViewModel ? _self.selectedViewModel
: selectedViewModel // ignore: cast_nullable_to_non_nullable : selectedViewModel // ignore: cast_nullable_to_non_nullable
as ViewModel?, as ViewModel?,
viewType: null == viewType viewType: null == viewType
? _value._viewType ? _self.viewType
: viewType // ignore: cast_nullable_to_non_nullable : viewType // ignore: cast_nullable_to_non_nullable
as Set<LibraryViewType>, as Set<LibraryViewType>,
recommendations: null == recommendations recommendations: null == recommendations
? _value._recommendations ? _self.recommendations
: recommendations // ignore: cast_nullable_to_non_nullable : recommendations // ignore: cast_nullable_to_non_nullable
as List<RecommendedModel>, as List<RecommendedModel>,
genres: null == genres genres: null == genres
? _value._genres ? _self.genres
: genres // ignore: cast_nullable_to_non_nullable : genres // ignore: cast_nullable_to_non_nullable
as List<RecommendedModel>, as List<RecommendedModel>,
favourites: null == favourites favourites: null == favourites
? _value._favourites ? _self.favourites
: favourites // ignore: cast_nullable_to_non_nullable : favourites // ignore: cast_nullable_to_non_nullable
as List<ItemBaseModel>, as List<ItemBaseModel>,
)); ));
} }
} }
/// Adds pattern-matching-related methods to [LibraryScreenModel].
extension LibraryScreenModelPatterns on LibraryScreenModel {
/// 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(_LibraryScreenModel value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _LibraryScreenModel() 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(_LibraryScreenModel value) $default,
) {
final _that = this;
switch (_that) {
case _LibraryScreenModel():
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(_LibraryScreenModel value)? $default,
) {
final _that = this;
switch (_that) {
case _LibraryScreenModel() 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<ViewModel> views,
ViewModel? selectedViewModel,
Set<LibraryViewType> viewType,
List<RecommendedModel> recommendations,
List<RecommendedModel> genres,
List<ItemBaseModel> favourites)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _LibraryScreenModel() when $default != null:
return $default(_that.views, _that.selectedViewModel, _that.viewType,
_that.recommendations, _that.genres, _that.favourites);
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<ViewModel> views,
ViewModel? selectedViewModel,
Set<LibraryViewType> viewType,
List<RecommendedModel> recommendations,
List<RecommendedModel> genres,
List<ItemBaseModel> favourites)
$default,
) {
final _that = this;
switch (_that) {
case _LibraryScreenModel():
return $default(_that.views, _that.selectedViewModel, _that.viewType,
_that.recommendations, _that.genres, _that.favourites);
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<ViewModel> views,
ViewModel? selectedViewModel,
Set<LibraryViewType> viewType,
List<RecommendedModel> recommendations,
List<RecommendedModel> genres,
List<ItemBaseModel> favourites)?
$default,
) {
final _that = this;
switch (_that) {
case _LibraryScreenModel() when $default != null:
return $default(_that.views, _that.selectedViewModel, _that.viewType,
_that.recommendations, _that.genres, _that.favourites);
case _:
return null;
}
}
}
/// @nodoc /// @nodoc
class _$LibraryScreenModelImpl implements _LibraryScreenModel { class _LibraryScreenModel implements LibraryScreenModel {
_$LibraryScreenModelImpl( _LibraryScreenModel(
{final List<ViewModel> views = const [], {final List<ViewModel> views = const [],
this.selectedViewModel, this.selectedViewModel,
final Set<LibraryViewType> viewType = const { final Set<LibraryViewType> viewType = const {
@ -229,47 +346,84 @@ class _$LibraryScreenModelImpl implements _LibraryScreenModel {
return EqualUnmodifiableListView(_favourites); return EqualUnmodifiableListView(_favourites);
} }
/// Create a copy of LibraryScreenModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LibraryScreenModelCopyWith<_LibraryScreenModel> get copyWith =>
__$LibraryScreenModelCopyWithImpl<_LibraryScreenModel>(this, _$identity);
@override @override
String toString() { String toString() {
return 'LibraryScreenModel(views: $views, selectedViewModel: $selectedViewModel, viewType: $viewType, recommendations: $recommendations, genres: $genres, favourites: $favourites)'; return 'LibraryScreenModel(views: $views, selectedViewModel: $selectedViewModel, viewType: $viewType, recommendations: $recommendations, genres: $genres, favourites: $favourites)';
} }
}
/// @nodoc
abstract mixin class _$LibraryScreenModelCopyWith<$Res>
implements $LibraryScreenModelCopyWith<$Res> {
factory _$LibraryScreenModelCopyWith(
_LibraryScreenModel value, $Res Function(_LibraryScreenModel) _then) =
__$LibraryScreenModelCopyWithImpl;
@override
@useResult
$Res call(
{List<ViewModel> views,
ViewModel? selectedViewModel,
Set<LibraryViewType> viewType,
List<RecommendedModel> recommendations,
List<RecommendedModel> genres,
List<ItemBaseModel> favourites});
}
/// @nodoc
class __$LibraryScreenModelCopyWithImpl<$Res>
implements _$LibraryScreenModelCopyWith<$Res> {
__$LibraryScreenModelCopyWithImpl(this._self, this._then);
final _LibraryScreenModel _self;
final $Res Function(_LibraryScreenModel) _then;
/// Create a copy of LibraryScreenModel /// Create a copy of LibraryScreenModel
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$LibraryScreenModelImplCopyWith<_$LibraryScreenModelImpl> get copyWith => $Res call({
__$$LibraryScreenModelImplCopyWithImpl<_$LibraryScreenModelImpl>( Object? views = null,
this, _$identity); Object? selectedViewModel = freezed,
Object? viewType = null,
Object? recommendations = null,
Object? genres = null,
Object? favourites = null,
}) {
return _then(_LibraryScreenModel(
views: null == views
? _self._views
: views // ignore: cast_nullable_to_non_nullable
as List<ViewModel>,
selectedViewModel: freezed == selectedViewModel
? _self.selectedViewModel
: selectedViewModel // ignore: cast_nullable_to_non_nullable
as ViewModel?,
viewType: null == viewType
? _self._viewType
: viewType // ignore: cast_nullable_to_non_nullable
as Set<LibraryViewType>,
recommendations: null == recommendations
? _self._recommendations
: recommendations // ignore: cast_nullable_to_non_nullable
as List<RecommendedModel>,
genres: null == genres
? _self._genres
: genres // ignore: cast_nullable_to_non_nullable
as List<RecommendedModel>,
favourites: null == favourites
? _self._favourites
: favourites // ignore: cast_nullable_to_non_nullable
as List<ItemBaseModel>,
));
}
} }
abstract class _LibraryScreenModel implements LibraryScreenModel { // dart format on
factory _LibraryScreenModel(
{final List<ViewModel> views,
final ViewModel? selectedViewModel,
final Set<LibraryViewType> viewType,
final List<RecommendedModel> recommendations,
final List<RecommendedModel> genres,
final List<ItemBaseModel> favourites}) = _$LibraryScreenModelImpl;
@override
List<ViewModel> get views;
@override
ViewModel? get selectedViewModel;
@override
Set<LibraryViewType> get viewType;
@override
List<RecommendedModel> get recommendations;
@override
List<RecommendedModel> get genres;
@override
List<ItemBaseModel> get favourites;
/// Create a copy of LibraryScreenModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LibraryScreenModelImplCopyWith<_$LibraryScreenModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View file

@ -52,7 +52,7 @@ class SessionInfo extends _$SessionInfo {
} }
@freezed @freezed
class SessionInfoModel with _$SessionInfoModel { abstract class SessionInfoModel with _$SessionInfoModel {
const SessionInfoModel._(); const SessionInfoModel._();
factory SessionInfoModel({ factory SessionInfoModel({

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,61 +9,206 @@ part of 'session_info_provider.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
SessionInfoModel _$SessionInfoModelFromJson(Map<String, dynamic> json) {
return _SessionInfoModel.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$SessionInfoModel { mixin _$SessionInfoModel {
String? get playbackModel => throw _privateConstructorUsedError; String? get playbackModel;
TranscodingInfo? get transCodeInfo => throw _privateConstructorUsedError; TranscodingInfo? get transCodeInfo;
/// Serializes this SessionInfoModel to a JSON map. /// Serializes this SessionInfoModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson();
@override
String toString() {
return 'SessionInfoModel(playbackModel: $playbackModel, transCodeInfo: $transCodeInfo)';
}
}
/// Adds pattern-matching-related methods to [SessionInfoModel].
extension SessionInfoModelPatterns on SessionInfoModel {
/// 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(_SessionInfoModel value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _SessionInfoModel() 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(_SessionInfoModel value) $default,
) {
final _that = this;
switch (_that) {
case _SessionInfoModel():
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(_SessionInfoModel value)? $default,
) {
final _that = this;
switch (_that) {
case _SessionInfoModel() when $default != null:
return $default(_that);
case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>(
TResult Function(String? playbackModel, TranscodingInfo? transCodeInfo)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _SessionInfoModel() when $default != null:
return $default(_that.playbackModel, _that.transCodeInfo);
case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function(String? playbackModel, TranscodingInfo? transCodeInfo)
$default,
) {
final _that = this;
switch (_that) {
case _SessionInfoModel():
return $default(_that.playbackModel, _that.transCodeInfo);
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(String? playbackModel, TranscodingInfo? transCodeInfo)?
$default,
) {
final _that = this;
switch (_that) {
case _SessionInfoModel() when $default != null:
return $default(_that.playbackModel, _that.transCodeInfo);
case _:
return null;
}
}
} }
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$SessionInfoModelImpl extends _SessionInfoModel { class _SessionInfoModel extends SessionInfoModel {
_$SessionInfoModelImpl({this.playbackModel, this.transCodeInfo}) : super._(); _SessionInfoModel({this.playbackModel, this.transCodeInfo}) : super._();
factory _SessionInfoModel.fromJson(Map<String, dynamic> json) =>
factory _$SessionInfoModelImpl.fromJson(Map<String, dynamic> json) => _$SessionInfoModelFromJson(json);
_$$SessionInfoModelImplFromJson(json);
@override @override
final String? playbackModel; final String? playbackModel;
@override @override
final TranscodingInfo? transCodeInfo; final TranscodingInfo? transCodeInfo;
@override
String toString() {
return 'SessionInfoModel(playbackModel: $playbackModel, transCodeInfo: $transCodeInfo)';
}
@override @override
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
return _$$SessionInfoModelImplToJson( return _$SessionInfoModelToJson(
this, this,
); );
} }
}
abstract class _SessionInfoModel extends SessionInfoModel {
factory _SessionInfoModel(
{final String? playbackModel,
final TranscodingInfo? transCodeInfo}) = _$SessionInfoModelImpl;
_SessionInfoModel._() : super._();
factory _SessionInfoModel.fromJson(Map<String, dynamic> json) =
_$SessionInfoModelImpl.fromJson;
@override @override
String? get playbackModel; String toString() {
@override return 'SessionInfoModel(playbackModel: $playbackModel, transCodeInfo: $transCodeInfo)';
TranscodingInfo? get transCodeInfo; }
} }
// dart format on

View file

@ -6,9 +6,8 @@ part of 'session_info_provider.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$SessionInfoModelImpl _$$SessionInfoModelImplFromJson( _SessionInfoModel _$SessionInfoModelFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _SessionInfoModel(
_$SessionInfoModelImpl(
playbackModel: json['playbackModel'] as String?, playbackModel: json['playbackModel'] as String?,
transCodeInfo: json['transCodeInfo'] == null transCodeInfo: json['transCodeInfo'] == null
? null ? null
@ -16,8 +15,7 @@ _$SessionInfoModelImpl _$$SessionInfoModelImplFromJson(
json['transCodeInfo'] as Map<String, dynamic>), json['transCodeInfo'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$SessionInfoModelImplToJson( Map<String, dynamic> _$SessionInfoModelToJson(_SessionInfoModel instance) =>
_$SessionInfoModelImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'playbackModel': instance.playbackModel, 'playbackModel': instance.playbackModel,
'transCodeInfo': instance.transCodeInfo, 'transCodeInfo': instance.transCodeInfo,

View file

@ -41,7 +41,6 @@ import 'package:fladder/providers/user_provider.dart';
import 'package:fladder/screens/shared/fladder_snackbar.dart'; import 'package:fladder/screens/shared/fladder_snackbar.dart';
import 'package:fladder/util/duration_extensions.dart'; import 'package:fladder/util/duration_extensions.dart';
import 'package:fladder/util/localization_helper.dart'; import 'package:fladder/util/localization_helper.dart';
import 'package:fladder/util/migration/isar_drift_migration.dart';
final syncProvider = StateNotifierProvider<SyncNotifier, SyncSettingsModel>((ref) => throw UnimplementedError()); final syncProvider = StateNotifierProvider<SyncNotifier, SyncSettingsModel>((ref) => throw UnimplementedError());
@ -67,11 +66,6 @@ class SyncNotifier extends StateNotifier<SyncSettingsModel> {
updateSyncStates(); updateSyncStates();
} }
void migrateFromIsar() async {
await isarMigration(ref, _db, mainDirectory.path);
_initializeQueryStream();
}
Future<void> updateSyncStates() async { Future<void> updateSyncStates() async {
final lastState = final lastState =
(await _db.getAllItems.get()).where((item) => item.unSyncedData && item.userData != null).toList(); (await _db.getAllItems.get()).where((item) => item.unSyncedData && item.userData != null).toList();
@ -114,7 +108,7 @@ class SyncNotifier extends StateNotifier<SyncSettingsModel> {
updateSyncStates(); updateSyncStates();
} }
}); });
migrateFromIsar(); _initializeQueryStream();
} }
void _initializeQueryStream({String? id}) async { void _initializeQueryStream({String? id}) async {

View file

@ -1,13 +0,0 @@
import 'dart:io';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:isar/isar.dart';
class AbstractSyncNotifier {
final Ref ref;
final Isar? isar;
final Directory mobileDirectory;
final String subPath = "Synced";
AbstractSyncNotifier(this.ref, this.isar, this.mobileDirectory);
}

View file

@ -77,7 +77,7 @@ class Update extends _$Update {
} }
@Freezed(toJson: false, fromJson: false) @Freezed(toJson: false, fromJson: false)
class UpdatesModel with _$UpdatesModel { abstract class UpdatesModel with _$UpdatesModel {
const UpdatesModel._(); const UpdatesModel._();
factory UpdatesModel({ factory UpdatesModel({

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,20 +9,187 @@ part of 'update_provider.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc /// @nodoc
mixin _$UpdatesModel { mixin _$UpdatesModel implements DiagnosticableTreeMixin {
List<ReleaseInfo> get lastRelease => throw _privateConstructorUsedError; List<ReleaseInfo> get lastRelease;
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'UpdatesModel'))
..add(DiagnosticsProperty('lastRelease', lastRelease));
}
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'UpdatesModel(lastRelease: $lastRelease)';
}
}
/// Adds pattern-matching-related methods to [UpdatesModel].
extension UpdatesModelPatterns on UpdatesModel {
/// 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(_UpdatesModel value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _UpdatesModel() 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(_UpdatesModel value) $default,
) {
final _that = this;
switch (_that) {
case _UpdatesModel():
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(_UpdatesModel value)? $default,
) {
final _that = this;
switch (_that) {
case _UpdatesModel() 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<ReleaseInfo> lastRelease)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _UpdatesModel() when $default != null:
return $default(_that.lastRelease);
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<ReleaseInfo> lastRelease) $default,
) {
final _that = this;
switch (_that) {
case _UpdatesModel():
return $default(_that.lastRelease);
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<ReleaseInfo> lastRelease)? $default,
) {
final _that = this;
switch (_that) {
case _UpdatesModel() when $default != null:
return $default(_that.lastRelease);
case _:
return null;
}
}
} }
/// @nodoc /// @nodoc
class _$UpdatesModelImpl extends _UpdatesModel with DiagnosticableTreeMixin { class _UpdatesModel extends UpdatesModel with DiagnosticableTreeMixin {
_$UpdatesModelImpl({final List<ReleaseInfo> lastRelease = const []}) _UpdatesModel({final List<ReleaseInfo> lastRelease = const []})
: _lastRelease = lastRelease, : _lastRelease = lastRelease,
super._(); super._();
@ -35,25 +202,17 @@ class _$UpdatesModelImpl extends _UpdatesModel with DiagnosticableTreeMixin {
return EqualUnmodifiableListView(_lastRelease); return EqualUnmodifiableListView(_lastRelease);
} }
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'UpdatesModel(lastRelease: $lastRelease)';
}
@override @override
void debugFillProperties(DiagnosticPropertiesBuilder properties) { void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties properties
..add(DiagnosticsProperty('type', 'UpdatesModel')) ..add(DiagnosticsProperty('type', 'UpdatesModel'))
..add(DiagnosticsProperty('lastRelease', lastRelease)); ..add(DiagnosticsProperty('lastRelease', lastRelease));
} }
}
abstract class _UpdatesModel extends UpdatesModel {
factory _UpdatesModel({final List<ReleaseInfo> lastRelease}) =
_$UpdatesModelImpl;
_UpdatesModel._() : super._();
@override @override
List<ReleaseInfo> get lastRelease; String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'UpdatesModel(lastRelease: $lastRelease)';
}
} }
// dart format on

View file

@ -136,7 +136,7 @@ class AuthGuard extends AutoRouteGuard {
return resolver.next(true); return resolver.next(true);
} }
resolver.redirect<bool>(SplashRoute(loggedIn: (value) { resolver.redirectUntil<bool>(SplashRoute(loggedIn: (value) {
if (value) { if (value) {
resolver.next(true); resolver.next(true);
} else { } else {

View file

@ -1,3 +1,4 @@
// dart format width=80
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ************************************************************************** // **************************************************************************
@ -8,9 +9,10 @@
// coverage:ignore-file // coverage:ignore-file
// ignore_for_file: no_leading_underscores_for_library_prefixes // ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i23; import 'dart:async' as _i24;
import 'package:auto_route/auto_route.dart' as _i18; import 'package:auto_route/auto_route.dart' as _i18;
import 'package:collection/collection.dart' as _i23;
import 'package:fladder/models/item_base_model.dart' as _i19; import 'package:fladder/models/item_base_model.dart' as _i19;
import 'package:fladder/models/items/photos_model.dart' as _i22; import 'package:fladder/models/items/photos_model.dart' as _i22;
import 'package:fladder/models/library_search/library_search_options.dart' import 'package:fladder/models/library_search/library_search_options.dart'
@ -35,16 +37,13 @@ import 'package:fladder/screens/settings/settings_selection_screen.dart'
import 'package:fladder/screens/splash_screen.dart' as _i16; import 'package:fladder/screens/splash_screen.dart' as _i16;
import 'package:fladder/screens/syncing/synced_screen.dart' as _i17; import 'package:fladder/screens/syncing/synced_screen.dart' as _i17;
import 'package:flutter/foundation.dart' as _i20; import 'package:flutter/foundation.dart' as _i20;
import 'package:flutter/material.dart' as _i24; import 'package:flutter/material.dart' as _i25;
/// generated route for /// generated route for
/// [_i1.AboutSettingsPage] /// [_i1.AboutSettingsPage]
class AboutSettingsRoute extends _i18.PageRouteInfo<void> { class AboutSettingsRoute extends _i18.PageRouteInfo<void> {
const AboutSettingsRoute({List<_i18.PageRouteInfo>? children}) const AboutSettingsRoute({List<_i18.PageRouteInfo>? children})
: super( : super(AboutSettingsRoute.name, initialChildren: children);
AboutSettingsRoute.name,
initialChildren: children,
);
static const String name = 'AboutSettingsRoute'; static const String name = 'AboutSettingsRoute';
@ -60,10 +59,7 @@ class AboutSettingsRoute extends _i18.PageRouteInfo<void> {
/// [_i2.ClientSettingsPage] /// [_i2.ClientSettingsPage]
class ClientSettingsRoute extends _i18.PageRouteInfo<void> { class ClientSettingsRoute extends _i18.PageRouteInfo<void> {
const ClientSettingsRoute({List<_i18.PageRouteInfo>? children}) const ClientSettingsRoute({List<_i18.PageRouteInfo>? children})
: super( : super(ClientSettingsRoute.name, initialChildren: children);
ClientSettingsRoute.name,
initialChildren: children,
);
static const String name = 'ClientSettingsRoute'; static const String name = 'ClientSettingsRoute';
@ -79,10 +75,7 @@ class ClientSettingsRoute extends _i18.PageRouteInfo<void> {
/// [_i3.DashboardScreen] /// [_i3.DashboardScreen]
class DashboardRoute extends _i18.PageRouteInfo<void> { class DashboardRoute extends _i18.PageRouteInfo<void> {
const DashboardRoute({List<_i18.PageRouteInfo>? children}) const DashboardRoute({List<_i18.PageRouteInfo>? children})
: super( : super(DashboardRoute.name, initialChildren: children);
DashboardRoute.name,
initialChildren: children,
);
static const String name = 'DashboardRoute'; static const String name = 'DashboardRoute';
@ -104,11 +97,7 @@ class DetailsRoute extends _i18.PageRouteInfo<DetailsRouteArgs> {
List<_i18.PageRouteInfo>? children, List<_i18.PageRouteInfo>? children,
}) : super( }) : super(
DetailsRoute.name, DetailsRoute.name,
args: DetailsRouteArgs( args: DetailsRouteArgs(id: id, item: item, key: key),
id: id,
item: item,
key: key,
),
rawQueryParams: {'id': id}, rawQueryParams: {'id': id},
initialChildren: children, initialChildren: children,
); );
@ -120,26 +109,15 @@ class DetailsRoute extends _i18.PageRouteInfo<DetailsRouteArgs> {
builder: (data) { builder: (data) {
final queryParams = data.queryParams; final queryParams = data.queryParams;
final args = data.argsAs<DetailsRouteArgs>( final args = data.argsAs<DetailsRouteArgs>(
orElse: () => DetailsRouteArgs( orElse: () => DetailsRouteArgs(id: queryParams.getString('id', '')),
id: queryParams.getString(
'id',
'',
)));
return _i4.DetailsScreen(
id: args.id,
item: args.item,
key: args.key,
); );
return _i4.DetailsScreen(id: args.id, item: args.item, key: args.key);
}, },
); );
} }
class DetailsRouteArgs { class DetailsRouteArgs {
const DetailsRouteArgs({ const DetailsRouteArgs({this.id = '', this.item, this.key});
this.id = '',
this.item,
this.key,
});
final String id; final String id;
@ -151,16 +129,23 @@ class DetailsRouteArgs {
String toString() { String toString() {
return 'DetailsRouteArgs{id: $id, item: $item, key: $key}'; return 'DetailsRouteArgs{id: $id, item: $item, key: $key}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DetailsRouteArgs) return false;
return id == other.id && item == other.item && key == other.key;
}
@override
int get hashCode => id.hashCode ^ item.hashCode ^ key.hashCode;
} }
/// generated route for /// generated route for
/// [_i5.FavouritesScreen] /// [_i5.FavouritesScreen]
class FavouritesRoute extends _i18.PageRouteInfo<void> { class FavouritesRoute extends _i18.PageRouteInfo<void> {
const FavouritesRoute({List<_i18.PageRouteInfo>? children}) const FavouritesRoute({List<_i18.PageRouteInfo>? children})
: super( : super(FavouritesRoute.name, initialChildren: children);
FavouritesRoute.name,
initialChildren: children,
);
static const String name = 'FavouritesRoute'; static const String name = 'FavouritesRoute';
@ -176,10 +161,7 @@ class FavouritesRoute extends _i18.PageRouteInfo<void> {
/// [_i6.HomeScreen] /// [_i6.HomeScreen]
class HomeRoute extends _i18.PageRouteInfo<void> { class HomeRoute extends _i18.PageRouteInfo<void> {
const HomeRoute({List<_i18.PageRouteInfo>? children}) const HomeRoute({List<_i18.PageRouteInfo>? children})
: super( : super(HomeRoute.name, initialChildren: children);
HomeRoute.name,
initialChildren: children,
);
static const String name = 'HomeRoute'; static const String name = 'HomeRoute';
@ -195,10 +177,7 @@ class HomeRoute extends _i18.PageRouteInfo<void> {
/// [_i7.LibraryScreen] /// [_i7.LibraryScreen]
class LibraryRoute extends _i18.PageRouteInfo<void> { class LibraryRoute extends _i18.PageRouteInfo<void> {
const LibraryRoute({List<_i18.PageRouteInfo>? children}) const LibraryRoute({List<_i18.PageRouteInfo>? children})
: super( : super(LibraryRoute.name, initialChildren: children);
LibraryRoute.name,
initialChildren: children,
);
static const String name = 'LibraryRoute'; static const String name = 'LibraryRoute';
@ -256,7 +235,8 @@ class LibrarySearchRoute extends _i18.PageRouteInfo<LibrarySearchRouteArgs> {
favourites: queryParams.optBool('favourites'), favourites: queryParams.optBool('favourites'),
sortOrder: queryParams.get('sortOrder'), sortOrder: queryParams.get('sortOrder'),
sortingOptions: queryParams.get('sortOptions'), sortingOptions: queryParams.get('sortOptions'),
)); ),
);
return _i8.LibrarySearchScreen( return _i8.LibrarySearchScreen(
viewModelId: args.viewModelId, viewModelId: args.viewModelId,
folderId: args.folderId, folderId: args.folderId,
@ -299,16 +279,36 @@ class LibrarySearchRouteArgs {
String toString() { String toString() {
return 'LibrarySearchRouteArgs{viewModelId: $viewModelId, folderId: $folderId, favourites: $favourites, sortOrder: $sortOrder, sortingOptions: $sortingOptions, photoToView: $photoToView, key: $key}'; return 'LibrarySearchRouteArgs{viewModelId: $viewModelId, folderId: $folderId, favourites: $favourites, sortOrder: $sortOrder, sortingOptions: $sortingOptions, photoToView: $photoToView, key: $key}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! LibrarySearchRouteArgs) return false;
return viewModelId == other.viewModelId &&
const _i23.ListEquality().equals(folderId, other.folderId) &&
favourites == other.favourites &&
sortOrder == other.sortOrder &&
sortingOptions == other.sortingOptions &&
photoToView == other.photoToView &&
key == other.key;
}
@override
int get hashCode =>
viewModelId.hashCode ^
const _i23.ListEquality().hash(folderId) ^
favourites.hashCode ^
sortOrder.hashCode ^
sortingOptions.hashCode ^
photoToView.hashCode ^
key.hashCode;
} }
/// generated route for /// generated route for
/// [_i9.LockScreen] /// [_i9.LockScreen]
class LockRoute extends _i18.PageRouteInfo<void> { class LockRoute extends _i18.PageRouteInfo<void> {
const LockRoute({List<_i18.PageRouteInfo>? children}) const LockRoute({List<_i18.PageRouteInfo>? children})
: super( : super(LockRoute.name, initialChildren: children);
LockRoute.name,
initialChildren: children,
);
static const String name = 'LockRoute'; static const String name = 'LockRoute';
@ -324,10 +324,7 @@ class LockRoute extends _i18.PageRouteInfo<void> {
/// [_i10.LoginScreen] /// [_i10.LoginScreen]
class LoginRoute extends _i18.PageRouteInfo<void> { class LoginRoute extends _i18.PageRouteInfo<void> {
const LoginRoute({List<_i18.PageRouteInfo>? children}) const LoginRoute({List<_i18.PageRouteInfo>? children})
: super( : super(LoginRoute.name, initialChildren: children);
LoginRoute.name,
initialChildren: children,
);
static const String name = 'LoginRoute'; static const String name = 'LoginRoute';
@ -345,8 +342,8 @@ class PhotoViewerRoute extends _i18.PageRouteInfo<PhotoViewerRouteArgs> {
PhotoViewerRoute({ PhotoViewerRoute({
List<_i22.PhotoModel>? items, List<_i22.PhotoModel>? items,
String? selected, String? selected,
_i23.Future<List<_i22.PhotoModel>>? loadingItems, _i24.Future<List<_i22.PhotoModel>>? loadingItems,
_i24.Key? key, _i25.Key? key,
List<_i18.PageRouteInfo>? children, List<_i18.PageRouteInfo>? children,
}) : super( }) : super(
PhotoViewerRoute.name, PhotoViewerRoute.name,
@ -367,8 +364,9 @@ class PhotoViewerRoute extends _i18.PageRouteInfo<PhotoViewerRouteArgs> {
builder: (data) { builder: (data) {
final queryParams = data.queryParams; final queryParams = data.queryParams;
final args = data.argsAs<PhotoViewerRouteArgs>( final args = data.argsAs<PhotoViewerRouteArgs>(
orElse: () => PhotoViewerRouteArgs( orElse: () =>
selected: queryParams.optString('selectedId'))); PhotoViewerRouteArgs(selected: queryParams.optString('selectedId')),
);
return _i11.PhotoViewerScreen( return _i11.PhotoViewerScreen(
items: args.items, items: args.items,
selected: args.selected, selected: args.selected,
@ -391,24 +389,38 @@ class PhotoViewerRouteArgs {
final String? selected; final String? selected;
final _i23.Future<List<_i22.PhotoModel>>? loadingItems; final _i24.Future<List<_i22.PhotoModel>>? loadingItems;
final _i24.Key? key; final _i25.Key? key;
@override @override
String toString() { String toString() {
return 'PhotoViewerRouteArgs{items: $items, selected: $selected, loadingItems: $loadingItems, key: $key}'; return 'PhotoViewerRouteArgs{items: $items, selected: $selected, loadingItems: $loadingItems, key: $key}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! PhotoViewerRouteArgs) return false;
return const _i23.ListEquality().equals(items, other.items) &&
selected == other.selected &&
loadingItems == other.loadingItems &&
key == other.key;
}
@override
int get hashCode =>
const _i23.ListEquality().hash(items) ^
selected.hashCode ^
loadingItems.hashCode ^
key.hashCode;
} }
/// generated route for /// generated route for
/// [_i12.PlayerSettingsPage] /// [_i12.PlayerSettingsPage]
class PlayerSettingsRoute extends _i18.PageRouteInfo<void> { class PlayerSettingsRoute extends _i18.PageRouteInfo<void> {
const PlayerSettingsRoute({List<_i18.PageRouteInfo>? children}) const PlayerSettingsRoute({List<_i18.PageRouteInfo>? children})
: super( : super(PlayerSettingsRoute.name, initialChildren: children);
PlayerSettingsRoute.name,
initialChildren: children,
);
static const String name = 'PlayerSettingsRoute'; static const String name = 'PlayerSettingsRoute';
@ -424,10 +436,7 @@ class PlayerSettingsRoute extends _i18.PageRouteInfo<void> {
/// [_i13.SecuritySettingsPage] /// [_i13.SecuritySettingsPage]
class SecuritySettingsRoute extends _i18.PageRouteInfo<void> { class SecuritySettingsRoute extends _i18.PageRouteInfo<void> {
const SecuritySettingsRoute({List<_i18.PageRouteInfo>? children}) const SecuritySettingsRoute({List<_i18.PageRouteInfo>? children})
: super( : super(SecuritySettingsRoute.name, initialChildren: children);
SecuritySettingsRoute.name,
initialChildren: children,
);
static const String name = 'SecuritySettingsRoute'; static const String name = 'SecuritySettingsRoute';
@ -443,10 +452,7 @@ class SecuritySettingsRoute extends _i18.PageRouteInfo<void> {
/// [_i14.SettingsScreen] /// [_i14.SettingsScreen]
class SettingsRoute extends _i18.PageRouteInfo<void> { class SettingsRoute extends _i18.PageRouteInfo<void> {
const SettingsRoute({List<_i18.PageRouteInfo>? children}) const SettingsRoute({List<_i18.PageRouteInfo>? children})
: super( : super(SettingsRoute.name, initialChildren: children);
SettingsRoute.name,
initialChildren: children,
);
static const String name = 'SettingsRoute'; static const String name = 'SettingsRoute';
@ -462,10 +468,7 @@ class SettingsRoute extends _i18.PageRouteInfo<void> {
/// [_i15.SettingsSelectionScreen] /// [_i15.SettingsSelectionScreen]
class SettingsSelectionRoute extends _i18.PageRouteInfo<void> { class SettingsSelectionRoute extends _i18.PageRouteInfo<void> {
const SettingsSelectionRoute({List<_i18.PageRouteInfo>? children}) const SettingsSelectionRoute({List<_i18.PageRouteInfo>? children})
: super( : super(SettingsSelectionRoute.name, initialChildren: children);
SettingsSelectionRoute.name,
initialChildren: children,
);
static const String name = 'SettingsSelectionRoute'; static const String name = 'SettingsSelectionRoute';
@ -482,14 +485,11 @@ class SettingsSelectionRoute extends _i18.PageRouteInfo<void> {
class SplashRoute extends _i18.PageRouteInfo<SplashRouteArgs> { class SplashRoute extends _i18.PageRouteInfo<SplashRouteArgs> {
SplashRoute({ SplashRoute({
dynamic Function(bool)? loggedIn, dynamic Function(bool)? loggedIn,
_i24.Key? key, _i25.Key? key,
List<_i18.PageRouteInfo>? children, List<_i18.PageRouteInfo>? children,
}) : super( }) : super(
SplashRoute.name, SplashRoute.name,
args: SplashRouteArgs( args: SplashRouteArgs(loggedIn: loggedIn, key: key),
loggedIn: loggedIn,
key: key,
),
initialChildren: children, initialChildren: children,
); );
@ -498,37 +498,42 @@ class SplashRoute extends _i18.PageRouteInfo<SplashRouteArgs> {
static _i18.PageInfo page = _i18.PageInfo( static _i18.PageInfo page = _i18.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = final args = data.argsAs<SplashRouteArgs>(
data.argsAs<SplashRouteArgs>(orElse: () => const SplashRouteArgs()); orElse: () => const SplashRouteArgs(),
return _i16.SplashScreen(
loggedIn: args.loggedIn,
key: args.key,
); );
return _i16.SplashScreen(loggedIn: args.loggedIn, key: args.key);
}, },
); );
} }
class SplashRouteArgs { class SplashRouteArgs {
const SplashRouteArgs({ const SplashRouteArgs({this.loggedIn, this.key});
this.loggedIn,
this.key,
});
final dynamic Function(bool)? loggedIn; final dynamic Function(bool)? loggedIn;
final _i24.Key? key; final _i25.Key? key;
@override @override
String toString() { String toString() {
return 'SplashRouteArgs{loggedIn: $loggedIn, key: $key}'; return 'SplashRouteArgs{loggedIn: $loggedIn, key: $key}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! SplashRouteArgs) return false;
return key == other.key;
}
@override
int get hashCode => key.hashCode;
} }
/// generated route for /// generated route for
/// [_i17.SyncedScreen] /// [_i17.SyncedScreen]
class SyncedRoute extends _i18.PageRouteInfo<SyncedRouteArgs> { class SyncedRoute extends _i18.PageRouteInfo<SyncedRouteArgs> {
SyncedRoute({ SyncedRoute({
_i24.ScrollController? navigationScrollController, _i25.ScrollController? navigationScrollController,
_i20.Key? key, _i20.Key? key,
List<_i18.PageRouteInfo>? children, List<_i18.PageRouteInfo>? children,
}) : super( }) : super(
@ -545,8 +550,9 @@ class SyncedRoute extends _i18.PageRouteInfo<SyncedRouteArgs> {
static _i18.PageInfo page = _i18.PageInfo( static _i18.PageInfo page = _i18.PageInfo(
name, name,
builder: (data) { builder: (data) {
final args = final args = data.argsAs<SyncedRouteArgs>(
data.argsAs<SyncedRouteArgs>(orElse: () => const SyncedRouteArgs()); orElse: () => const SyncedRouteArgs(),
);
return _i17.SyncedScreen( return _i17.SyncedScreen(
navigationScrollController: args.navigationScrollController, navigationScrollController: args.navigationScrollController,
key: args.key, key: args.key,
@ -556,12 +562,9 @@ class SyncedRoute extends _i18.PageRouteInfo<SyncedRouteArgs> {
} }
class SyncedRouteArgs { class SyncedRouteArgs {
const SyncedRouteArgs({ const SyncedRouteArgs({this.navigationScrollController, this.key});
this.navigationScrollController,
this.key,
});
final _i24.ScrollController? navigationScrollController; final _i25.ScrollController? navigationScrollController;
final _i20.Key? key; final _i20.Key? key;
@ -569,4 +572,15 @@ class SyncedRouteArgs {
String toString() { String toString() {
return 'SyncedRouteArgs{navigationScrollController: $navigationScrollController, key: $key}'; return 'SyncedRouteArgs{navigationScrollController: $navigationScrollController, key: $key}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! SyncedRouteArgs) return false;
return navigationScrollController == other.navigationScrollController &&
key == other.key;
}
@override
int get hashCode => navigationScrollController.hashCode ^ key.hashCode;
} }

View file

@ -173,14 +173,16 @@ class _LibraryFilterChipsState extends ConsumerState<LibraryFilterChips> {
children: [ children: [
Text(context.localized.groupBy), Text(context.localized.groupBy),
...GroupBy.values.map( ...GroupBy.values.map(
(group) => RadioListTile.adaptive( (group) => RadioGroup(
value: group,
groupValue: groupBy, groupValue: groupBy,
title: Text(group.value(context)),
onChanged: (_) { onChanged: (_) {
provider.setGroupBy(group); provider.setGroupBy(group);
Navigator.pop(context); Navigator.pop(context);
}, },
child: RadioListTile.adaptive(
value: group,
title: Text(group.value(context)),
),
), ),
), ),
], ],

View file

@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:fladder/models/library_search/library_search_options.dart'; import 'package:fladder/models/library_search/library_search_options.dart';
import 'package:fladder/providers/library_search_provider.dart'; import 'package:fladder/providers/library_search_provider.dart';
import 'package:fladder/util/localization_helper.dart'; import 'package:fladder/util/localization_helper.dart';
import 'package:flutter/material.dart';
Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDialogue( Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDialogue(
BuildContext context, { BuildContext context, {
@ -27,9 +28,7 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
child: Text(context.localized.sortBy, style: Theme.of(context).textTheme.titleLarge), child: Text(context.localized.sortBy, style: Theme.of(context).textTheme.titleLarge),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
...SortingOptions.values.map((e) => RadioListTile.adaptive( ...SortingOptions.values.map((e) => RadioGroup(
value: e,
title: Text(e.label(context)),
groupValue: newSortingOptions, groupValue: newSortingOptions,
onChanged: (value) { onChanged: (value) {
state( state(
@ -38,6 +37,10 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
}, },
); );
}, },
child: RadioListTile.adaptive(
value: e,
title: Text(e.label(context)),
),
)), )),
const Padding( const Padding(
padding: EdgeInsets.symmetric(vertical: 8), padding: EdgeInsets.symmetric(vertical: 8),
@ -49,9 +52,7 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
...SortingOrder.values.map( ...SortingOrder.values.map(
(e) => RadioListTile.adaptive( (e) => RadioGroup(
value: e,
title: Text(e.label(context)),
groupValue: newSortOrder, groupValue: newSortOrder,
onChanged: (value) { onChanged: (value) {
state( state(
@ -60,6 +61,10 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
}, },
); );
}, },
child: RadioListTile.adaptive(
value: e,
title: Text(e.label(context)),
),
), ),
), ),
], ],

View file

@ -59,7 +59,7 @@ class _LockScreenState extends ConsumerState<LockScreen> with WidgetsBindingObse
void handleLogin(AccountModel user) { void handleLogin(AccountModel user) {
ref.read(lockScreenActiveProvider.notifier).update((state) => false); ref.read(lockScreenActiveProvider.notifier).update((state) => false);
poppingLockScreen = true; poppingLockScreen = true;
context.router.popForced(); context.router.pop();
} }
void tapLoggedInAccount(AccountModel user) async { void tapLoggedInAccount(AccountModel user) async {

View file

@ -24,13 +24,15 @@ List<Widget> buildClientSettingsTheme(BuildContext context, WidgetRef ref) {
items: ThemeMode.values, items: ThemeMode.values,
selected: [ref.read(clientSettingsProvider.select((value) => value.themeMode))], selected: [ref.read(clientSettingsProvider.select((value) => value.themeMode))],
onChanged: (values) => ref.read(clientSettingsProvider.notifier).setThemeMode(values.first), onChanged: (values) => ref.read(clientSettingsProvider.notifier).setThemeMode(values.first),
itemBuilder: (type, selected, tap) => RadioListTile( itemBuilder: (type, selected, tap) => RadioGroup(
groupValue: ref.read(clientSettingsProvider.select((value) => value.themeMode)),
onChanged: (value) => tap(),
child: RadioListTile(
value: type, value: type,
title: Text(type.label(context)), title: Text(type.label(context)),
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
groupValue: ref.read(clientSettingsProvider.select((value) => value.themeMode)), ),
onChanged: (value) => tap(),
), ),
), ),
), ),
@ -43,11 +45,12 @@ List<Widget> buildClientSettingsTheme(BuildContext context, WidgetRef ref) {
items: [null, ...ColorThemes.values], items: [null, ...ColorThemes.values],
selected: [(ref.read(clientSettingsProvider.select((value) => value.themeColor)))], selected: [(ref.read(clientSettingsProvider.select((value) => value.themeColor)))],
onChanged: (values) => ref.read(clientSettingsProvider.notifier).setThemeColor(values.first), onChanged: (values) => ref.read(clientSettingsProvider.notifier).setThemeColor(values.first),
itemBuilder: (type, selected, tap) => RadioListTile<ColorThemes?>( itemBuilder: (type, selected, tap) => RadioGroup(
onChanged: (value) => tap(),
groupValue: ref.read(clientSettingsProvider.select((value) => value.themeColor)), groupValue: ref.read(clientSettingsProvider.select((value) => value.themeColor)),
child: RadioListTile<ColorThemes?>(
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
value: type, value: type,
onChanged: (value) => tap(),
title: Row( title: Row(
children: [ children: [
Container( Container(
@ -78,6 +81,7 @@ List<Widget> buildClientSettingsTheme(BuildContext context, WidgetRef ref) {
), ),
), ),
), ),
),
SettingsListTile( SettingsListTile(
label: Text(context.localized.clientSettingsSchemeVariantTitle), label: Text(context.localized.clientSettingsSchemeVariantTitle),
subLabel: Text(clientSettings.schemeVariant.label(context)), subLabel: Text(clientSettings.schemeVariant.label(context)),
@ -88,13 +92,15 @@ List<Widget> buildClientSettingsTheme(BuildContext context, WidgetRef ref) {
items: DynamicSchemeVariant.values, items: DynamicSchemeVariant.values,
selected: [(ref.read(clientSettingsProvider.select((value) => value.schemeVariant)))], selected: [(ref.read(clientSettingsProvider.select((value) => value.schemeVariant)))],
onChanged: (values) => ref.read(clientSettingsProvider.notifier).setSchemeVariant(values.first), onChanged: (values) => ref.read(clientSettingsProvider.notifier).setSchemeVariant(values.first),
itemBuilder: (type, selected, tap) => RadioListTile<DynamicSchemeVariant>( itemBuilder: (type, selected, tap) => RadioGroup(
onChanged: (value) => tap(),
groupValue: selected ? type : null, groupValue: selected ? type : null,
child: RadioListTile<DynamicSchemeVariant>(
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
value: type, value: type,
onChanged: (value) => tap(),
title: Text(type.label(context)), title: Text(type.label(context)),
), ),
),
); );
}, },
), ),

View file

@ -117,7 +117,7 @@ class SettingsScaffold extends ConsumerWidget {
if (AdaptiveLayout.layoutModeOf(context) == LayoutMode.single && context.tabsRouter.activeIndex != 0) { if (AdaptiveLayout.layoutModeOf(context) == LayoutMode.single && context.tabsRouter.activeIndex != 0) {
context.tabsRouter.setActiveIndex(0); context.tabsRouter.setActiveIndex(0);
} else { } else {
context.router.popForced(); context.router.pop();
} }
} else { } else {
context.router.popBack(); context.router.popBack();

View file

@ -70,10 +70,6 @@ class _SyncedScreenState extends ConsumerState<SyncedScreen> {
onPressed: () => ref.read(syncProvider.notifier).removeAllSyncedData(), onPressed: () => ref.read(syncProvider.notifier).removeAllSyncedData(),
child: const Text("Clear drift database"), child: const Text("Clear drift database"),
), ),
ElevatedButton(
onPressed: () => ref.read(syncProvider.notifier).migrateFromIsar(),
child: const Text("Migrate Isar to Drift"),
),
], ],
), ),
), ),

View file

@ -42,8 +42,7 @@ class _QualityOptionsDialogue extends ConsumerWidget {
shrinkWrap: true, shrinkWrap: true,
children: qualityOptions?.entries children: qualityOptions?.entries
.map( .map(
(entry) => RadioListTile( (entry) => RadioGroup(
value: entry.value,
groupValue: true, groupValue: true,
onChanged: (value) async { onChanged: (value) async {
final newModel = await playbackModel?.setQualityOption( final newModel = await playbackModel?.setQualityOption(
@ -57,8 +56,10 @@ class _QualityOptionsDialogue extends ConsumerWidget {
} }
context.router.maybePop(); context.router.maybePop();
}, },
child: RadioListTile(
value: entry.value,
title: Text(entry.key.label(context)), title: Text(entry.key.label(context)),
), )),
) )
.toList() ?? .toList() ??
[], [],

View file

@ -14,7 +14,7 @@ final applicationInfoProvider = StateProvider<ApplicationInfo>((ref) {
}); });
@Freezed(toJson: false, fromJson: false) @Freezed(toJson: false, fromJson: false)
class ApplicationInfo with _$ApplicationInfo { abstract class ApplicationInfo with _$ApplicationInfo {
const ApplicationInfo._(); const ApplicationInfo._();
factory ApplicationInfo({ factory ApplicationInfo({

View file

@ -1,5 +1,5 @@
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint // ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
@ -9,23 +9,183 @@ part of 'application_info.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc /// @nodoc
mixin _$ApplicationInfo { mixin _$ApplicationInfo {
String get name => throw _privateConstructorUsedError; String get name;
String get version => throw _privateConstructorUsedError; String get version;
String get buildNumber => throw _privateConstructorUsedError; String get buildNumber;
String get os => throw _privateConstructorUsedError; String get os;
}
/// Adds pattern-matching-related methods to [ApplicationInfo].
extension ApplicationInfoPatterns on ApplicationInfo {
/// 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(_ApplicationInfo value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ApplicationInfo() 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(_ApplicationInfo value) $default,
) {
final _that = this;
switch (_that) {
case _ApplicationInfo():
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(_ApplicationInfo value)? $default,
) {
final _that = this;
switch (_that) {
case _ApplicationInfo() when $default != null:
return $default(_that);
case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>(
TResult Function(
String name, String version, String buildNumber, String os)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ApplicationInfo() when $default != null:
return $default(_that.name, _that.version, _that.buildNumber, _that.os);
case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs
TResult when<TResult extends Object?>(
TResult Function(String name, String version, String buildNumber, String os)
$default,
) {
final _that = this;
switch (_that) {
case _ApplicationInfo():
return $default(_that.name, _that.version, _that.buildNumber, _that.os);
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(
String name, String version, String buildNumber, String os)?
$default,
) {
final _that = this;
switch (_that) {
case _ApplicationInfo() when $default != null:
return $default(_that.name, _that.version, _that.buildNumber, _that.os);
case _:
return null;
}
}
} }
/// @nodoc /// @nodoc
class _$ApplicationInfoImpl extends _ApplicationInfo { class _ApplicationInfo extends ApplicationInfo {
_$ApplicationInfoImpl( _ApplicationInfo(
{required this.name, {required this.name,
required this.version, required this.version,
required this.buildNumber, required this.buildNumber,
@ -42,20 +202,4 @@ class _$ApplicationInfoImpl extends _ApplicationInfo {
final String os; final String os;
} }
abstract class _ApplicationInfo extends ApplicationInfo { // dart format on
factory _ApplicationInfo(
{required final String name,
required final String version,
required final String buildNumber,
required final String os}) = _$ApplicationInfoImpl;
_ApplicationInfo._() : super._();
@override
String get name;
@override
String get version;
@override
String get buildNumber;
@override
String get os;
}

View file

@ -1,82 +0,0 @@
import 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:drift/drift.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:isar/isar.dart';
import 'package:path/path.dart' as path;
import 'package:path_provider/path_provider.dart';
import 'package:fladder/models/syncing/database_item.dart';
import 'package:fladder/models/syncing/i_synced_item.dart';
import 'package:fladder/models/syncing/sync_item.dart';
Future<void> isarMigration(Ref ref, AppDatabase db, String savePath) async {
if (kIsWeb) return;
//Return if the database is already migrated or not empty
final isNotEmtpy = await db.select(db.databaseItems).get().then((value) => value.isNotEmpty);
if (isNotEmtpy) {
log('Drift database is not empty, skipping migration');
return;
}
//Open isar database
final applicationDirectory = await getApplicationDocumentsDirectory();
final isarPath = Directory(path.joinAll([applicationDirectory.path, 'Fladder', 'Database']));
await isarPath.create(recursive: true);
final isar = Isar.open(
schemas: [ISyncedItemSchema],
directory: isarPath.path,
);
//Fetch all synced items from the old database
List<SyncedItem> items = isar.iSyncedItems
.where()
.findAll()
.map((e) => SyncedItem.fromIsar(e, path.joinAll([savePath, e.userId ?? "Unkown User"])))
.toList();
//Clear any missing paths
items = items.where((e) => e.path != null ? Directory(e.path!).existsSync() : false).toList();
//Convert to drift database items
final driftItems = items.map(
(item) => DatabaseItemsCompanion(
id: Value(item.id),
parentId: Value(item.parentId),
syncing: Value(item.syncing),
userId: Value(item.userId),
path: Value(item.path),
fileSize: Value(item.fileSize),
sortName: Value(item.sortName),
videoFileName: Value(item.videoFileName),
trickPlayModel: Value(item.fTrickPlayModel != null ? jsonEncode(item.fTrickPlayModel?.toJson()) : null),
mediaSegments: Value(item.mediaSegments != null ? jsonEncode(item.mediaSegments?.toJson()) : null),
images: Value(item.fImages != null ? jsonEncode(item.fImages?.toJson()) : null),
chapters: Value(jsonEncode(item.fChapters.map((e) => e.toJson()).toList())),
subtitles: Value(jsonEncode(item.subtitles.map((e) => e.toJson()).toList())),
userData: Value(item.userData != null ? jsonEncode(item.userData?.toJson()) : null),
),
);
await db.batch((batch) {
batch.insertAll(
db.databaseItems,
driftItems,
mode: InsertMode.insertOrReplace,
);
});
isar.close();
//Delete isar database after a few versions?
// await Future.delayed(const Duration(seconds: 1));
// if (await isarPath.exists()) {
// log('Deleting old Fladder base folder: ${isarPath.path}');
// await isarPath.delete(recursive: true);
// }
}

View file

@ -9,7 +9,6 @@
#include <desktop_drop/desktop_drop_plugin.h> #include <desktop_drop/desktop_drop_plugin.h>
#include <dynamic_color/dynamic_color_plugin.h> #include <dynamic_color/dynamic_color_plugin.h>
#include <fvp/fvp_plugin.h> #include <fvp/fvp_plugin.h>
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h> #include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
#include <media_kit_video/media_kit_video_plugin.h> #include <media_kit_video/media_kit_video_plugin.h>
#include <screen_retriever_linux/screen_retriever_linux_plugin.h> #include <screen_retriever_linux/screen_retriever_linux_plugin.h>
@ -28,9 +27,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) fvp_registrar = g_autoptr(FlPluginRegistrar) fvp_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FvpPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "FvpPlugin");
fvp_plugin_register_with_registrar(fvp_registrar); fvp_plugin_register_with_registrar(fvp_registrar);
g_autoptr(FlPluginRegistrar) isar_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "IsarFlutterLibsPlugin");
isar_flutter_libs_plugin_register_with_registrar(isar_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar = g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin");
media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar); media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar);

View file

@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
desktop_drop desktop_drop
dynamic_color dynamic_color
fvp fvp
isar_flutter_libs
media_kit_libs_linux media_kit_libs_linux
media_kit_video media_kit_video
screen_retriever_linux screen_retriever_linux

View file

@ -12,7 +12,6 @@ import desktop_drop
import dynamic_color import dynamic_color
import file_picker import file_picker
import fvp import fvp
import isar_flutter_libs
import just_audio import just_audio
import local_auth_darwin import local_auth_darwin
import media_kit_libs_macos_video import media_kit_libs_macos_video
@ -40,7 +39,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin"))
FvpPlugin.register(with: registry.registrar(forPlugin: "FvpPlugin")) FvpPlugin.register(with: registry.registrar(forPlugin: "FvpPlugin"))
IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
LocalAuthPlugin.register(with: registry.registrar(forPlugin: "LocalAuthPlugin")) LocalAuthPlugin.register(with: registry.registrar(forPlugin: "LocalAuthPlugin"))
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin")) MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))

View file

@ -5,31 +5,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: _fe_analyzer_shared name: _fe_analyzer_shared
sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" sha256: da0d9209ca76bde579f2da330aeb9df62b6319c834fa7baae052021b0462401f
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "76.0.0" version: "85.0.0"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.3.3"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" sha256: f4ad0fea5f102201015c9aae9d93bc02f75dd9491529a8c21f88d17a8523d44c
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.11.0" version: "7.6.0"
analyzer_plugin: analyzer_plugin:
dependency: transitive dependency: transitive
description: description:
name: analyzer_plugin name: analyzer_plugin
sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" sha256: a5ab7590c27b779f3d4de67f31c4109dbe13dd7339f86461a6f2a8ab2594d8ce
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.11.3" version: "0.13.4"
animations: animations:
dependency: "direct main" dependency: "direct main"
description: description:
@ -106,18 +101,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: auto_route name: auto_route
sha256: "1d1bd908a1fec327719326d5d0791edd37f16caff6493c01003689fb03315ad7" sha256: c820e918863a03544aac68eaf61e17c8a6126b663d7cad24a8fd3657a1e6be61
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "9.3.0+1" version: "10.1.2"
auto_route_generator: auto_route_generator:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: auto_route_generator name: auto_route_generator
sha256: c9086eb07271e51b44071ad5cff34e889f3156710b964a308c2ab590769e79e6 sha256: "2a5b5bf9c55d4a2098931037dac90921a4663808aed494bb4f134d82d46cb8ec"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "9.0.0" version: "10.2.3"
automatic_animated_list: automatic_animated_list:
dependency: "direct main" dependency: "direct main"
description: description:
@ -210,10 +205,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: built_value name: built_value
sha256: "0b1b12a0a549605e5f04476031cd0bc91ead1d7c8e830773a18ee54179b3cb62" sha256: ba95c961bafcd8686d1cf63be864eb59447e795e124d98d6a27d91fcd13602fb
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.11.0" version: "8.11.1"
cached_network_image: cached_network_image:
dependency: "direct main" dependency: "direct main"
description: description:
@ -274,10 +269,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: chopper name: chopper
sha256: f366529b450d0fd91931b08339c7c1d09c746d0d20e5ffb8c8641a79b6114dc2 sha256: "35cde96292178809ca4290f42dbb83d832551333c2b18a2226a2538103ab40d3"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.2.0" version: "8.3.0"
chopper_generator: chopper_generator:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -294,6 +289,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.0" version: "0.1.0"
cli_config:
dependency: transitive
description:
name: cli_config
sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec
url: "https://pub.dev"
source: hosted
version: "0.2.0"
cli_util: cli_util:
dependency: transitive dependency: transitive
description: description:
@ -330,10 +333,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: connectivity_plus name: connectivity_plus
sha256: "051849e2bd7c7b3bc5844ea0d096609ddc3a859890ec3a9ac4a65a2620cc1f99" sha256: b5e72753cf63becce2c61fd04dfe0f1c430cc5278b53a1342dc5ad839eab29ec
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.4" version: "6.1.5"
connectivity_plus_platform_interface: connectivity_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -350,6 +353,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
coverage:
dependency: transitive
description:
name: coverage
sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d"
url: "https://pub.dev"
source: hosted
version: "1.15.0"
cross_file: cross_file:
dependency: transitive dependency: transitive
description: description:
@ -386,50 +397,50 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: custom_lint name: custom_lint
sha256: "3486c470bb93313a9417f926c7dd694a2e349220992d7b9d14534dc49c15bba9" sha256: "9656925637516c5cf0f5da018b33df94025af2088fe09c8ae2ca54c53f2d9a84"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.0" version: "0.7.6"
custom_lint_core: custom_lint_core:
dependency: transitive dependency: transitive
description: description:
name: custom_lint_core name: custom_lint_core
sha256: "02450c3e45e2a6e8b26c4d16687596ab3c4644dd5792e3313aa9ceba5a49b7f5" sha256: "31110af3dde9d29fb10828ca33f1dce24d2798477b167675543ce3d208dee8be"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.0" version: "0.7.5"
custom_lint_visitor: custom_lint_visitor:
dependency: transitive dependency: transitive
description: description:
name: custom_lint_visitor name: custom_lint_visitor
sha256: bfe9b7a09c4775a587b58d10ebb871d4fe618237639b1e84d5ec62d7dfef25f9 sha256: "4a86a0d8415a91fbb8298d6ef03e9034dc8e323a599ddc4120a0e36c433983a2"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.0+6.11.0" version: "1.0.0+7.7.0"
dart_mappable: dart_mappable:
dependency: "direct main" dependency: "direct main"
description: description:
name: dart_mappable name: dart_mappable
sha256: "2255b2c00e328a65fef5a8df2dabfc0dc9c2e518c33a50051a4519b1c7a28c48" sha256: "15f41a35da8ee690bbfa0059fa241edeeaea73f89a2ba685b354ece07cd8ada6"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.5.0" version: "4.6.0"
dart_mappable_builder: dart_mappable_builder:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: dart_mappable_builder name: dart_mappable_builder
sha256: b3673a6d190f2ea766b39ea298d4c55d1caca9382a536cf164ffe7e2f955c501 sha256: adea8c55aac73c8254aa14a8272b788eb0f72799dd8e4810a9b664ec9b4e353c
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.3.1+1" version: "4.5.0"
dart_style: dart_style:
dependency: transitive dependency: transitive
description: description:
name: dart_style name: dart_style
sha256: "7306ab8a2359a48d22310ad823521d723acfed60ee1f7e37388e8986853b6820" sha256: "8a0e5fba27e8ee025d2ffb4ee820b4e6e2cf5e4246a6b1a477eb66866947e0bb"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.8" version: "3.1.1"
db_viewer: db_viewer:
dependency: transitive dependency: transitive
description: description:
@ -474,10 +485,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: drift name: drift
sha256: b584ddeb2b74436735dd2cf746d2d021e19a9a6770f409212fd5cbc2814ada85 sha256: "6aaea757f53bb035e8a3baedf3d1d53a79d6549a6c13d84f7546509da9372c7c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.26.1" version: "2.28.1"
drift_db_viewer: drift_db_viewer:
dependency: "direct main" dependency: "direct main"
description: description:
@ -490,10 +501,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: drift_dev name: drift_dev
sha256: "0d3f8b33b76cf1c6a82ee34d9511c40957549c4674b8f1688609e6d6c7306588" sha256: "68c138e884527d2bd61df2ade276c3a144df84d1adeb0ab8f3196b5afe021bd4"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.26.0" version: "2.28.0"
drift_flutter: drift_flutter:
dependency: "direct main" dependency: "direct main"
description: description:
@ -514,10 +525,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: dynamic_color name: dynamic_color
sha256: eae98052fa6e2826bdac3dd2e921c6ce2903be15c6b7f8b6d8a5d49b5086298d sha256: "43a5a6679649a7731ab860334a5812f2067c2d9ce6452cf069c5e0c25336c17c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.7.0" version: "1.8.1"
equatable: equatable:
dependency: transitive dependency: transitive
description: description:
@ -570,10 +581,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: file_picker name: file_picker
sha256: ef9908739bdd9c476353d6adff72e88fd00c625f5b959ae23f7567bd5137db0a sha256: e7e16c9d15c36330b94ca0e2ad8cb61f93cd5282d0158c09805aed13b5452f22
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.2.0" version: "10.3.2"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@ -724,10 +735,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: flutter_plugin_android_lifecycle name: flutter_plugin_android_lifecycle
sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e sha256: "6382ce712ff69b0f719640ce957559dde459e55ecd433c767e06d139ddf16cab"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.28" version: "2.0.29"
flutter_riverpod: flutter_riverpod:
dependency: "direct main" dependency: "direct main"
description: description:
@ -740,10 +751,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: flutter_rust_bridge name: flutter_rust_bridge
sha256: "0ad5079de35d317650fec59b26cb4d0c116ebc2ce703a29f9367513b8a91c287" sha256: "37ef40bc6f863652e865f0b2563ea07f0d3c58d8efad803cc01933a4b2ee067e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.5.0" version: "2.11.1"
flutter_staggered_grid_view: flutter_staggered_grid_view:
dependency: "direct main" dependency: "direct main"
description: description:
@ -806,26 +817,26 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: font_awesome_flutter name: font_awesome_flutter
sha256: d3a89184101baec7f4600d58840a764d2ef760fe1c5a20ef9e6b0e9b24a07a3a sha256: "27af5982e6c510dec1ba038eff634fa284676ee84e3fd807225c80c4ad869177"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.8.0" version: "10.10.0"
freezed: freezed:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: freezed name: freezed
sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e" sha256: "2d399f823b8849663744d2a9ddcce01c49268fb4170d0442a655bf6a2f47be22"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.5.7" version: "3.1.0"
freezed_annotation: freezed_annotation:
dependency: "direct main" dependency: "direct main"
description: description:
name: freezed_annotation name: freezed_annotation
sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.4" version: "3.1.0"
frontend_server_client: frontend_server_client:
dependency: transitive dependency: transitive
description: description:
@ -938,6 +949,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.0" version: "0.7.0"
hotreloader:
dependency: transitive
description:
name: hotreloader
sha256: bc167a1163807b03bada490bfe2df25b0d744df359227880220a5cbd04e5734b
url: "https://pub.dev"
source: hosted
version: "4.3.0"
html: html:
dependency: transitive dependency: transitive
description: description:
@ -950,10 +969,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: http name: http
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.4.0" version: "1.5.0"
http2: http2:
dependency: transitive dependency: transitive
description: description:
@ -990,10 +1009,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: icons_launcher name: icons_launcher
sha256: "2949eef3d336028d89133f69ef221d877e09deed04ebd8e738ab4a427850a7a2" sha256: e6d806458fac6d3b1126ad757b4208a314ba775b3c8119cd88877091379edc7a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.1" version: "3.0.2"
iconsax_plus: iconsax_plus:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1026,30 +1045,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.5" version: "1.0.5"
isar:
dependency: "direct main"
description:
name: isar
sha256: e987032e5d007a03ba4415cbf4d47add17b57ac664db8705db90fbfeb6a16737
url: "https://pub.isar-community.dev"
source: hosted
version: "4.0.3"
isar_flutter_libs:
dependency: "direct main"
description:
name: isar_flutter_libs
sha256: a6b86d8618fe2d7d0e2ac6aa7a7f21c0c8ae912ccbef94a45d9f6e1e519ef610
url: "https://pub.isar-community.dev"
source: hosted
version: "4.0.3"
js: js:
dependency: transitive dependency: transitive
description: description:
name: js name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.7" version: "0.7.2"
json_annotation: json_annotation:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1062,10 +1065,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: json_serializable name: json_serializable
sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c sha256: c50ef5fc083d5b5e12eef489503ba3bf5ccc899e487d691584699b4bdefeea8c
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.9.0" version: "6.9.5"
just_audio: just_audio:
dependency: transitive dependency: transitive
description: description:
@ -1078,10 +1081,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: just_audio_platform_interface name: just_audio_platform_interface
sha256: "4cd94536af0219fa306205a58e78d67e02b0555283c1c094ee41e402a14a5c4a" sha256: "2532c8d6702528824445921c5ff10548b518b13f808c2e34c2fd54793b999a6a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.5.0" version: "4.6.0"
just_audio_web: just_audio_web:
dependency: transitive dependency: transitive
description: description:
@ -1094,26 +1097,34 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker name: leak_tracker
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.0.9" version: "11.0.1"
leak_tracker_flutter_testing: leak_tracker_flutter_testing:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker_flutter_testing name: leak_tracker_flutter_testing
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.9" version: "3.0.10"
leak_tracker_testing: leak_tracker_testing:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker_testing name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.1" version: "3.0.2"
lean_builder:
dependency: transitive
description:
name: lean_builder
sha256: "3d3a04c9dda8ced6b2a48d23aaf98ef5aa32f68f9c62da1b6c6d45bf03aa8164"
url: "https://pub.dev"
source: hosted
version: "0.1.1"
lints: lints:
dependency: transitive dependency: transitive
description: description:
@ -1134,18 +1145,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: local_auth_android name: local_auth_android
sha256: "82b2bdeee2199a510d3b7716121e96a6609da86693bb0863edd8566355406b79" sha256: "316503f6772dea9c0c038bb7aac4f68ab00112d707d258c770f7fc3c250a2d88"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.50" version: "1.0.51"
local_auth_darwin: local_auth_darwin:
dependency: transitive dependency: transitive
description: description:
name: local_auth_darwin name: local_auth_darwin
sha256: "25163ce60a5a6c468cf7a0e3dc8a165f824cabc2aa9e39a5e9fc5c2311b7686f" sha256: "0e9706a8543a4a2eee60346294d6a633dd7c3ee60fae6b752570457c4ff32055"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.5.0" version: "1.6.0"
local_auth_platform_interface: local_auth_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -1170,14 +1181,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.0" version: "1.3.0"
macros:
dependency: transitive
description:
name: macros
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
url: "https://pub.dev"
source: hosted
version: "0.1.3-main.0"
markdown: markdown:
dependency: transitive dependency: transitive
description: description:
@ -1306,6 +1309,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.0" version: "0.5.0"
node_preamble:
dependency: transitive
description:
name: node_preamble
sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
octo_image: octo_image:
dependency: transitive dependency: transitive
description: description:
@ -1334,18 +1345,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: package_info_plus name: package_info_plus
sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191" sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.3.0" version: "8.3.1"
package_info_plus_platform_interface: package_info_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: package_info_plus_platform_interface name: package_info_plus_platform_interface
sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c" sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.2.0" version: "3.2.1"
page_transition: page_transition:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1390,10 +1401,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path_provider_foundation name: path_provider_foundation
sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.1" version: "2.4.2"
path_provider_linux: path_provider_linux:
dependency: transitive dependency: transitive
description: description:
@ -1494,18 +1505,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: protobuf name: protobuf
sha256: "6153efcc92a06910918f3db8231fd2cf828ac81e50ebd87adc8f8a8cb3caff0e" sha256: de9c9eb2c33f8e933a42932fe1dc504800ca45ebc3d673e6ed7f39754ee4053e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.1.1" version: "4.2.0"
provider: provider:
dependency: transitive dependency: transitive
description: description:
name: provider name: provider
sha256: "4abbd070a04e9ddc287673bf5a030c7ca8b685ff70218720abab8b092f53dd84" sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.5" version: "6.1.5+1"
pub_semver: pub_semver:
dependency: transitive dependency: transitive
description: description:
@ -1526,10 +1537,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: qs_dart name: qs_dart
sha256: "42a7ca80f965786d8d0730633b7cf05c132ebcb9558e04dbc8752f2865caa705" sha256: ffeb30c6a0999a9b62ab372d4780437339d75036e6eedb9685727cca70d72bca
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.9" version: "1.5.4"
rational: rational:
dependency: transitive dependency: transitive
description: description:
@ -1546,22 +1557,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.1.0" version: "4.1.0"
recursive_regex:
dependency: transitive
description:
name: recursive_regex
sha256: f7252e3d3dfd1665e594d9fe035eca6bc54139b1f2fee38256fa427ea41adc60
url: "https://pub.dev"
source: hosted
version: "1.0.0"
reorderable_grid: reorderable_grid:
dependency: "direct main" dependency: "direct main"
description: description:
name: reorderable_grid name: reorderable_grid
sha256: "0b9cd95ef0f070ef99f92affe9cf85a4aa127099cd1334e5940950ce58cd981d" sha256: c7d2e1f2e032a8fffe121f9da828546ee58db35c9c7d19d7a2d189dea2f9939d
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.10" version: "1.0.12"
riverpod: riverpod:
dependency: transitive dependency: transitive
description: description:
@ -1574,10 +1577,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: riverpod_analyzer_utils name: riverpod_analyzer_utils
sha256: c6b8222b2b483cb87ae77ad147d6408f400c64f060df7a225b127f4afef4f8c8 sha256: "03a17170088c63aab6c54c44456f5ab78876a1ddb6032ffde1662ddab4959611"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.8" version: "0.5.10"
riverpod_annotation: riverpod_annotation:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1590,10 +1593,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: riverpod_generator name: riverpod_generator
sha256: "63546d70952015f0981361636bf8f356d9cfd9d7f6f0815e3c07789a41233188" sha256: "44a0992d54473eb199ede00e2260bd3c262a86560e3c6f6374503d86d0580e36"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.6.3" version: "2.6.5"
rxdart: rxdart:
dependency: transitive dependency: transitive
description: description:
@ -1614,18 +1617,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: screen_brightness name: screen_brightness
sha256: f9bcfd7029d81aa2ba960f8c67a51427c721796f7f4eea02bc2bb84c41205ad7 sha256: "5f70754028f169f059fdc61112a19dcbee152f8b293c42c848317854d650cba3"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.5" version: "2.1.7"
screen_brightness_android: screen_brightness_android:
dependency: transitive dependency: transitive
description: description:
name: screen_brightness_android name: screen_brightness_android
sha256: fb5fa43cb89d0c9b8534556c427db1e97e46594ac5d66ebdcf16063b773d54ed sha256: d34f5321abd03bc3474f4c381f53d189117eba0b039eac1916aa92cca5fd0a96
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.2" version: "2.1.3"
screen_brightness_ios: screen_brightness_ios:
dependency: transitive dependency: transitive
description: description:
@ -1646,10 +1649,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: screen_brightness_ohos name: screen_brightness_ohos
sha256: "61e313e46eaee3f83dd4e85a2a91f8a81be02c154bc9e60830a7c0fd76dac286" sha256: a93a263dcd39b5c56e589eb495bcd001ce65cdd96ff12ab1350683559d5c5bb7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.0" version: "2.1.2"
screen_brightness_platform_interface: screen_brightness_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -1718,18 +1721,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: share_plus name: share_plus
sha256: b2961506569e28948d75ec346c28775bb111986bb69dc6a20754a457e3d97fa0 sha256: d7dc0630a923883c6328ca31b89aa682bacbf2f8304162d29f7c6aaff03a27a1
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "11.0.0" version: "11.1.0"
share_plus_platform_interface: share_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: share_plus_platform_interface name: share_plus_platform_interface
sha256: "1032d392bc5d2095a77447a805aa3f804d2ae6a4d5eef5e6ebb3bd94c1bc19ef" sha256: "88023e53a13429bd65d8e85e11a9b484f49d4c190abbd96c7932b74d6927cc9a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.0.0" version: "6.1.0"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1742,10 +1745,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_android name: shared_preferences_android
sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac" sha256: "5bcf0772a761b04f8c6bf814721713de6f3e5d9d89caf8d3fe031b02a342379e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.10" version: "2.4.11"
shared_preferences_foundation: shared_preferences_foundation:
dependency: transitive dependency: transitive
description: description:
@ -1794,6 +1797,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.4.2" version: "1.4.2"
shelf_packages_handler:
dependency: transitive
description:
name: shelf_packages_handler
sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
shelf_static:
dependency: transitive
description:
name: shelf_static
sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3
url: "https://pub.dev"
source: hosted
version: "1.1.3"
shelf_web_socket: shelf_web_socket:
dependency: transitive dependency: transitive
description: description:
@ -1819,26 +1838,42 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: smtc_windows name: smtc_windows
sha256: "80f7c10867da485ffdf87f842bf27e6763589933c18c11af5dc1cd1e158c3154" sha256: dee279b0ddf663c4c729a88bca4e57fb4861aa1b3d01e230bdbf1277b8bfe664
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.0" version: "1.1.0"
source_gen: source_gen:
dependency: transitive dependency: transitive
description: description:
name: source_gen name: source_gen
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.5.0" version: "2.0.0"
source_helper: source_helper:
dependency: transitive dependency: transitive
description: description:
name: source_helper name: source_helper
sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c" sha256: a447acb083d3a5ef17f983dd36201aeea33fedadb3228fa831f2f0c92f0f3aca
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.5" version: "1.3.7"
source_map_stack_trace:
dependency: transitive
description:
name: source_map_stack_trace
sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b
url: "https://pub.dev"
source: hosted
version: "2.1.2"
source_maps:
dependency: transitive
description:
name: source_maps
sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812"
url: "https://pub.dev"
source: hosted
version: "0.10.13"
source_span: source_span:
dependency: transitive dependency: transitive
description: description:
@ -1867,18 +1902,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: sqflite_android name: sqflite_android
sha256: "2b3070c5fa881839f8b402ee4a39c1b4d561704d4ebbbcfb808a119bc2a1701b" sha256: ecd684501ebc2ae9a83536e8b15731642b9570dc8623e0073d227d0ee2bfea88
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.1" version: "2.4.2+2"
sqflite_common: sqflite_common:
dependency: transitive dependency: transitive
description: description:
name: sqflite_common name: sqflite_common
sha256: "84731e8bfd8303a3389903e01fb2141b6e59b5973cacbb0929021df08dddbe8b" sha256: "6ef422a4525ecc601db6c0a2233ff448c731307906e92cabc9ba292afaae16a6"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.5.5" version: "2.5.6"
sqflite_darwin: sqflite_darwin:
dependency: transitive dependency: transitive
description: description:
@ -1899,18 +1934,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: sqlite3 name: sqlite3
sha256: "608b56d594e4c8498c972c8f1507209f9fd74939971b948ddbbfbfd1c9cb3c15" sha256: f393d92c71bdcc118d6203d07c991b9be0f84b1a6f89dd4f7eed348131329924
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.7.7" version: "2.9.0"
sqlite3_flutter_libs: sqlite3_flutter_libs:
dependency: transitive dependency: transitive
description: description:
name: sqlite3_flutter_libs name: sqlite3_flutter_libs
sha256: "60464aa06f3f6f6fba9abd7564e315526c1fee6d6a77d6ee52a1f7f48a9107f6" sha256: "2b03273e71867a8a4d030861fc21706200debe5c5858a4b9e58f4a1c129586a4"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.37" version: "0.5.39"
sqlparser: sqlparser:
dependency: transitive dependency: transitive
description: description:
@ -1979,10 +2014,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: swagger_dart_code_generator name: swagger_dart_code_generator
sha256: e6fab279c2adb3f91aa170c9126601d22e1485217dddc1443cf3c05eb6480d45 sha256: "64f10f8e2f38c2139b394d00381d69eae55d3bb42b6f524eb21f27145e60c671"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.1" version: "3.0.3"
synchronized: synchronized:
dependency: transitive dependency: transitive
description: description:
@ -1999,14 +2034,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.2" version: "1.2.2"
test:
dependency: transitive
description:
name: test
sha256: "65e29d831719be0591f7b3b1a32a3cda258ec98c58c7b25f7b84241bc31215bb"
url: "https://pub.dev"
source: hosted
version: "1.26.2"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.4" version: "0.7.6"
test_core:
dependency: transitive
description:
name: test_core
sha256: "80bf5a02b60af04b09e14f6fe68b921aad119493e26e490deaca5993fef1b05a"
url: "https://pub.dev"
source: hosted
version: "0.6.11"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -2083,18 +2134,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_android name: url_launcher_android
sha256: "8582d7f6fe14d2652b4c45c9b6c14c0b678c2af2d083a11b604caeba51930d79" sha256: "0aedad096a85b49df2e4725fa32118f9fa580f3b14af7a2d2221896a02cd5656"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.3.16" version: "6.3.17"
url_launcher_ios: url_launcher_ios:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_ios name: url_launcher_ios
sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb" sha256: d80b3f567a617cb923546034cc94bfe44eb15f989fe670b37f26abdb9d939cb7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.3.3" version: "6.3.4"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
@ -2107,10 +2158,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_macos name: url_launcher_macos
sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" sha256: c043a77d6600ac9c38300567f33ef12b0ef4f4783a2c1f00231d2b1941fea13f
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.2.2" version: "3.2.3"
url_launcher_platform_interface: url_launcher_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -2171,18 +2222,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vector_graphics_compiler name: vector_graphics_compiler
sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331" sha256: ca81fdfaf62a5ab45d7296614aea108d2c7d0efca8393e96174bf4d51e6725b0
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.17" version: "1.1.18"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
name: vector_math name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.2.0"
video_player: video_player:
dependency: "direct main" dependency: "direct main"
description: description:
@ -2195,18 +2246,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: video_player_android name: video_player_android
sha256: "9d5af2d233ba69df803dcf2f31e66d9a4c6206f2d96178df06b09b0ec3056b39" sha256: "53f3b57c7ac88c18e6074d0f94c7146e128c515f0a4503c3061b8e71dea3a0f2"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.8.9" version: "2.8.12"
video_player_avfoundation: video_player_avfoundation:
dependency: transitive dependency: transitive
description: description:
name: video_player_avfoundation name: video_player_avfoundation
sha256: "9fedd55023249f3a02738c195c906b4e530956191febf0838e37d0dac912f953" sha256: f9a780aac57802b2892f93787e5ea53b5f43cc57dc107bee9436458365be71cd
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.8.0" version: "2.8.4"
video_player_platform_interface: video_player_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -2235,10 +2286,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vm_service name: vm_service
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "15.0.0" version: "15.0.2"
volume_controller: volume_controller:
dependency: transitive dependency: transitive
description: description:
@ -2303,6 +2354,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.3" version: "3.0.3"
webkit_inspection_protocol:
dependency: transitive
description:
name: webkit_inspection_protocol
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
webview_flutter: webview_flutter:
dependency: transitive dependency: transitive
description: description:
@ -2315,26 +2374,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: webview_flutter_android name: webview_flutter_android
sha256: "9573ad97890d199ac3ab32399aa33a5412163b37feb573eb5b0a76b35e9ffe41" sha256: "0a42444056b24ed832bdf3442d65c5194f6416f7e782152384944053c2ecc9a3"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.2" version: "4.10.0"
webview_flutter_platform_interface: webview_flutter_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: webview_flutter_platform_interface name: webview_flutter_platform_interface
sha256: f0dc2dc3a2b1e3a6abdd6801b9355ebfeb3b8f6cde6b9dc7c9235909c4a1f147 sha256: "63d26ee3aca7256a83ccb576a50272edd7cfc80573a4305caa98985feb493ee0"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.13.1" version: "2.14.0"
webview_flutter_wkwebview: webview_flutter_wkwebview:
dependency: transitive dependency: transitive
description: description:
name: webview_flutter_wkwebview name: webview_flutter_wkwebview
sha256: "71523b9048cf510cfa1fd4e0a3fa5e476a66e0884d5df51d59d5023dba237107" sha256: fb46db8216131a3e55bcf44040ca808423539bc6732e7ed34fb6d8044e3d512f
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.22.1" version: "3.23.0"
win32: win32:
dependency: transitive dependency: transitive
description: description:
@ -2375,6 +2434,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.5.0" version: "6.5.0"
xxh3:
dependency: transitive
description:
name: xxh3
sha256: "399a0438f5d426785723c99da6b16e136f4953fb1e9db0bf270bd41dd4619916"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
yaml: yaml:
dependency: transitive dependency: transitive
description: description:
@ -2384,5 +2451,5 @@ packages:
source: hosted source: hosted
version: "3.1.3" version: "3.1.3"
sdks: sdks:
dart: ">=3.8.0 <4.0.0" dart: ">=3.9.0 <4.0.0"
flutter: ">=3.32.0" flutter: ">=3.32.0"

View file

@ -40,11 +40,11 @@ dependencies:
iconsax_plus: ^1.0.0 iconsax_plus: ^1.0.0
# Network and HTTP # Network and HTTP
chopper: ^8.1.0 chopper: ^8.3.0
cached_network_image: ^3.4.1 cached_network_image: ^3.4.1
http: ^1.4.0 http: ^1.5.0
flutter_cache_manager: ^3.4.1 flutter_cache_manager: ^3.4.1
connectivity_plus: ^6.1.4 connectivity_plus: ^6.1.5
# State Management # State Management
flutter_riverpod: ^2.6.1 flutter_riverpod: ^2.6.1
@ -52,7 +52,7 @@ dependencies:
# JSON and Serialization # JSON and Serialization
json_annotation: ^4.9.0 json_annotation: ^4.9.0
freezed_annotation: ^2.4.4 freezed_annotation: ^3.1.0
# Logging # Logging
logging: ^1.3.0 logging: ^1.3.0
@ -73,8 +73,8 @@ dependencies:
video_player: ^2.10.0 video_player: ^2.10.0
# UI Components # UI Components
dynamic_color: ^1.7.0 dynamic_color: ^1.8.1
flutter_svg: ^2.1.0 flutter_svg: ^2.2.0
animations: ^2.0.11 animations: ^2.0.11
automatic_animated_list: ^1.1.0 automatic_animated_list: ^1.1.0
page_transition: ^2.2.1 page_transition: ^2.2.1
@ -85,55 +85,49 @@ dependencies:
flutter_blurhash: ^0.9.1 flutter_blurhash: ^0.9.1
extended_image: ^10.0.1 extended_image: ^10.0.1
flutter_widget_from_html: ^0.17.0 flutter_widget_from_html: ^0.17.0
font_awesome_flutter: ^10.8.0 font_awesome_flutter: ^10.9.1
reorderable_grid: ^1.0.10 reorderable_grid: ^1.0.12
overflow_view: ^0.5.0 overflow_view: ^0.5.0
flutter_sticky_header: ^0.8.0 flutter_sticky_header: ^0.8.0
markdown_widget: ^2.3.2+8 markdown_widget: ^2.3.2+8
# Navigation # Navigation
auto_route: ^9.3.0+1 auto_route: ^10.1.2
url_launcher: ^6.3.1 url_launcher: ^6.3.2
flutter_custom_tabs: ^2.4.0 flutter_custom_tabs: ^2.4.0
# Utility # Utility
path: ^1.9.1 path: ^1.9.1
file_picker: ^10.2.0 file_picker: ^10.3.2
transparent_image: ^2.0.1 transparent_image: ^2.0.1
universal_html: ^2.2.4 universal_html: ^2.2.4
collection: ^1.19.1 collection: ^1.19.1
# Device and System # Device and System
local_auth: ^2.3.0 local_auth: ^2.3.0
package_info_plus: ^8.3.0 package_info_plus: ^8.3.1
wakelock_plus: ^1.3.2 wakelock_plus: ^1.3.2
screen_brightness: ^2.1.4 screen_brightness: ^2.1.7
window_manager: ^0.5.0 window_manager: ^0.5.1
smtc_windows: ^1.0.0 smtc_windows: ^1.1.0
background_downloader: ^9.2.2 background_downloader: ^9.2.3
screen_retriever: ^0.2.0 screen_retriever: ^0.2.0
# Data # Data
isar: drift: ^2.28.1
version: ^4.0.3 drift_flutter: ^0.2.5
hosted: https://pub.isar-community.dev/ drift_sync: ^0.13.0
isar_flutter_libs: # contains Isar Core drift_db_viewer: ^2.1.0
version: ^4.0.3
hosted: https://pub.isar-community.dev/
# Other # Other
async: ^2.13.0 async: ^2.13.0
xid: ^1.2.1 xid: ^1.2.1
desktop_drop: ^0.6.0 desktop_drop: ^0.6.1
flexible_scrollbar: ^0.1.3 flexible_scrollbar: ^0.1.3
flutter_typeahead: ^5.2.0 flutter_typeahead: ^5.2.0
share_plus: ^11.0.0 share_plus: ^11.1.0
archive: ^4.0.7 archive: ^4.0.7
dart_mappable: ^4.5.0 dart_mappable: ^4.6.0
drift: ^2.26.1
drift_flutter: ^0.2.5
drift_sync: ^0.13.0
drift_db_viewer: ^2.1.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
@ -144,18 +138,18 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your # activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint # package. See that file for information about deactivating specific lint
# rules and activating additional ones. # rules and activating additional ones.
drift_dev: ^2.26.0 drift_dev: ^2.28.0
flutter_lints: ^6.0.0 flutter_lints: ^6.0.0
build_runner: ^2.5.4 build_runner: ^2.5.4
chopper_generator: ^8.1.0 chopper_generator: ^8.2.0
json_serializable: ^6.9.0 json_serializable: ^6.9.5
custom_lint: ^0.7.0 custom_lint: ^0.7.6
freezed: ^2.5.7 freezed: ^3.1.0
swagger_dart_code_generator: ^3.0.1 swagger_dart_code_generator: ^3.0.3
riverpod_generator: ^2.6.3 riverpod_generator: ^2.6.5
dart_mappable_builder: ^4.3.1+1 dart_mappable_builder: ^4.5.0
auto_route_generator: ^9.0.0 auto_route_generator: ^10.2.3
icons_launcher: ^3.0.1 icons_launcher: ^3.0.2
flutter: flutter:
# The following line ensures that the Material Icons font is # The following line ensures that the Material Icons font is

View file

@ -10,7 +10,6 @@
#include <desktop_drop/desktop_drop_plugin.h> #include <desktop_drop/desktop_drop_plugin.h>
#include <dynamic_color/dynamic_color_plugin_c_api.h> #include <dynamic_color/dynamic_color_plugin_c_api.h>
#include <fvp/fvp_plugin_c_api.h> #include <fvp/fvp_plugin_c_api.h>
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
#include <local_auth_windows/local_auth_plugin.h> #include <local_auth_windows/local_auth_plugin.h>
#include <media_kit_libs_windows_video/media_kit_libs_windows_video_plugin_c_api.h> #include <media_kit_libs_windows_video/media_kit_libs_windows_video_plugin_c_api.h>
#include <media_kit_video/media_kit_video_plugin_c_api.h> #include <media_kit_video/media_kit_video_plugin_c_api.h>
@ -31,8 +30,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
FvpPluginCApiRegisterWithRegistrar( FvpPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FvpPluginCApi")); registry->GetRegistrarForPlugin("FvpPluginCApi"));
IsarFlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin"));
LocalAuthPluginRegisterWithRegistrar( LocalAuthPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("LocalAuthPlugin")); registry->GetRegistrarForPlugin("LocalAuthPlugin"));
MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar( MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar(

View file

@ -7,7 +7,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
desktop_drop desktop_drop
dynamic_color dynamic_color
fvp fvp
isar_flutter_libs
local_auth_windows local_auth_windows
media_kit_libs_windows_video media_kit_libs_windows_video
media_kit_video media_kit_video