mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 13:38:13 -08:00
chore:cleanup-packages breaking: remove isar (#474)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
ab6182f69d
commit
6357b9843c
81 changed files with 31400 additions and 25673 deletions
2
.fvmrc
2
.fvmrc
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"flutter": "3.32.8"
|
||||
"flutter": "3.35.1"
|
||||
}
|
||||
1
.vscode/launch.json
vendored
1
.vscode/launch.json
vendored
|
|
@ -81,7 +81,6 @@
|
|||
"args": [
|
||||
"--web-port",
|
||||
"9090",
|
||||
"--web-experimental-hot-reload",
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
|||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
|
@ -7,7 +7,7 @@
|
|||
"LTWH",
|
||||
"outro"
|
||||
],
|
||||
"dart.flutterSdkPath": ".fvm/versions/3.32.8",
|
||||
"dart.flutterSdkPath": ".fvm/versions/3.35.1",
|
||||
"search.exclude": {
|
||||
"**/.fvm": true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2565,7 +2565,8 @@ enum AudioItemIdHls1PlaylistIdSegmentIdContainerGetSubtitleMethod {
|
|||
final String? value;
|
||||
|
||||
const AudioItemIdHls1PlaylistIdSegmentIdContainerGetSubtitleMethod(
|
||||
this.value);
|
||||
this.value,
|
||||
);
|
||||
}
|
||||
|
||||
enum AudioItemIdHls1PlaylistIdSegmentIdContainerGetContext {
|
||||
|
|
@ -2702,7 +2703,8 @@ enum VideosItemIdHls1PlaylistIdSegmentIdContainerGetSubtitleMethod {
|
|||
final String? value;
|
||||
|
||||
const VideosItemIdHls1PlaylistIdSegmentIdContainerGetSubtitleMethod(
|
||||
this.value);
|
||||
this.value,
|
||||
);
|
||||
}
|
||||
|
||||
enum VideosItemIdHls1PlaylistIdSegmentIdContainerGetContext {
|
||||
|
|
@ -3635,7 +3637,8 @@ enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayed
|
|||
final String? value;
|
||||
|
||||
const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountGetImageType(
|
||||
this.value);
|
||||
this.value,
|
||||
);
|
||||
}
|
||||
|
||||
enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountGetFormat {
|
||||
|
|
@ -3658,7 +3661,8 @@ enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayed
|
|||
final String? value;
|
||||
|
||||
const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountGetFormat(
|
||||
this.value);
|
||||
this.value,
|
||||
);
|
||||
}
|
||||
|
||||
enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadImageType {
|
||||
|
|
@ -3695,7 +3699,8 @@ enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayed
|
|||
final String? value;
|
||||
|
||||
const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadImageType(
|
||||
this.value);
|
||||
this.value,
|
||||
);
|
||||
}
|
||||
|
||||
enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadFormat {
|
||||
|
|
@ -3718,7 +3723,8 @@ enum ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayed
|
|||
final String? value;
|
||||
|
||||
const ItemsItemIdImagesImageTypeImageIndexTagFormatMaxWidthMaxHeightPercentPlayedUnplayedCountHeadFormat(
|
||||
this.value);
|
||||
this.value,
|
||||
);
|
||||
}
|
||||
|
||||
enum ItemsItemIdImagesImageTypeImageIndexIndexPostImageType {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// dart format width=80
|
||||
//Generated jellyfin api code
|
||||
|
||||
part of 'jellyfin_open_api.swagger.dart';
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -17,7 +17,7 @@ part 'account_model.freezed.dart';
|
|||
part 'account_model.g.dart';
|
||||
|
||||
@Freezed(copyWith: true)
|
||||
class AccountModel with _$AccountModel {
|
||||
abstract class AccountModel with _$AccountModel {
|
||||
const AccountModel._();
|
||||
|
||||
const factory AccountModel({
|
||||
|
|
@ -52,7 +52,7 @@ class AccountModel with _$AccountModel {
|
|||
}
|
||||
|
||||
@Freezed(copyWith: true)
|
||||
class UserSettings with _$UserSettings {
|
||||
abstract class UserSettings with _$UserSettings {
|
||||
factory UserSettings({
|
||||
@Default(Duration(seconds: 30)) Duration skipForwardDuration,
|
||||
@Default(Duration(seconds: 10)) Duration skipBackDuration,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -6,8 +6,8 @@ part of 'account_model.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$AccountModelImpl _$$AccountModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$AccountModelImpl(
|
||||
_AccountModel _$AccountModelFromJson(Map<String, dynamic> json) =>
|
||||
_AccountModel(
|
||||
name: json['name'] as String,
|
||||
id: json['id'] 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>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AccountModelImplToJson(_$AccountModelImpl instance) =>
|
||||
Map<String, dynamic> _$AccountModelToJson(_AccountModel instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'id': instance.id,
|
||||
|
|
@ -59,8 +59,8 @@ const _$AuthenticationEnumMap = {
|
|||
Authentication.none: 'none',
|
||||
};
|
||||
|
||||
_$UserSettingsImpl _$$UserSettingsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$UserSettingsImpl(
|
||||
_UserSettings _$UserSettingsFromJson(Map<String, dynamic> json) =>
|
||||
_UserSettings(
|
||||
skipForwardDuration: json['skipForwardDuration'] == null
|
||||
? const Duration(seconds: 30)
|
||||
: Duration(
|
||||
|
|
@ -70,7 +70,7 @@ _$UserSettingsImpl _$$UserSettingsImplFromJson(Map<String, dynamic> json) =>
|
|||
: Duration(microseconds: (json['skipBackDuration'] as num).toInt()),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$UserSettingsImplToJson(_$UserSettingsImpl instance) =>
|
||||
Map<String, dynamic> _$UserSettingsToJson(_UserSettings instance) =>
|
||||
<String, dynamic>{
|
||||
'skipForwardDuration': instance.skipForwardDuration.inMicroseconds,
|
||||
'skipBackDuration': instance.skipBackDuration.inMicroseconds,
|
||||
|
|
|
|||
|
|
@ -112,13 +112,14 @@ class BoxSetModelMapper extends SubClassMapperBase<BoxSetModel> {
|
|||
|
||||
mixin BoxSetModelMappable {
|
||||
BoxSetModelCopyWith<BoxSetModel, BoxSetModel, BoxSetModel> get copyWith =>
|
||||
_BoxSetModelCopyWithImpl(this as BoxSetModel, $identity, $identity);
|
||||
_BoxSetModelCopyWithImpl<BoxSetModel, BoxSetModel>(
|
||||
this as BoxSetModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension BoxSetModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, BoxSetModel, $Out> {
|
||||
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>
|
||||
|
|
@ -215,5 +216,5 @@ class _BoxSetModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
BoxSetModelCopyWith<$R2, BoxSetModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_BoxSetModelCopyWithImpl($value, $cast, t);
|
||||
_BoxSetModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,14 +97,14 @@ class ItemBaseModelMapper extends ClassMapperBase<ItemBaseModel> {
|
|||
|
||||
mixin ItemBaseModelMappable {
|
||||
ItemBaseModelCopyWith<ItemBaseModel, ItemBaseModel, ItemBaseModel>
|
||||
get copyWith => _ItemBaseModelCopyWithImpl(
|
||||
get copyWith => _ItemBaseModelCopyWithImpl<ItemBaseModel, ItemBaseModel>(
|
||||
this as ItemBaseModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension ItemBaseModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, ItemBaseModel, $Out> {
|
||||
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>
|
||||
|
|
@ -187,5 +187,5 @@ class _ItemBaseModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
ItemBaseModelCopyWith<$R2, ItemBaseModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_ItemBaseModelCopyWithImpl($value, $cast, t);
|
||||
_ItemBaseModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,13 +150,14 @@ class EpisodeModelMapper extends SubClassMapperBase<EpisodeModel> {
|
|||
|
||||
mixin EpisodeModelMappable {
|
||||
EpisodeModelCopyWith<EpisodeModel, EpisodeModel, EpisodeModel> get copyWith =>
|
||||
_EpisodeModelCopyWithImpl(this as EpisodeModel, $identity, $identity);
|
||||
_EpisodeModelCopyWithImpl<EpisodeModel, EpisodeModel>(
|
||||
this as EpisodeModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension EpisodeModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, EpisodeModel, $Out> {
|
||||
EpisodeModelCopyWith<$R, EpisodeModel, $Out> get $asEpisodeModel =>
|
||||
$base.as((v, t, t2) => _EpisodeModelCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _EpisodeModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class EpisodeModelCopyWith<$R, $In extends EpisodeModel, $Out>
|
||||
|
|
@ -283,5 +284,5 @@ class _EpisodeModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
EpisodeModelCopyWith<$R2, EpisodeModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_EpisodeModelCopyWithImpl($value, $cast, t);
|
||||
_EpisodeModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,13 +112,14 @@ class FolderModelMapper extends SubClassMapperBase<FolderModel> {
|
|||
|
||||
mixin FolderModelMappable {
|
||||
FolderModelCopyWith<FolderModel, FolderModel, FolderModel> get copyWith =>
|
||||
_FolderModelCopyWithImpl(this as FolderModel, $identity, $identity);
|
||||
_FolderModelCopyWithImpl<FolderModel, FolderModel>(
|
||||
this as FolderModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension FolderModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, FolderModel, $Out> {
|
||||
FolderModelCopyWith<$R, FolderModel, $Out> get $asFolderModel =>
|
||||
$base.as((v, t, t2) => _FolderModelCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _FolderModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class FolderModelCopyWith<$R, $In extends FolderModel, $Out>
|
||||
|
|
@ -215,5 +216,5 @@ class _FolderModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
FolderModelCopyWith<$R2, FolderModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_FolderModelCopyWithImpl($value, $cast, t);
|
||||
_FolderModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import 'package:fladder/jellyfin/jellyfin_open_api.swagger.dart' as dto;
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import 'package:fladder/jellyfin/jellyfin_open_api.swagger.dart' as dto;
|
||||
|
||||
part 'item_properties_model.freezed.dart';
|
||||
|
||||
@Freezed(fromJson: false, toJson: false)
|
||||
class ItemPropertiesModel with _$ItemPropertiesModel {
|
||||
abstract class ItemPropertiesModel with _$ItemPropertiesModel {
|
||||
const ItemPropertiesModel._();
|
||||
|
||||
factory ItemPropertiesModel._internal({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,22 +9,181 @@ part of 'item_properties_model.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ItemPropertiesModel {
|
||||
bool get canDelete => throw _privateConstructorUsedError;
|
||||
bool get canDownload => throw _privateConstructorUsedError;
|
||||
bool get canDelete;
|
||||
bool get canDownload;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ItemPropertiesModel(canDelete: $canDelete, canDownload: $canDownload)';
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds pattern-matching-related methods to [ItemPropertiesModel].
|
||||
extension ItemPropertiesModelPatterns on ItemPropertiesModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>({
|
||||
TResult Function(_ItemPropertiesModel value)? _internal,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ItemPropertiesModel() when _internal != null:
|
||||
return _internal(_that);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>({
|
||||
required TResult Function(_ItemPropertiesModel value) _internal,
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ItemPropertiesModel():
|
||||
return _internal(_that);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult? Function(_ItemPropertiesModel value)? _internal,
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ItemPropertiesModel() when _internal != null:
|
||||
return _internal(_that);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>({
|
||||
TResult Function(bool canDelete, bool canDownload)? _internal,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ItemPropertiesModel() when _internal != null:
|
||||
return _internal(_that.canDelete, _that.canDownload);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>({
|
||||
required TResult Function(bool canDelete, bool canDownload) _internal,
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ItemPropertiesModel():
|
||||
return _internal(_that.canDelete, _that.canDownload);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult? Function(bool canDelete, bool canDownload)? _internal,
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ItemPropertiesModel() when _internal != null:
|
||||
return _internal(_that.canDelete, _that.canDownload);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ItemPropertiesModelImpl extends _ItemPropertiesModel {
|
||||
_$ItemPropertiesModelImpl(
|
||||
{required this.canDelete, required this.canDownload})
|
||||
class _ItemPropertiesModel extends ItemPropertiesModel {
|
||||
_ItemPropertiesModel({required this.canDelete, required this.canDownload})
|
||||
: super._();
|
||||
|
||||
@override
|
||||
|
|
@ -38,14 +197,4 @@ class _$ItemPropertiesModelImpl extends _ItemPropertiesModel {
|
|||
}
|
||||
}
|
||||
|
||||
abstract class _ItemPropertiesModel extends ItemPropertiesModel {
|
||||
factory _ItemPropertiesModel(
|
||||
{required final bool canDelete,
|
||||
required final bool canDownload}) = _$ItemPropertiesModelImpl;
|
||||
_ItemPropertiesModel._() : super._();
|
||||
|
||||
@override
|
||||
bool get canDelete;
|
||||
@override
|
||||
bool get canDownload;
|
||||
}
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -91,12 +91,13 @@ mixin UserDataMappable {
|
|||
}
|
||||
|
||||
UserDataCopyWith<UserData, UserData, UserData> get copyWith =>
|
||||
_UserDataCopyWithImpl(this as UserData, $identity, $identity);
|
||||
_UserDataCopyWithImpl<UserData, UserData>(
|
||||
this as UserData, $identity, $identity);
|
||||
}
|
||||
|
||||
extension UserDataValueCopy<$R, $Out> on ObjectCopyWith<$R, UserData, $Out> {
|
||||
UserDataCopyWith<$R, UserData, $Out> get $asUserData =>
|
||||
$base.as((v, t, t2) => _UserDataCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _UserDataCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class UserDataCopyWith<$R, $In extends UserData, $Out>
|
||||
|
|
@ -154,5 +155,5 @@ class _UserDataCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
UserDataCopyWith<$R2, UserData, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_UserDataCopyWithImpl($value, $cast, t);
|
||||
_UserDataCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,14 +116,15 @@ class ItemStreamModelMapper extends SubClassMapperBase<ItemStreamModel> {
|
|||
|
||||
mixin ItemStreamModelMappable {
|
||||
ItemStreamModelCopyWith<ItemStreamModel, ItemStreamModel, ItemStreamModel>
|
||||
get copyWith => _ItemStreamModelCopyWithImpl(
|
||||
get copyWith =>
|
||||
_ItemStreamModelCopyWithImpl<ItemStreamModel, ItemStreamModel>(
|
||||
this as ItemStreamModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension ItemStreamModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, ItemStreamModel, $Out> {
|
||||
ItemStreamModelCopyWith<$R, ItemStreamModel, $Out> get $asItemStreamModel =>
|
||||
$base.as((v, t, t2) => _ItemStreamModelCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _ItemStreamModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class ItemStreamModelCopyWith<$R, $In extends ItemStreamModel, $Out>
|
||||
|
|
@ -218,5 +219,5 @@ class _ItemStreamModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
ItemStreamModelCopyWith<$R2, ItemStreamModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_ItemStreamModelCopyWithImpl($value, $cast, t);
|
||||
_ItemStreamModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ part 'media_segments_model.freezed.dart';
|
|||
part 'media_segments_model.g.dart';
|
||||
|
||||
@freezed
|
||||
class MediaSegmentsModel with _$MediaSegmentsModel {
|
||||
abstract class MediaSegmentsModel with _$MediaSegmentsModel {
|
||||
const MediaSegmentsModel._();
|
||||
|
||||
factory MediaSegmentsModel({
|
||||
|
|
@ -27,7 +27,7 @@ class MediaSegmentsModel with _$MediaSegmentsModel {
|
|||
}
|
||||
|
||||
@freezed
|
||||
class MediaSegment with _$MediaSegment {
|
||||
abstract class MediaSegment with _$MediaSegment {
|
||||
const MediaSegment._();
|
||||
|
||||
factory MediaSegment({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,32 +9,187 @@ part of 'media_segments_model.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
MediaSegmentsModel _$MediaSegmentsModelFromJson(Map<String, dynamic> json) {
|
||||
return _MediaSegmentsModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$MediaSegmentsModel {
|
||||
List<MediaSegment> get segments => throw _privateConstructorUsedError;
|
||||
List<MediaSegment> get segments;
|
||||
|
||||
/// Serializes this MediaSegmentsModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MediaSegmentsModel(segments: $segments)';
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds pattern-matching-related methods to [MediaSegmentsModel].
|
||||
extension MediaSegmentsModelPatterns on MediaSegmentsModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_MediaSegmentsModel value)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegmentsModel() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_MediaSegmentsModel value) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegmentsModel():
|
||||
return $default(_that);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_MediaSegmentsModel value)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegmentsModel() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function(List<MediaSegment> segments)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegmentsModel() when $default != null:
|
||||
return $default(_that.segments);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function(List<MediaSegment> segments) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegmentsModel():
|
||||
return $default(_that.segments);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function(List<MediaSegment> segments)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegmentsModel() when $default != null:
|
||||
return $default(_that.segments);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$MediaSegmentsModelImpl extends _MediaSegmentsModel {
|
||||
_$MediaSegmentsModelImpl({final List<MediaSegment> segments = const []})
|
||||
class _MediaSegmentsModel extends MediaSegmentsModel {
|
||||
_MediaSegmentsModel({final List<MediaSegment> segments = const []})
|
||||
: _segments = segments,
|
||||
super._();
|
||||
|
||||
factory _$MediaSegmentsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$MediaSegmentsModelImplFromJson(json);
|
||||
factory _MediaSegmentsModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$MediaSegmentsModelFromJson(json);
|
||||
|
||||
final List<MediaSegment> _segments;
|
||||
@override
|
||||
|
|
@ -45,54 +200,201 @@ class _$MediaSegmentsModelImpl extends _MediaSegmentsModel {
|
|||
return EqualUnmodifiableListView(_segments);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MediaSegmentsModel(segments: $segments)';
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$MediaSegmentsModelImplToJson(
|
||||
return _$MediaSegmentsModelToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _MediaSegmentsModel extends MediaSegmentsModel {
|
||||
factory _MediaSegmentsModel({final List<MediaSegment> segments}) =
|
||||
_$MediaSegmentsModelImpl;
|
||||
_MediaSegmentsModel._() : super._();
|
||||
|
||||
factory _MediaSegmentsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$MediaSegmentsModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
List<MediaSegment> get segments;
|
||||
String toString() {
|
||||
return 'MediaSegmentsModel(segments: $segments)';
|
||||
}
|
||||
|
||||
MediaSegment _$MediaSegmentFromJson(Map<String, dynamic> json) {
|
||||
return _MediaSegment.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$MediaSegment {
|
||||
MediaSegmentType get type => throw _privateConstructorUsedError;
|
||||
Duration get start => throw _privateConstructorUsedError;
|
||||
Duration get end => throw _privateConstructorUsedError;
|
||||
MediaSegmentType get type;
|
||||
Duration get start;
|
||||
Duration get end;
|
||||
|
||||
/// Serializes this MediaSegment to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MediaSegment(type: $type, start: $start, end: $end)';
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds pattern-matching-related methods to [MediaSegment].
|
||||
extension MediaSegmentPatterns on MediaSegment {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_MediaSegment value)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegment() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_MediaSegment value) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegment():
|
||||
return $default(_that);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_MediaSegment value)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegment() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function(MediaSegmentType type, Duration start, Duration end)?
|
||||
$default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegment() when $default != null:
|
||||
return $default(_that.type, _that.start, _that.end);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function(MediaSegmentType type, Duration start, Duration end)
|
||||
$default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegment():
|
||||
return $default(_that.type, _that.start, _that.end);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function(MediaSegmentType type, Duration start, Duration end)?
|
||||
$default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _MediaSegment() when $default != null:
|
||||
return $default(_that.type, _that.start, _that.end);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$MediaSegmentImpl extends _MediaSegment {
|
||||
_$MediaSegmentImpl(
|
||||
{required this.type, required this.start, required this.end})
|
||||
class _MediaSegment extends MediaSegment {
|
||||
_MediaSegment({required this.type, required this.start, required this.end})
|
||||
: super._();
|
||||
|
||||
factory _$MediaSegmentImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$MediaSegmentImplFromJson(json);
|
||||
factory _MediaSegment.fromJson(Map<String, dynamic> json) =>
|
||||
_$MediaSegmentFromJson(json);
|
||||
|
||||
@override
|
||||
final MediaSegmentType type;
|
||||
|
|
@ -101,33 +403,17 @@ class _$MediaSegmentImpl extends _MediaSegment {
|
|||
@override
|
||||
final Duration end;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MediaSegment(type: $type, start: $start, end: $end)';
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$MediaSegmentImplToJson(
|
||||
return _$MediaSegmentToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MediaSegment(type: $type, start: $start, end: $end)';
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _MediaSegment extends MediaSegment {
|
||||
factory _MediaSegment(
|
||||
{required final MediaSegmentType type,
|
||||
required final Duration start,
|
||||
required final Duration end}) = _$MediaSegmentImpl;
|
||||
_MediaSegment._() : super._();
|
||||
|
||||
factory _MediaSegment.fromJson(Map<String, dynamic> json) =
|
||||
_$MediaSegmentImpl.fromJson;
|
||||
|
||||
@override
|
||||
MediaSegmentType get type;
|
||||
@override
|
||||
Duration get start;
|
||||
@override
|
||||
Duration get end;
|
||||
}
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,29 +6,27 @@ part of 'media_segments_model.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$MediaSegmentsModelImpl _$$MediaSegmentsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$MediaSegmentsModelImpl(
|
||||
_MediaSegmentsModel _$MediaSegmentsModelFromJson(Map<String, dynamic> json) =>
|
||||
_MediaSegmentsModel(
|
||||
segments: (json['segments'] as List<dynamic>?)
|
||||
?.map((e) => MediaSegment.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MediaSegmentsModelImplToJson(
|
||||
_$MediaSegmentsModelImpl instance) =>
|
||||
Map<String, dynamic> _$MediaSegmentsModelToJson(_MediaSegmentsModel instance) =>
|
||||
<String, dynamic>{
|
||||
'segments': instance.segments,
|
||||
};
|
||||
|
||||
_$MediaSegmentImpl _$$MediaSegmentImplFromJson(Map<String, dynamic> json) =>
|
||||
_$MediaSegmentImpl(
|
||||
_MediaSegment _$MediaSegmentFromJson(Map<String, dynamic> json) =>
|
||||
_MediaSegment(
|
||||
type: $enumDecode(_$MediaSegmentTypeEnumMap, json['type']),
|
||||
start: Duration(microseconds: (json['start'] as num).toInt()),
|
||||
end: Duration(microseconds: (json['end'] as num).toInt()),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MediaSegmentImplToJson(_$MediaSegmentImpl instance) =>
|
||||
Map<String, dynamic> _$MediaSegmentToJson(_MediaSegment instance) =>
|
||||
<String, dynamic>{
|
||||
'type': _$MediaSegmentTypeEnumMap[instance.type]!,
|
||||
'start': instance.start.inMicroseconds,
|
||||
|
|
|
|||
|
|
@ -151,13 +151,14 @@ class MovieModelMapper extends SubClassMapperBase<MovieModel> {
|
|||
|
||||
mixin MovieModelMappable {
|
||||
MovieModelCopyWith<MovieModel, MovieModel, MovieModel> get copyWith =>
|
||||
_MovieModelCopyWithImpl(this as MovieModel, $identity, $identity);
|
||||
_MovieModelCopyWithImpl<MovieModel, MovieModel>(
|
||||
this as MovieModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension MovieModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, MovieModel, $Out> {
|
||||
MovieModelCopyWith<$R, MovieModel, $Out> get $asMovieModel =>
|
||||
$base.as((v, t, t2) => _MovieModelCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _MovieModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class MovieModelCopyWith<$R, $In extends MovieModel, $Out>
|
||||
|
|
@ -291,5 +292,5 @@ class _MovieModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
MovieModelCopyWith<$R2, MovieModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_MovieModelCopyWithImpl($value, $cast, t);
|
||||
_MovieModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,14 +118,14 @@ class OverviewModelMapper extends ClassMapperBase<OverviewModel> {
|
|||
|
||||
mixin OverviewModelMappable {
|
||||
OverviewModelCopyWith<OverviewModel, OverviewModel, OverviewModel>
|
||||
get copyWith => _OverviewModelCopyWithImpl(
|
||||
get copyWith => _OverviewModelCopyWithImpl<OverviewModel, OverviewModel>(
|
||||
this as OverviewModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension OverviewModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, OverviewModel, $Out> {
|
||||
OverviewModelCopyWith<$R, OverviewModel, $Out> get $asOverviewModel =>
|
||||
$base.as((v, t, t2) => _OverviewModelCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _OverviewModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class OverviewModelCopyWith<$R, $In extends OverviewModel, $Out>
|
||||
|
|
@ -275,5 +275,5 @@ class _OverviewModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
OverviewModelCopyWith<$R2, OverviewModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_OverviewModelCopyWithImpl($value, $cast, t);
|
||||
_OverviewModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,13 +128,14 @@ class PersonModelMapper extends SubClassMapperBase<PersonModel> {
|
|||
|
||||
mixin PersonModelMappable {
|
||||
PersonModelCopyWith<PersonModel, PersonModel, PersonModel> get copyWith =>
|
||||
_PersonModelCopyWithImpl(this as PersonModel, $identity, $identity);
|
||||
_PersonModelCopyWithImpl<PersonModel, PersonModel>(
|
||||
this as PersonModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension PersonModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, PersonModel, $Out> {
|
||||
PersonModelCopyWith<$R, PersonModel, $Out> get $asPersonModel =>
|
||||
$base.as((v, t, t2) => _PersonModelCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _PersonModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class PersonModelCopyWith<$R, $In extends PersonModel, $Out>
|
||||
|
|
@ -254,5 +255,5 @@ class _PersonModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
PersonModelCopyWith<$R2, PersonModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_PersonModelCopyWithImpl($value, $cast, t);
|
||||
_PersonModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,14 +112,15 @@ class PhotoAlbumModelMapper extends SubClassMapperBase<PhotoAlbumModel> {
|
|||
|
||||
mixin PhotoAlbumModelMappable {
|
||||
PhotoAlbumModelCopyWith<PhotoAlbumModel, PhotoAlbumModel, PhotoAlbumModel>
|
||||
get copyWith => _PhotoAlbumModelCopyWithImpl(
|
||||
get copyWith =>
|
||||
_PhotoAlbumModelCopyWithImpl<PhotoAlbumModel, PhotoAlbumModel>(
|
||||
this as PhotoAlbumModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension PhotoAlbumModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, PhotoAlbumModel, $Out> {
|
||||
PhotoAlbumModelCopyWith<$R, PhotoAlbumModel, $Out> get $asPhotoAlbumModel =>
|
||||
$base.as((v, t, t2) => _PhotoAlbumModelCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _PhotoAlbumModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class PhotoAlbumModelCopyWith<$R, $In extends PhotoAlbumModel, $Out>
|
||||
|
|
@ -217,7 +218,7 @@ class _PhotoAlbumModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
PhotoAlbumModelCopyWith<$R2, PhotoAlbumModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_PhotoAlbumModelCopyWithImpl($value, $cast, t);
|
||||
_PhotoAlbumModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
||||
class PhotoModelMapper extends SubClassMapperBase<PhotoModel> {
|
||||
|
|
@ -340,13 +341,14 @@ class PhotoModelMapper extends SubClassMapperBase<PhotoModel> {
|
|||
|
||||
mixin PhotoModelMappable {
|
||||
PhotoModelCopyWith<PhotoModel, PhotoModel, PhotoModel> get copyWith =>
|
||||
_PhotoModelCopyWithImpl(this as PhotoModel, $identity, $identity);
|
||||
_PhotoModelCopyWithImpl<PhotoModel, PhotoModel>(
|
||||
this as PhotoModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension PhotoModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, PhotoModel, $Out> {
|
||||
PhotoModelCopyWith<$R, PhotoModel, $Out> get $asPhotoModel =>
|
||||
$base.as((v, t, t2) => _PhotoModelCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _PhotoModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class PhotoModelCopyWith<$R, $In extends PhotoModel, $Out>
|
||||
|
|
@ -448,5 +450,5 @@ class _PhotoModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
PhotoModelCopyWith<$R2, PhotoModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_PhotoModelCopyWithImpl($value, $cast, t);
|
||||
_PhotoModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,13 +141,14 @@ class SeasonModelMapper extends SubClassMapperBase<SeasonModel> {
|
|||
|
||||
mixin SeasonModelMappable {
|
||||
SeasonModelCopyWith<SeasonModel, SeasonModel, SeasonModel> get copyWith =>
|
||||
_SeasonModelCopyWithImpl(this as SeasonModel, $identity, $identity);
|
||||
_SeasonModelCopyWithImpl<SeasonModel, SeasonModel>(
|
||||
this as SeasonModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension SeasonModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, SeasonModel, $Out> {
|
||||
SeasonModelCopyWith<$R, SeasonModel, $Out> get $asSeasonModel =>
|
||||
$base.as((v, t, t2) => _SeasonModelCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _SeasonModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class SeasonModelCopyWith<$R, $In extends SeasonModel, $Out>
|
||||
|
|
@ -268,5 +269,5 @@ class _SeasonModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
SeasonModelCopyWith<$R2, SeasonModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_SeasonModelCopyWithImpl($value, $cast, t);
|
||||
_SeasonModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,13 +139,14 @@ class SeriesModelMapper extends SubClassMapperBase<SeriesModel> {
|
|||
|
||||
mixin SeriesModelMappable {
|
||||
SeriesModelCopyWith<SeriesModel, SeriesModel, SeriesModel> get copyWith =>
|
||||
_SeriesModelCopyWithImpl(this as SeriesModel, $identity, $identity);
|
||||
_SeriesModelCopyWithImpl<SeriesModel, SeriesModel>(
|
||||
this as SeriesModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension SeriesModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, SeriesModel, $Out> {
|
||||
SeriesModelCopyWith<$R, SeriesModel, $Out> get $asSeriesModel =>
|
||||
$base.as((v, t, t2) => _SeriesModelCopyWithImpl(v, t, t2));
|
||||
$base.as((v, t, t2) => _SeriesModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class SeriesModelCopyWith<$R, $In extends SeriesModel, $Out>
|
||||
|
|
@ -282,5 +283,5 @@ class _SeriesModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
SeriesModelCopyWith<$R2, SeriesModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_SeriesModelCopyWithImpl($value, $cast, t);
|
||||
_SeriesModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part 'trick_play_model.freezed.dart';
|
|||
part 'trick_play_model.g.dart';
|
||||
|
||||
@Freezed(copyWith: true)
|
||||
class TrickPlayModel with _$TrickPlayModel {
|
||||
abstract class TrickPlayModel with _$TrickPlayModel {
|
||||
factory TrickPlayModel({
|
||||
required int width,
|
||||
required int height,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,40 +9,41 @@ part of 'trick_play_model.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
TrickPlayModel _$TrickPlayModelFromJson(Map<String, dynamic> json) {
|
||||
return _TrickPlayModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$TrickPlayModel {
|
||||
int get width => throw _privateConstructorUsedError;
|
||||
int get height => throw _privateConstructorUsedError;
|
||||
int get tileWidth => throw _privateConstructorUsedError;
|
||||
int get tileHeight => throw _privateConstructorUsedError;
|
||||
int get thumbnailCount => throw _privateConstructorUsedError;
|
||||
Duration get interval => throw _privateConstructorUsedError;
|
||||
List<String> get images => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this TrickPlayModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
int get width;
|
||||
int get height;
|
||||
int get tileWidth;
|
||||
int get tileHeight;
|
||||
int get thumbnailCount;
|
||||
Duration get interval;
|
||||
List<String> get images;
|
||||
|
||||
/// Create a copy of TrickPlayModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$TrickPlayModelCopyWith<TrickPlayModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$TrickPlayModelCopyWithImpl<TrickPlayModel>(
|
||||
this as TrickPlayModel, _$identity);
|
||||
|
||||
/// Serializes this TrickPlayModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TrickPlayModel(width: $width, height: $height, tileWidth: $tileWidth, tileHeight: $tileHeight, thumbnailCount: $thumbnailCount, interval: $interval, images: $images)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $TrickPlayModelCopyWith<$Res> {
|
||||
abstract mixin class $TrickPlayModelCopyWith<$Res> {
|
||||
factory $TrickPlayModelCopyWith(
|
||||
TrickPlayModel value, $Res Function(TrickPlayModel) then) =
|
||||
_$TrickPlayModelCopyWithImpl<$Res, TrickPlayModel>;
|
||||
TrickPlayModel value, $Res Function(TrickPlayModel) _then) =
|
||||
_$TrickPlayModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int width,
|
||||
|
|
@ -55,14 +56,12 @@ abstract class $TrickPlayModelCopyWith<$Res> {
|
|||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$TrickPlayModelCopyWithImpl<$Res, $Val extends TrickPlayModel>
|
||||
class _$TrickPlayModelCopyWithImpl<$Res>
|
||||
implements $TrickPlayModelCopyWith<$Res> {
|
||||
_$TrickPlayModelCopyWithImpl(this._value, this._then);
|
||||
_$TrickPlayModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final TrickPlayModel _self;
|
||||
final $Res Function(TrickPlayModel) _then;
|
||||
|
||||
/// Create a copy of TrickPlayModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -77,115 +76,227 @@ class _$TrickPlayModelCopyWithImpl<$Res, $Val extends TrickPlayModel>
|
|||
Object? interval = null,
|
||||
Object? images = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
return _then(_self.copyWith(
|
||||
width: null == width
|
||||
? _value.width
|
||||
? _self.width
|
||||
: width // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
height: null == height
|
||||
? _value.height
|
||||
? _self.height
|
||||
: height // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
tileWidth: null == tileWidth
|
||||
? _value.tileWidth
|
||||
? _self.tileWidth
|
||||
: tileWidth // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
tileHeight: null == tileHeight
|
||||
? _value.tileHeight
|
||||
? _self.tileHeight
|
||||
: tileHeight // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
thumbnailCount: null == thumbnailCount
|
||||
? _value.thumbnailCount
|
||||
? _self.thumbnailCount
|
||||
: thumbnailCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
interval: null == interval
|
||||
? _value.interval
|
||||
? _self.interval
|
||||
: interval // ignore: cast_nullable_to_non_nullable
|
||||
as Duration,
|
||||
images: null == images
|
||||
? _value.images
|
||||
: images // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$TrickPlayModelImplCopyWith<$Res>
|
||||
implements $TrickPlayModelCopyWith<$Res> {
|
||||
factory _$$TrickPlayModelImplCopyWith(_$TrickPlayModelImpl value,
|
||||
$Res Function(_$TrickPlayModelImpl) then) =
|
||||
__$$TrickPlayModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int width,
|
||||
int height,
|
||||
int tileWidth,
|
||||
int tileHeight,
|
||||
int thumbnailCount,
|
||||
Duration interval,
|
||||
List<String> images});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$TrickPlayModelImplCopyWithImpl<$Res>
|
||||
extends _$TrickPlayModelCopyWithImpl<$Res, _$TrickPlayModelImpl>
|
||||
implements _$$TrickPlayModelImplCopyWith<$Res> {
|
||||
__$$TrickPlayModelImplCopyWithImpl(
|
||||
_$TrickPlayModelImpl _value, $Res Function(_$TrickPlayModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of TrickPlayModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? width = null,
|
||||
Object? height = null,
|
||||
Object? tileWidth = null,
|
||||
Object? tileHeight = null,
|
||||
Object? thumbnailCount = null,
|
||||
Object? interval = null,
|
||||
Object? images = null,
|
||||
}) {
|
||||
return _then(_$TrickPlayModelImpl(
|
||||
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
|
||||
? _self.images
|
||||
: images // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds pattern-matching-related methods to [TrickPlayModel].
|
||||
extension TrickPlayModelPatterns on TrickPlayModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_TrickPlayModel value)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TrickPlayModel() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_TrickPlayModel value) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TrickPlayModel():
|
||||
return $default(_that);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_TrickPlayModel value)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TrickPlayModel() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function(int width, int height, int tileWidth, int tileHeight,
|
||||
int thumbnailCount, Duration interval, List<String> images)?
|
||||
$default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TrickPlayModel() when $default != null:
|
||||
return $default(
|
||||
_that.width,
|
||||
_that.height,
|
||||
_that.tileWidth,
|
||||
_that.tileHeight,
|
||||
_that.thumbnailCount,
|
||||
_that.interval,
|
||||
_that.images);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function(int width, int height, int tileWidth, int tileHeight,
|
||||
int thumbnailCount, Duration interval, List<String> images)
|
||||
$default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TrickPlayModel():
|
||||
return $default(
|
||||
_that.width,
|
||||
_that.height,
|
||||
_that.tileWidth,
|
||||
_that.tileHeight,
|
||||
_that.thumbnailCount,
|
||||
_that.interval,
|
||||
_that.images);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function(int width, int height, int tileWidth, int tileHeight,
|
||||
int thumbnailCount, Duration interval, List<String> images)?
|
||||
$default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _TrickPlayModel() when $default != null:
|
||||
return $default(
|
||||
_that.width,
|
||||
_that.height,
|
||||
_that.tileWidth,
|
||||
_that.tileHeight,
|
||||
_that.thumbnailCount,
|
||||
_that.interval,
|
||||
_that.images);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$TrickPlayModelImpl extends _TrickPlayModel {
|
||||
_$TrickPlayModelImpl(
|
||||
class _TrickPlayModel extends TrickPlayModel {
|
||||
_TrickPlayModel(
|
||||
{required this.width,
|
||||
required this.height,
|
||||
required this.tileWidth,
|
||||
|
|
@ -195,9 +306,8 @@ class _$TrickPlayModelImpl extends _TrickPlayModel {
|
|||
final List<String> images = const []})
|
||||
: _images = images,
|
||||
super._();
|
||||
|
||||
factory _$TrickPlayModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$TrickPlayModelImplFromJson(json);
|
||||
factory _TrickPlayModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$TrickPlayModelFromJson(json);
|
||||
|
||||
@override
|
||||
final int width;
|
||||
|
|
@ -220,61 +330,97 @@ class _$TrickPlayModelImpl extends _TrickPlayModel {
|
|||
return EqualUnmodifiableListView(_images);
|
||||
}
|
||||
|
||||
/// Create a copy of TrickPlayModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$TrickPlayModelCopyWith<_TrickPlayModel> get copyWith =>
|
||||
__$TrickPlayModelCopyWithImpl<_TrickPlayModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$TrickPlayModelToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TrickPlayModel(width: $width, height: $height, tileWidth: $tileWidth, tileHeight: $tileHeight, thumbnailCount: $thumbnailCount, interval: $interval, images: $images)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$TrickPlayModelCopyWith<$Res>
|
||||
implements $TrickPlayModelCopyWith<$Res> {
|
||||
factory _$TrickPlayModelCopyWith(
|
||||
_TrickPlayModel value, $Res Function(_TrickPlayModel) _then) =
|
||||
__$TrickPlayModelCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int width,
|
||||
int height,
|
||||
int tileWidth,
|
||||
int tileHeight,
|
||||
int thumbnailCount,
|
||||
Duration interval,
|
||||
List<String> images});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$TrickPlayModelCopyWithImpl<$Res>
|
||||
implements _$TrickPlayModelCopyWith<$Res> {
|
||||
__$TrickPlayModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _TrickPlayModel _self;
|
||||
final $Res Function(_TrickPlayModel) _then;
|
||||
|
||||
/// Create a copy of TrickPlayModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$TrickPlayModelImplCopyWith<_$TrickPlayModelImpl> get copyWith =>
|
||||
__$$TrickPlayModelImplCopyWithImpl<_$TrickPlayModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$TrickPlayModelImplToJson(
|
||||
this,
|
||||
);
|
||||
$Res call({
|
||||
Object? width = null,
|
||||
Object? height = null,
|
||||
Object? tileWidth = null,
|
||||
Object? tileHeight = null,
|
||||
Object? thumbnailCount = null,
|
||||
Object? interval = null,
|
||||
Object? images = null,
|
||||
}) {
|
||||
return _then(_TrickPlayModel(
|
||||
width: null == width
|
||||
? _self.width
|
||||
: width // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
height: null == height
|
||||
? _self.height
|
||||
: height // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
tileWidth: null == tileWidth
|
||||
? _self.tileWidth
|
||||
: tileWidth // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
tileHeight: null == tileHeight
|
||||
? _self.tileHeight
|
||||
: tileHeight // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
thumbnailCount: null == thumbnailCount
|
||||
? _self.thumbnailCount
|
||||
: thumbnailCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
interval: null == interval
|
||||
? _self.interval
|
||||
: interval // ignore: cast_nullable_to_non_nullable
|
||||
as Duration,
|
||||
images: null == images
|
||||
? _self._images
|
||||
: images // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _TrickPlayModel extends TrickPlayModel {
|
||||
factory _TrickPlayModel(
|
||||
{required final int width,
|
||||
required final int height,
|
||||
required final int tileWidth,
|
||||
required final int tileHeight,
|
||||
required final int thumbnailCount,
|
||||
required final Duration interval,
|
||||
final List<String> images}) = _$TrickPlayModelImpl;
|
||||
_TrickPlayModel._() : super._();
|
||||
|
||||
factory _TrickPlayModel.fromJson(Map<String, dynamic> json) =
|
||||
_$TrickPlayModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get width;
|
||||
@override
|
||||
int get height;
|
||||
@override
|
||||
int get tileWidth;
|
||||
@override
|
||||
int get tileHeight;
|
||||
@override
|
||||
int get thumbnailCount;
|
||||
@override
|
||||
Duration get interval;
|
||||
@override
|
||||
List<String> get images;
|
||||
|
||||
/// Create a copy of TrickPlayModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$TrickPlayModelImplCopyWith<_$TrickPlayModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ part of 'trick_play_model.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$TrickPlayModelImpl _$$TrickPlayModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$TrickPlayModelImpl(
|
||||
_TrickPlayModel _$TrickPlayModelFromJson(Map<String, dynamic> json) =>
|
||||
_TrickPlayModel(
|
||||
width: (json['width'] as num).toInt(),
|
||||
height: (json['height'] as num).toInt(),
|
||||
tileWidth: (json['tileWidth'] as num).toInt(),
|
||||
|
|
@ -20,8 +20,7 @@ _$TrickPlayModelImpl _$$TrickPlayModelImplFromJson(Map<String, dynamic> json) =>
|
|||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$TrickPlayModelImplToJson(
|
||||
_$TrickPlayModelImpl instance) =>
|
||||
Map<String, dynamic> _$TrickPlayModelToJson(_TrickPlayModel instance) =>
|
||||
<String, dynamic>{
|
||||
'width': instance.width,
|
||||
'height': instance.height,
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ part 'library_filters_model.freezed.dart';
|
|||
part 'library_filters_model.g.dart';
|
||||
|
||||
@Freezed(copyWith: true)
|
||||
class LibraryFiltersModel with _$LibraryFiltersModel {
|
||||
abstract class LibraryFiltersModel with _$LibraryFiltersModel {
|
||||
const LibraryFiltersModel._();
|
||||
|
||||
factory LibraryFiltersModel._internal({
|
||||
factory LibraryFiltersModel({
|
||||
required String id,
|
||||
required String name,
|
||||
required bool isFavourite,
|
||||
|
|
@ -46,7 +46,7 @@ class LibraryFiltersModel with _$LibraryFiltersModel {
|
|||
bool? isFavourite,
|
||||
String? id,
|
||||
}) {
|
||||
return LibraryFiltersModel._internal(
|
||||
return LibraryFiltersModel(
|
||||
id: id ?? Xid().toString(),
|
||||
name: name,
|
||||
isFavourite: isFavourite ?? false,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,51 +9,52 @@ part of 'library_filters_model.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
LibraryFiltersModel _$LibraryFiltersModelFromJson(Map<String, dynamic> json) {
|
||||
return _LibraryFiltersModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$LibraryFiltersModel {
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
bool get isFavourite => throw _privateConstructorUsedError;
|
||||
List<String> get ids => throw _privateConstructorUsedError;
|
||||
Map<String, bool> get genres => throw _privateConstructorUsedError;
|
||||
Map<ItemFilter, bool> get filters => throw _privateConstructorUsedError;
|
||||
String get id;
|
||||
String get name;
|
||||
bool get isFavourite;
|
||||
List<String> get ids;
|
||||
Map<String, bool> get genres;
|
||||
Map<ItemFilter, bool> get filters;
|
||||
@StudioEncoder()
|
||||
Map<Studio, bool> get studios => throw _privateConstructorUsedError;
|
||||
Map<String, bool> get tags => throw _privateConstructorUsedError;
|
||||
Map<int, bool> get years => throw _privateConstructorUsedError;
|
||||
Map<String, bool> get officialRatings => throw _privateConstructorUsedError;
|
||||
Map<FladderItemType, bool> get types => throw _privateConstructorUsedError;
|
||||
SortingOptions get sortingOption => throw _privateConstructorUsedError;
|
||||
SortingOrder get sortOrder => throw _privateConstructorUsedError;
|
||||
bool get favourites => throw _privateConstructorUsedError;
|
||||
bool get hideEmptyShows => throw _privateConstructorUsedError;
|
||||
bool get recursive => throw _privateConstructorUsedError;
|
||||
GroupBy get groupBy => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this LibraryFiltersModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
Map<Studio, bool> get studios;
|
||||
Map<String, bool> get tags;
|
||||
Map<int, bool> get years;
|
||||
Map<String, bool> get officialRatings;
|
||||
Map<FladderItemType, bool> get types;
|
||||
SortingOptions get sortingOption;
|
||||
SortingOrder get sortOrder;
|
||||
bool get favourites;
|
||||
bool get hideEmptyShows;
|
||||
bool get recursive;
|
||||
GroupBy get groupBy;
|
||||
|
||||
/// Create a copy of LibraryFiltersModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$LibraryFiltersModelCopyWith<LibraryFiltersModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$LibraryFiltersModelCopyWithImpl<LibraryFiltersModel>(
|
||||
this as LibraryFiltersModel, _$identity);
|
||||
|
||||
/// Serializes this LibraryFiltersModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@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)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $LibraryFiltersModelCopyWith<$Res> {
|
||||
abstract mixin class $LibraryFiltersModelCopyWith<$Res> {
|
||||
factory $LibraryFiltersModelCopyWith(
|
||||
LibraryFiltersModel value, $Res Function(LibraryFiltersModel) then) =
|
||||
_$LibraryFiltersModelCopyWithImpl<$Res, LibraryFiltersModel>;
|
||||
LibraryFiltersModel value, $Res Function(LibraryFiltersModel) _then) =
|
||||
_$LibraryFiltersModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String id,
|
||||
|
|
@ -76,14 +77,12 @@ abstract class $LibraryFiltersModelCopyWith<$Res> {
|
|||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$LibraryFiltersModelCopyWithImpl<$Res, $Val extends LibraryFiltersModel>
|
||||
class _$LibraryFiltersModelCopyWithImpl<$Res>
|
||||
implements $LibraryFiltersModelCopyWith<$Res> {
|
||||
_$LibraryFiltersModelCopyWithImpl(this._value, this._then);
|
||||
_$LibraryFiltersModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final LibraryFiltersModel _self;
|
||||
final $Res Function(LibraryFiltersModel) _then;
|
||||
|
||||
/// Create a copy of LibraryFiltersModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -108,215 +107,345 @@ class _$LibraryFiltersModelCopyWithImpl<$Res, $Val extends LibraryFiltersModel>
|
|||
Object? recursive = null,
|
||||
Object? groupBy = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
return _then(_self.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
? _self.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
? _self.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
isFavourite: null == isFavourite
|
||||
? _value.isFavourite
|
||||
? _self.isFavourite
|
||||
: isFavourite // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
ids: null == ids
|
||||
? _value.ids
|
||||
? _self.ids
|
||||
: ids // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
genres: null == genres
|
||||
? _value.genres
|
||||
? _self.genres
|
||||
: genres // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, bool>,
|
||||
filters: null == filters
|
||||
? _value.filters
|
||||
? _self.filters
|
||||
: filters // ignore: cast_nullable_to_non_nullable
|
||||
as Map<ItemFilter, bool>,
|
||||
studios: null == studios
|
||||
? _value.studios
|
||||
? _self.studios
|
||||
: studios // ignore: cast_nullable_to_non_nullable
|
||||
as Map<Studio, bool>,
|
||||
tags: null == tags
|
||||
? _value.tags
|
||||
? _self.tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, bool>,
|
||||
years: null == years
|
||||
? _value.years
|
||||
? _self.years
|
||||
: years // ignore: cast_nullable_to_non_nullable
|
||||
as Map<int, bool>,
|
||||
officialRatings: null == officialRatings
|
||||
? _value.officialRatings
|
||||
? _self.officialRatings
|
||||
: officialRatings // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, bool>,
|
||||
types: null == types
|
||||
? _value.types
|
||||
? _self.types
|
||||
: types // ignore: cast_nullable_to_non_nullable
|
||||
as Map<FladderItemType, bool>,
|
||||
sortingOption: null == sortingOption
|
||||
? _value.sortingOption
|
||||
? _self.sortingOption
|
||||
: sortingOption // ignore: cast_nullable_to_non_nullable
|
||||
as SortingOptions,
|
||||
sortOrder: null == sortOrder
|
||||
? _value.sortOrder
|
||||
? _self.sortOrder
|
||||
: sortOrder // ignore: cast_nullable_to_non_nullable
|
||||
as SortingOrder,
|
||||
favourites: null == favourites
|
||||
? _value.favourites
|
||||
? _self.favourites
|
||||
: favourites // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hideEmptyShows: null == hideEmptyShows
|
||||
? _value.hideEmptyShows
|
||||
? _self.hideEmptyShows
|
||||
: hideEmptyShows // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
recursive: null == recursive
|
||||
? _value.recursive
|
||||
? _self.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
|
||||
abstract class _$$LibraryFiltersModelImplCopyWith<$Res>
|
||||
implements $LibraryFiltersModelCopyWith<$Res> {
|
||||
factory _$$LibraryFiltersModelImplCopyWith(_$LibraryFiltersModelImpl value,
|
||||
$Res Function(_$LibraryFiltersModelImpl) then) =
|
||||
__$$LibraryFiltersModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@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 __$$LibraryFiltersModelImplCopyWithImpl<$Res>
|
||||
extends _$LibraryFiltersModelCopyWithImpl<$Res, _$LibraryFiltersModelImpl>
|
||||
implements _$$LibraryFiltersModelImplCopyWith<$Res> {
|
||||
__$$LibraryFiltersModelImplCopyWithImpl(_$LibraryFiltersModelImpl _value,
|
||||
$Res Function(_$LibraryFiltersModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LibraryFiltersModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
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(_$LibraryFiltersModelImpl(
|
||||
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
|
||||
? _self.groupBy
|
||||
: groupBy // ignore: cast_nullable_to_non_nullable
|
||||
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
|
||||
@JsonSerializable()
|
||||
class _$LibraryFiltersModelImpl extends _LibraryFiltersModel {
|
||||
_$LibraryFiltersModelImpl(
|
||||
class _LibraryFiltersModel extends LibraryFiltersModel {
|
||||
_LibraryFiltersModel(
|
||||
{required this.id,
|
||||
required this.name,
|
||||
required this.isFavourite,
|
||||
|
|
@ -343,9 +472,8 @@ class _$LibraryFiltersModelImpl extends _LibraryFiltersModel {
|
|||
_officialRatings = officialRatings,
|
||||
_types = types,
|
||||
super._();
|
||||
|
||||
factory _$LibraryFiltersModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$LibraryFiltersModelImplFromJson(json);
|
||||
factory _LibraryFiltersModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$LibraryFiltersModelFromJson(json);
|
||||
|
||||
@override
|
||||
final String id;
|
||||
|
|
@ -431,92 +559,158 @@ class _$LibraryFiltersModelImpl extends _LibraryFiltersModel {
|
|||
@override
|
||||
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
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LibraryFiltersModelImplCopyWith<_$LibraryFiltersModelImpl> get copyWith =>
|
||||
__$$LibraryFiltersModelImplCopyWithImpl<_$LibraryFiltersModelImpl>(
|
||||
_$LibraryFiltersModelCopyWith<_LibraryFiltersModel> get copyWith =>
|
||||
__$LibraryFiltersModelCopyWithImpl<_LibraryFiltersModel>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$LibraryFiltersModelImplToJson(
|
||||
return _$LibraryFiltersModelToJson(
|
||||
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 {
|
||||
factory _LibraryFiltersModel(
|
||||
{required final String id,
|
||||
required final String name,
|
||||
required final bool isFavourite,
|
||||
required final List<String> ids,
|
||||
required final Map<String, bool> genres,
|
||||
required final Map<ItemFilter, bool> filters,
|
||||
@StudioEncoder() required final Map<Studio, bool> studios,
|
||||
required final Map<String, bool> tags,
|
||||
required final Map<int, bool> years,
|
||||
required final Map<String, bool> officialRatings,
|
||||
required final Map<FladderItemType, bool> types,
|
||||
required final SortingOptions sortingOption,
|
||||
required final SortingOrder sortOrder,
|
||||
required final bool favourites,
|
||||
required final bool hideEmptyShows,
|
||||
required final bool recursive,
|
||||
required final GroupBy groupBy}) = _$LibraryFiltersModelImpl;
|
||||
_LibraryFiltersModel._() : super._();
|
||||
/// @nodoc
|
||||
abstract mixin class _$LibraryFiltersModelCopyWith<$Res>
|
||||
implements $LibraryFiltersModelCopyWith<$Res> {
|
||||
factory _$LibraryFiltersModelCopyWith(_LibraryFiltersModel value,
|
||||
$Res Function(_LibraryFiltersModel) _then) =
|
||||
__$LibraryFiltersModelCopyWithImpl;
|
||||
@override
|
||||
@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});
|
||||
}
|
||||
|
||||
factory _LibraryFiltersModel.fromJson(Map<String, dynamic> json) =
|
||||
_$LibraryFiltersModelImpl.fromJson;
|
||||
/// @nodoc
|
||||
class __$LibraryFiltersModelCopyWithImpl<$Res>
|
||||
implements _$LibraryFiltersModelCopyWith<$Res> {
|
||||
__$LibraryFiltersModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
@override
|
||||
String get id;
|
||||
@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;
|
||||
final _LibraryFiltersModel _self;
|
||||
final $Res Function(_LibraryFiltersModel) _then;
|
||||
|
||||
/// Create a copy of LibraryFiltersModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$LibraryFiltersModelImplCopyWith<_$LibraryFiltersModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
@pragma('vm:prefer-inline')
|
||||
$Res call({
|
||||
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
|
||||
|
|
|
|||
|
|
@ -6,9 +6,8 @@ part of 'library_filters_model.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$LibraryFiltersModelImpl _$$LibraryFiltersModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$LibraryFiltersModelImpl(
|
||||
_LibraryFiltersModel _$LibraryFiltersModelFromJson(Map<String, dynamic> json) =>
|
||||
_LibraryFiltersModel(
|
||||
id: json['id'] as String,
|
||||
name: json['name'] as String,
|
||||
isFavourite: json['isFavourite'] as bool,
|
||||
|
|
@ -35,8 +34,8 @@ _$LibraryFiltersModelImpl _$$LibraryFiltersModelImplFromJson(
|
|||
groupBy: $enumDecode(_$GroupByEnumMap, json['groupBy']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$LibraryFiltersModelImplToJson(
|
||||
_$LibraryFiltersModelImpl instance) =>
|
||||
Map<String, dynamic> _$LibraryFiltersModelToJson(
|
||||
_LibraryFiltersModel instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
|
|
|
|||
|
|
@ -182,15 +182,15 @@ class LibrarySearchModelMapper extends ClassMapperBase<LibrarySearchModel> {
|
|||
mixin LibrarySearchModelMappable {
|
||||
LibrarySearchModelCopyWith<LibrarySearchModel, LibrarySearchModel,
|
||||
LibrarySearchModel>
|
||||
get copyWith => _LibrarySearchModelCopyWithImpl(
|
||||
this as LibrarySearchModel, $identity, $identity);
|
||||
get copyWith => _LibrarySearchModelCopyWithImpl<LibrarySearchModel,
|
||||
LibrarySearchModel>(this as LibrarySearchModel, $identity, $identity);
|
||||
}
|
||||
|
||||
extension LibrarySearchModelValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, LibrarySearchModel, $Out> {
|
||||
LibrarySearchModelCopyWith<$R, LibrarySearchModel, $Out>
|
||||
get $asLibrarySearchModel =>
|
||||
$base.as((v, t, t2) => _LibrarySearchModelCopyWithImpl(v, t, t2));
|
||||
get $asLibrarySearchModel => $base.as(
|
||||
(v, t, t2) => _LibrarySearchModelCopyWithImpl<$R, $Out>(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class LibrarySearchModelCopyWith<$R, $In extends LibrarySearchModel,
|
||||
|
|
@ -391,5 +391,5 @@ class _LibrarySearchModelCopyWithImpl<$R, $Out>
|
|||
@override
|
||||
LibrarySearchModelCopyWith<$R2, LibrarySearchModel, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_LibrarySearchModelCopyWithImpl($value, $cast, t);
|
||||
_LibrarySearchModelCopyWithImpl<$R2, $Out2>($value, $cast, t);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import 'package:freezed_annotation/freezed_annotation.dart';
|
|||
part 'arguments_model.freezed.dart';
|
||||
|
||||
@freezed
|
||||
class ArgumentsModel with _$ArgumentsModel {
|
||||
abstract class ArgumentsModel with _$ArgumentsModel {
|
||||
const ArgumentsModel._();
|
||||
|
||||
factory ArgumentsModel({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,20 +9,180 @@ part of 'arguments_model.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ArgumentsModel {
|
||||
bool get htpcMode => throw _privateConstructorUsedError;
|
||||
bool get htpcMode;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ArgumentsModel(htpcMode: $htpcMode)';
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds pattern-matching-related methods to [ArgumentsModel].
|
||||
extension ArgumentsModelPatterns on ArgumentsModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_ArgumentsModel value)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ArgumentsModel() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_ArgumentsModel value) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ArgumentsModel():
|
||||
return $default(_that);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_ArgumentsModel value)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ArgumentsModel() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function(bool htpcMode)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ArgumentsModel() when $default != null:
|
||||
return $default(_that.htpcMode);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function(bool htpcMode) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ArgumentsModel():
|
||||
return $default(_that.htpcMode);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function(bool htpcMode)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ArgumentsModel() when $default != null:
|
||||
return $default(_that.htpcMode);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ArgumentsModelImpl extends _ArgumentsModel {
|
||||
_$ArgumentsModelImpl({this.htpcMode = false}) : super._();
|
||||
class _ArgumentsModel extends ArgumentsModel {
|
||||
_ArgumentsModel({this.htpcMode = false}) : super._();
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
|
|
@ -34,10 +194,4 @@ class _$ArgumentsModelImpl extends _ArgumentsModel {
|
|||
}
|
||||
}
|
||||
|
||||
abstract class _ArgumentsModel extends ArgumentsModel {
|
||||
factory _ArgumentsModel({final bool htpcMode}) = _$ArgumentsModelImpl;
|
||||
_ArgumentsModel._() : super._();
|
||||
|
||||
@override
|
||||
bool get htpcMode;
|
||||
}
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ enum BackgroundType {
|
|||
}
|
||||
|
||||
@Freezed(copyWith: true)
|
||||
class ClientSettingsModel with _$ClientSettingsModel {
|
||||
abstract class ClientSettingsModel with _$ClientSettingsModel {
|
||||
const ClientSettingsModel._();
|
||||
|
||||
factory ClientSettingsModel({
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -6,9 +6,8 @@ part of 'client_settings_model.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ClientSettingsModelImpl(
|
||||
_ClientSettingsModel _$ClientSettingsModelFromJson(Map<String, dynamic> json) =>
|
||||
_ClientSettingsModel(
|
||||
syncPath: json['syncPath'] as String?,
|
||||
position: json['position'] == null
|
||||
? const Vector2(x: 0, y: 0)
|
||||
|
|
@ -55,8 +54,8 @@ _$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson(
|
|||
const {},
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ClientSettingsModelImplToJson(
|
||||
_$ClientSettingsModelImpl instance) =>
|
||||
Map<String, dynamic> _$ClientSettingsModelToJson(
|
||||
_ClientSettingsModel instance) =>
|
||||
<String, dynamic>{
|
||||
'syncPath': instance.syncPath,
|
||||
'position': instance.position,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ part 'home_settings_model.freezed.dart';
|
|||
part 'home_settings_model.g.dart';
|
||||
|
||||
@Freezed(copyWith: true)
|
||||
class HomeSettingsModel with _$HomeSettingsModel {
|
||||
abstract class HomeSettingsModel with _$HomeSettingsModel {
|
||||
factory HomeSettingsModel({
|
||||
@Default({...LayoutMode.values}) Set<LayoutMode> screenLayouts,
|
||||
@Default({...ViewSize.values}) Set<ViewSize> layoutStates,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,39 +9,39 @@ part of 'home_settings_model.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
HomeSettingsModel _$HomeSettingsModelFromJson(Map<String, dynamic> json) {
|
||||
return _HomeSettingsModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$HomeSettingsModel {
|
||||
Set<LayoutMode> get screenLayouts => throw _privateConstructorUsedError;
|
||||
Set<ViewSize> get layoutStates => throw _privateConstructorUsedError;
|
||||
HomeBanner get homeBanner => throw _privateConstructorUsedError;
|
||||
HomeCarouselSettings get carouselSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
HomeNextUp get nextUp => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this HomeSettingsModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
Set<LayoutMode> get screenLayouts;
|
||||
Set<ViewSize> get layoutStates;
|
||||
HomeBanner get homeBanner;
|
||||
HomeCarouselSettings get carouselSettings;
|
||||
HomeNextUp get nextUp;
|
||||
|
||||
/// Create a copy of HomeSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$HomeSettingsModelCopyWith<HomeSettingsModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$HomeSettingsModelCopyWithImpl<HomeSettingsModel>(
|
||||
this as HomeSettingsModel, _$identity);
|
||||
|
||||
/// Serializes this HomeSettingsModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'HomeSettingsModel(screenLayouts: $screenLayouts, layoutStates: $layoutStates, homeBanner: $homeBanner, carouselSettings: $carouselSettings, nextUp: $nextUp)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $HomeSettingsModelCopyWith<$Res> {
|
||||
abstract mixin class $HomeSettingsModelCopyWith<$Res> {
|
||||
factory $HomeSettingsModelCopyWith(
|
||||
HomeSettingsModel value, $Res Function(HomeSettingsModel) then) =
|
||||
_$HomeSettingsModelCopyWithImpl<$Res, HomeSettingsModel>;
|
||||
HomeSettingsModel value, $Res Function(HomeSettingsModel) _then) =
|
||||
_$HomeSettingsModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{Set<LayoutMode> screenLayouts,
|
||||
|
|
@ -52,14 +52,12 @@ abstract class $HomeSettingsModelCopyWith<$Res> {
|
|||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$HomeSettingsModelCopyWithImpl<$Res, $Val extends HomeSettingsModel>
|
||||
class _$HomeSettingsModelCopyWithImpl<$Res>
|
||||
implements $HomeSettingsModelCopyWith<$Res> {
|
||||
_$HomeSettingsModelCopyWithImpl(this._value, this._then);
|
||||
_$HomeSettingsModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final HomeSettingsModel _self;
|
||||
final $Res Function(HomeSettingsModel) _then;
|
||||
|
||||
/// Create a copy of HomeSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -72,95 +70,213 @@ class _$HomeSettingsModelCopyWithImpl<$Res, $Val extends HomeSettingsModel>
|
|||
Object? carouselSettings = null,
|
||||
Object? nextUp = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
return _then(_self.copyWith(
|
||||
screenLayouts: null == screenLayouts
|
||||
? _value.screenLayouts
|
||||
? _self.screenLayouts
|
||||
: screenLayouts // ignore: cast_nullable_to_non_nullable
|
||||
as Set<LayoutMode>,
|
||||
layoutStates: null == layoutStates
|
||||
? _value.layoutStates
|
||||
? _self.layoutStates
|
||||
: layoutStates // ignore: cast_nullable_to_non_nullable
|
||||
as Set<ViewSize>,
|
||||
homeBanner: null == homeBanner
|
||||
? _value.homeBanner
|
||||
? _self.homeBanner
|
||||
: homeBanner // ignore: cast_nullable_to_non_nullable
|
||||
as HomeBanner,
|
||||
carouselSettings: null == carouselSettings
|
||||
? _value.carouselSettings
|
||||
? _self.carouselSettings
|
||||
: carouselSettings // ignore: cast_nullable_to_non_nullable
|
||||
as HomeCarouselSettings,
|
||||
nextUp: null == nextUp
|
||||
? _value.nextUp
|
||||
: nextUp // ignore: cast_nullable_to_non_nullable
|
||||
as HomeNextUp,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$HomeSettingsModelImplCopyWith<$Res>
|
||||
implements $HomeSettingsModelCopyWith<$Res> {
|
||||
factory _$$HomeSettingsModelImplCopyWith(_$HomeSettingsModelImpl value,
|
||||
$Res Function(_$HomeSettingsModelImpl) then) =
|
||||
__$$HomeSettingsModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{Set<LayoutMode> screenLayouts,
|
||||
Set<ViewSize> layoutStates,
|
||||
HomeBanner homeBanner,
|
||||
HomeCarouselSettings carouselSettings,
|
||||
HomeNextUp nextUp});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$HomeSettingsModelImplCopyWithImpl<$Res>
|
||||
extends _$HomeSettingsModelCopyWithImpl<$Res, _$HomeSettingsModelImpl>
|
||||
implements _$$HomeSettingsModelImplCopyWith<$Res> {
|
||||
__$$HomeSettingsModelImplCopyWithImpl(_$HomeSettingsModelImpl _value,
|
||||
$Res Function(_$HomeSettingsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of HomeSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? screenLayouts = null,
|
||||
Object? layoutStates = null,
|
||||
Object? homeBanner = null,
|
||||
Object? carouselSettings = null,
|
||||
Object? nextUp = null,
|
||||
}) {
|
||||
return _then(_$HomeSettingsModelImpl(
|
||||
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
|
||||
? _self.nextUp
|
||||
: nextUp // ignore: cast_nullable_to_non_nullable
|
||||
as HomeNextUp,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds pattern-matching-related methods to [HomeSettingsModel].
|
||||
extension HomeSettingsModelPatterns on HomeSettingsModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_HomeSettingsModel value)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _HomeSettingsModel() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_HomeSettingsModel value) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _HomeSettingsModel():
|
||||
return $default(_that);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_HomeSettingsModel value)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _HomeSettingsModel() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function(
|
||||
Set<LayoutMode> screenLayouts,
|
||||
Set<ViewSize> layoutStates,
|
||||
HomeBanner homeBanner,
|
||||
HomeCarouselSettings carouselSettings,
|
||||
HomeNextUp nextUp)?
|
||||
$default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _HomeSettingsModel() when $default != null:
|
||||
return $default(_that.screenLayouts, _that.layoutStates,
|
||||
_that.homeBanner, _that.carouselSettings, _that.nextUp);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function(
|
||||
Set<LayoutMode> screenLayouts,
|
||||
Set<ViewSize> layoutStates,
|
||||
HomeBanner homeBanner,
|
||||
HomeCarouselSettings carouselSettings,
|
||||
HomeNextUp nextUp)
|
||||
$default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _HomeSettingsModel():
|
||||
return $default(_that.screenLayouts, _that.layoutStates,
|
||||
_that.homeBanner, _that.carouselSettings, _that.nextUp);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function(
|
||||
Set<LayoutMode> screenLayouts,
|
||||
Set<ViewSize> layoutStates,
|
||||
HomeBanner homeBanner,
|
||||
HomeCarouselSettings carouselSettings,
|
||||
HomeNextUp nextUp)?
|
||||
$default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _HomeSettingsModel() when $default != null:
|
||||
return $default(_that.screenLayouts, _that.layoutStates,
|
||||
_that.homeBanner, _that.carouselSettings, _that.nextUp);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$HomeSettingsModelImpl implements _HomeSettingsModel {
|
||||
_$HomeSettingsModelImpl(
|
||||
class _HomeSettingsModel implements HomeSettingsModel {
|
||||
_HomeSettingsModel(
|
||||
{final Set<LayoutMode> screenLayouts = const {...LayoutMode.values},
|
||||
final Set<ViewSize> layoutStates = const {...ViewSize.values},
|
||||
this.homeBanner = HomeBanner.carousel,
|
||||
|
|
@ -168,9 +284,8 @@ class _$HomeSettingsModelImpl implements _HomeSettingsModel {
|
|||
this.nextUp = HomeNextUp.separate})
|
||||
: _screenLayouts = screenLayouts,
|
||||
_layoutStates = layoutStates;
|
||||
|
||||
factory _$HomeSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$HomeSettingsModelImplFromJson(json);
|
||||
factory _HomeSettingsModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$HomeSettingsModelFromJson(json);
|
||||
|
||||
final Set<LayoutMode> _screenLayouts;
|
||||
@override
|
||||
|
|
@ -200,54 +315,85 @@ class _$HomeSettingsModelImpl implements _HomeSettingsModel {
|
|||
@JsonKey()
|
||||
final HomeNextUp nextUp;
|
||||
|
||||
/// Create a copy of HomeSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$HomeSettingsModelCopyWith<_HomeSettingsModel> get copyWith =>
|
||||
__$HomeSettingsModelCopyWithImpl<_HomeSettingsModel>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$HomeSettingsModelToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'HomeSettingsModel(screenLayouts: $screenLayouts, layoutStates: $layoutStates, homeBanner: $homeBanner, carouselSettings: $carouselSettings, nextUp: $nextUp)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$HomeSettingsModelCopyWith<$Res>
|
||||
implements $HomeSettingsModelCopyWith<$Res> {
|
||||
factory _$HomeSettingsModelCopyWith(
|
||||
_HomeSettingsModel value, $Res Function(_HomeSettingsModel) _then) =
|
||||
__$HomeSettingsModelCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{Set<LayoutMode> screenLayouts,
|
||||
Set<ViewSize> layoutStates,
|
||||
HomeBanner homeBanner,
|
||||
HomeCarouselSettings carouselSettings,
|
||||
HomeNextUp nextUp});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$HomeSettingsModelCopyWithImpl<$Res>
|
||||
implements _$HomeSettingsModelCopyWith<$Res> {
|
||||
__$HomeSettingsModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _HomeSettingsModel _self;
|
||||
final $Res Function(_HomeSettingsModel) _then;
|
||||
|
||||
/// Create a copy of HomeSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$HomeSettingsModelImplCopyWith<_$HomeSettingsModelImpl> get copyWith =>
|
||||
__$$HomeSettingsModelImplCopyWithImpl<_$HomeSettingsModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$HomeSettingsModelImplToJson(
|
||||
this,
|
||||
);
|
||||
$Res call({
|
||||
Object? screenLayouts = null,
|
||||
Object? layoutStates = null,
|
||||
Object? homeBanner = null,
|
||||
Object? carouselSettings = null,
|
||||
Object? nextUp = null,
|
||||
}) {
|
||||
return _then(_HomeSettingsModel(
|
||||
screenLayouts: null == screenLayouts
|
||||
? _self._screenLayouts
|
||||
: screenLayouts // ignore: cast_nullable_to_non_nullable
|
||||
as Set<LayoutMode>,
|
||||
layoutStates: null == layoutStates
|
||||
? _self._layoutStates
|
||||
: layoutStates // ignore: cast_nullable_to_non_nullable
|
||||
as Set<ViewSize>,
|
||||
homeBanner: null == homeBanner
|
||||
? _self.homeBanner
|
||||
: homeBanner // ignore: cast_nullable_to_non_nullable
|
||||
as HomeBanner,
|
||||
carouselSettings: null == carouselSettings
|
||||
? _self.carouselSettings
|
||||
: carouselSettings // ignore: cast_nullable_to_non_nullable
|
||||
as HomeCarouselSettings,
|
||||
nextUp: null == nextUp
|
||||
? _self.nextUp
|
||||
: nextUp // ignore: cast_nullable_to_non_nullable
|
||||
as HomeNextUp,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _HomeSettingsModel implements HomeSettingsModel {
|
||||
factory _HomeSettingsModel(
|
||||
{final Set<LayoutMode> screenLayouts,
|
||||
final Set<ViewSize> layoutStates,
|
||||
final HomeBanner homeBanner,
|
||||
final HomeCarouselSettings carouselSettings,
|
||||
final HomeNextUp nextUp}) = _$HomeSettingsModelImpl;
|
||||
|
||||
factory _HomeSettingsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$HomeSettingsModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
Set<LayoutMode> get screenLayouts;
|
||||
@override
|
||||
Set<ViewSize> get layoutStates;
|
||||
@override
|
||||
HomeBanner get homeBanner;
|
||||
@override
|
||||
HomeCarouselSettings get carouselSettings;
|
||||
@override
|
||||
HomeNextUp get nextUp;
|
||||
|
||||
/// Create a copy of HomeSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$HomeSettingsModelImplCopyWith<_$HomeSettingsModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,9 +6,8 @@ part of 'home_settings_model.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$HomeSettingsModelImpl _$$HomeSettingsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$HomeSettingsModelImpl(
|
||||
_HomeSettingsModel _$HomeSettingsModelFromJson(Map<String, dynamic> json) =>
|
||||
_HomeSettingsModel(
|
||||
screenLayouts: (json['screenLayouts'] as List<dynamic>?)
|
||||
?.map((e) => $enumDecode(_$LayoutModeEnumMap, e))
|
||||
.toSet() ??
|
||||
|
|
@ -27,8 +26,7 @@ _$HomeSettingsModelImpl _$$HomeSettingsModelImplFromJson(
|
|||
HomeNextUp.separate,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$HomeSettingsModelImplToJson(
|
||||
_$HomeSettingsModelImpl instance) =>
|
||||
Map<String, dynamic> _$HomeSettingsModelToJson(_HomeSettingsModel instance) =>
|
||||
<String, dynamic>{
|
||||
'screenLayouts':
|
||||
instance.screenLayouts.map((e) => _$LayoutModeEnumMap[e]!).toList(),
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ part 'key_combinations.freezed.dart';
|
|||
part 'key_combinations.g.dart';
|
||||
|
||||
@Freezed(toJson: true, fromJson: true, copyWith: true)
|
||||
class KeyCombination with _$KeyCombination {
|
||||
abstract class KeyCombination with _$KeyCombination {
|
||||
const KeyCombination._();
|
||||
|
||||
factory KeyCombination({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,41 +9,42 @@ part of 'key_combinations.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
KeyCombination _$KeyCombinationFromJson(Map<String, dynamic> json) {
|
||||
return _KeyCombination.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$KeyCombination {
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get key => throw _privateConstructorUsedError;
|
||||
LogicalKeyboardKey? get key;
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get modifier => throw _privateConstructorUsedError;
|
||||
LogicalKeyboardKey? get modifier;
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get altKey => throw _privateConstructorUsedError;
|
||||
LogicalKeyboardKey? get altKey;
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get altModifier => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this KeyCombination to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
LogicalKeyboardKey? get altModifier;
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$KeyCombinationCopyWith<KeyCombination> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$KeyCombinationCopyWithImpl<KeyCombination>(
|
||||
this as KeyCombination, _$identity);
|
||||
|
||||
/// Serializes this KeyCombination to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KeyCombination(key: $key, modifier: $modifier, altKey: $altKey, altModifier: $altModifier)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $KeyCombinationCopyWith<$Res> {
|
||||
abstract mixin class $KeyCombinationCopyWith<$Res> {
|
||||
factory $KeyCombinationCopyWith(
|
||||
KeyCombination value, $Res Function(KeyCombination) then) =
|
||||
_$KeyCombinationCopyWithImpl<$Res, KeyCombination>;
|
||||
KeyCombination value, $Res Function(KeyCombination) _then) =
|
||||
_$KeyCombinationCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
|
||||
|
|
@ -53,14 +54,12 @@ abstract class $KeyCombinationCopyWith<$Res> {
|
|||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$KeyCombinationCopyWithImpl<$Res, $Val extends KeyCombination>
|
||||
class _$KeyCombinationCopyWithImpl<$Res>
|
||||
implements $KeyCombinationCopyWith<$Res> {
|
||||
_$KeyCombinationCopyWithImpl(this._value, this._then);
|
||||
_$KeyCombinationCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final KeyCombination _self;
|
||||
final $Res Function(KeyCombination) _then;
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -72,93 +71,213 @@ class _$KeyCombinationCopyWithImpl<$Res, $Val extends KeyCombination>
|
|||
Object? altKey = freezed,
|
||||
Object? altModifier = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
return _then(_self.copyWith(
|
||||
key: freezed == key
|
||||
? _value.key
|
||||
? _self.key
|
||||
: key // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
modifier: freezed == modifier
|
||||
? _value.modifier
|
||||
? _self.modifier
|
||||
: modifier // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
altKey: freezed == altKey
|
||||
? _value.altKey
|
||||
? _self.altKey
|
||||
: altKey // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
altModifier: freezed == altModifier
|
||||
? _value.altModifier
|
||||
: altModifier // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$KeyCombinationImplCopyWith<$Res>
|
||||
implements $KeyCombinationCopyWith<$Res> {
|
||||
factory _$$KeyCombinationImplCopyWith(_$KeyCombinationImpl value,
|
||||
$Res Function(_$KeyCombinationImpl) then) =
|
||||
__$$KeyCombinationImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$KeyCombinationImplCopyWithImpl<$Res>
|
||||
extends _$KeyCombinationCopyWithImpl<$Res, _$KeyCombinationImpl>
|
||||
implements _$$KeyCombinationImplCopyWith<$Res> {
|
||||
__$$KeyCombinationImplCopyWithImpl(
|
||||
_$KeyCombinationImpl _value, $Res Function(_$KeyCombinationImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? key = freezed,
|
||||
Object? modifier = freezed,
|
||||
Object? altKey = freezed,
|
||||
Object? altModifier = freezed,
|
||||
}) {
|
||||
return _then(_$KeyCombinationImpl(
|
||||
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
|
||||
? _self.altModifier
|
||||
: altModifier // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds pattern-matching-related methods to [KeyCombination].
|
||||
extension KeyCombinationPatterns on KeyCombination {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_KeyCombination value)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KeyCombination() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_KeyCombination value) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KeyCombination():
|
||||
return $default(_that);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_KeyCombination value)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KeyCombination() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function(
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier)?
|
||||
$default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KeyCombination() when $default != null:
|
||||
return $default(
|
||||
_that.key, _that.modifier, _that.altKey, _that.altModifier);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function(
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier)
|
||||
$default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KeyCombination():
|
||||
return $default(
|
||||
_that.key, _that.modifier, _that.altKey, _that.altModifier);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function(
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier)?
|
||||
$default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KeyCombination() when $default != null:
|
||||
return $default(
|
||||
_that.key, _that.modifier, _that.altKey, _that.altModifier);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$KeyCombinationImpl extends _KeyCombination {
|
||||
_$KeyCombinationImpl(
|
||||
class _KeyCombination extends KeyCombination {
|
||||
_KeyCombination(
|
||||
{@LogicalKeyboardSerializer() this.key,
|
||||
@LogicalKeyboardSerializer() this.modifier,
|
||||
@LogicalKeyboardSerializer() this.altKey,
|
||||
@LogicalKeyboardSerializer() this.altModifier})
|
||||
: super._();
|
||||
|
||||
factory _$KeyCombinationImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$KeyCombinationImplFromJson(json);
|
||||
factory _KeyCombination.fromJson(Map<String, dynamic> json) =>
|
||||
_$KeyCombinationFromJson(json);
|
||||
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
|
|
@ -173,57 +292,79 @@ class _$KeyCombinationImpl extends _KeyCombination {
|
|||
@LogicalKeyboardSerializer()
|
||||
final LogicalKeyboardKey? altModifier;
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$KeyCombinationCopyWith<_KeyCombination> get copyWith =>
|
||||
__$KeyCombinationCopyWithImpl<_KeyCombination>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$KeyCombinationToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KeyCombination(key: $key, modifier: $modifier, altKey: $altKey, altModifier: $altModifier)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$KeyCombinationCopyWith<$Res>
|
||||
implements $KeyCombinationCopyWith<$Res> {
|
||||
factory _$KeyCombinationCopyWith(
|
||||
_KeyCombination value, $Res Function(_KeyCombination) _then) =
|
||||
__$KeyCombinationCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@LogicalKeyboardSerializer() LogicalKeyboardKey? key,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? modifier,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altKey,
|
||||
@LogicalKeyboardSerializer() LogicalKeyboardKey? altModifier});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$KeyCombinationCopyWithImpl<$Res>
|
||||
implements _$KeyCombinationCopyWith<$Res> {
|
||||
__$KeyCombinationCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _KeyCombination _self;
|
||||
final $Res Function(_KeyCombination) _then;
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$KeyCombinationImplCopyWith<_$KeyCombinationImpl> get copyWith =>
|
||||
__$$KeyCombinationImplCopyWithImpl<_$KeyCombinationImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$KeyCombinationImplToJson(
|
||||
this,
|
||||
);
|
||||
$Res call({
|
||||
Object? key = freezed,
|
||||
Object? modifier = freezed,
|
||||
Object? altKey = freezed,
|
||||
Object? altModifier = freezed,
|
||||
}) {
|
||||
return _then(_KeyCombination(
|
||||
key: freezed == key
|
||||
? _self.key
|
||||
: key // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
modifier: freezed == modifier
|
||||
? _self.modifier
|
||||
: modifier // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
altKey: freezed == altKey
|
||||
? _self.altKey
|
||||
: altKey // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
altModifier: freezed == altModifier
|
||||
? _self.altModifier
|
||||
: altModifier // ignore: cast_nullable_to_non_nullable
|
||||
as LogicalKeyboardKey?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _KeyCombination extends KeyCombination {
|
||||
factory _KeyCombination(
|
||||
{@LogicalKeyboardSerializer() final LogicalKeyboardKey? key,
|
||||
@LogicalKeyboardSerializer() final LogicalKeyboardKey? modifier,
|
||||
@LogicalKeyboardSerializer() final LogicalKeyboardKey? altKey,
|
||||
@LogicalKeyboardSerializer() final LogicalKeyboardKey? altModifier}) =
|
||||
_$KeyCombinationImpl;
|
||||
_KeyCombination._() : super._();
|
||||
|
||||
factory _KeyCombination.fromJson(Map<String, dynamic> json) =
|
||||
_$KeyCombinationImpl.fromJson;
|
||||
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get key;
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get modifier;
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get altKey;
|
||||
@override
|
||||
@LogicalKeyboardSerializer()
|
||||
LogicalKeyboardKey? get altModifier;
|
||||
|
||||
/// Create a copy of KeyCombination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$KeyCombinationImplCopyWith<_$KeyCombinationImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ part of 'key_combinations.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$KeyCombinationImpl _$$KeyCombinationImplFromJson(Map<String, dynamic> json) =>
|
||||
_$KeyCombinationImpl(
|
||||
_KeyCombination _$KeyCombinationFromJson(Map<String, dynamic> json) =>
|
||||
_KeyCombination(
|
||||
key: _$JsonConverterFromJson<String, LogicalKeyboardKey>(
|
||||
json['key'], const LogicalKeyboardSerializer().fromJson),
|
||||
modifier: _$JsonConverterFromJson<String, LogicalKeyboardKey>(
|
||||
|
|
@ -18,8 +18,7 @@ _$KeyCombinationImpl _$$KeyCombinationImplFromJson(Map<String, dynamic> json) =>
|
|||
json['altModifier'], const LogicalKeyboardSerializer().fromJson),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$KeyCombinationImplToJson(
|
||||
_$KeyCombinationImpl instance) =>
|
||||
Map<String, dynamic> _$KeyCombinationToJson(_KeyCombination instance) =>
|
||||
<String, dynamic>{
|
||||
'key': _$JsonConverterToJson<String, LogicalKeyboardKey>(
|
||||
instance.key, const LogicalKeyboardSerializer().toJson),
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ enum VideoHotKeys {
|
|||
}
|
||||
|
||||
@Freezed(copyWith: true)
|
||||
class VideoPlayerSettingsModel with _$VideoPlayerSettingsModel {
|
||||
abstract class VideoPlayerSettingsModel with _$VideoPlayerSettingsModel {
|
||||
const VideoPlayerSettingsModel._();
|
||||
|
||||
factory VideoPlayerSettingsModel({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,52 +9,70 @@ part of 'video_player_settings.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
VideoPlayerSettingsModel _$VideoPlayerSettingsModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _VideoPlayerSettingsModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$VideoPlayerSettingsModel {
|
||||
double? get screenBrightness => throw _privateConstructorUsedError;
|
||||
BoxFit get videoFit => throw _privateConstructorUsedError;
|
||||
bool get fillScreen => throw _privateConstructorUsedError;
|
||||
bool get hardwareAccel => throw _privateConstructorUsedError;
|
||||
bool get useLibass => throw _privateConstructorUsedError;
|
||||
int get bufferSize => throw _privateConstructorUsedError;
|
||||
PlayerOptions? get playerOptions => throw _privateConstructorUsedError;
|
||||
double get internalVolume => throw _privateConstructorUsedError;
|
||||
Set<DeviceOrientation>? get allowedOrientations =>
|
||||
throw _privateConstructorUsedError;
|
||||
AutoNextType get nextVideoType => throw _privateConstructorUsedError;
|
||||
Bitrate get maxHomeBitrate => throw _privateConstructorUsedError;
|
||||
Bitrate get maxInternetBitrate => throw _privateConstructorUsedError;
|
||||
String? get audioDevice => throw _privateConstructorUsedError;
|
||||
Map<MediaSegmentType, SegmentSkip> get segmentSkipSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
Map<VideoHotKeys, KeyCombination> get hotKeys =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this VideoPlayerSettingsModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
mixin _$VideoPlayerSettingsModel implements DiagnosticableTreeMixin {
|
||||
double? get screenBrightness;
|
||||
BoxFit get videoFit;
|
||||
bool get fillScreen;
|
||||
bool get hardwareAccel;
|
||||
bool get useLibass;
|
||||
int get bufferSize;
|
||||
PlayerOptions? get playerOptions;
|
||||
double get internalVolume;
|
||||
Set<DeviceOrientation>? get allowedOrientations;
|
||||
AutoNextType get nextVideoType;
|
||||
Bitrate get maxHomeBitrate;
|
||||
Bitrate get maxInternetBitrate;
|
||||
String? get audioDevice;
|
||||
Map<MediaSegmentType, SegmentSkip> get segmentSkipSettings;
|
||||
Map<VideoHotKeys, KeyCombination> get hotKeys;
|
||||
|
||||
/// Create a copy of VideoPlayerSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$VideoPlayerSettingsModelCopyWith<VideoPlayerSettingsModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$VideoPlayerSettingsModelCopyWithImpl<VideoPlayerSettingsModel>(
|
||||
this as VideoPlayerSettingsModel, _$identity);
|
||||
|
||||
/// Serializes this VideoPlayerSettingsModel to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'VideoPlayerSettingsModel'))
|
||||
..add(DiagnosticsProperty('screenBrightness', screenBrightness))
|
||||
..add(DiagnosticsProperty('videoFit', videoFit))
|
||||
..add(DiagnosticsProperty('fillScreen', fillScreen))
|
||||
..add(DiagnosticsProperty('hardwareAccel', hardwareAccel))
|
||||
..add(DiagnosticsProperty('useLibass', useLibass))
|
||||
..add(DiagnosticsProperty('bufferSize', bufferSize))
|
||||
..add(DiagnosticsProperty('playerOptions', playerOptions))
|
||||
..add(DiagnosticsProperty('internalVolume', internalVolume))
|
||||
..add(DiagnosticsProperty('allowedOrientations', allowedOrientations))
|
||||
..add(DiagnosticsProperty('nextVideoType', nextVideoType))
|
||||
..add(DiagnosticsProperty('maxHomeBitrate', maxHomeBitrate))
|
||||
..add(DiagnosticsProperty('maxInternetBitrate', maxInternetBitrate))
|
||||
..add(DiagnosticsProperty('audioDevice', audioDevice))
|
||||
..add(DiagnosticsProperty('segmentSkipSettings', segmentSkipSettings))
|
||||
..add(DiagnosticsProperty('hotKeys', hotKeys));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
||||
return 'VideoPlayerSettingsModel(screenBrightness: $screenBrightness, videoFit: $videoFit, fillScreen: $fillScreen, hardwareAccel: $hardwareAccel, useLibass: $useLibass, bufferSize: $bufferSize, playerOptions: $playerOptions, internalVolume: $internalVolume, allowedOrientations: $allowedOrientations, nextVideoType: $nextVideoType, maxHomeBitrate: $maxHomeBitrate, maxInternetBitrate: $maxInternetBitrate, audioDevice: $audioDevice, segmentSkipSettings: $segmentSkipSettings, hotKeys: $hotKeys)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $VideoPlayerSettingsModelCopyWith<$Res> {
|
||||
abstract mixin class $VideoPlayerSettingsModelCopyWith<$Res> {
|
||||
factory $VideoPlayerSettingsModelCopyWith(VideoPlayerSettingsModel value,
|
||||
$Res Function(VideoPlayerSettingsModel) then) =
|
||||
_$VideoPlayerSettingsModelCopyWithImpl<$Res, VideoPlayerSettingsModel>;
|
||||
$Res Function(VideoPlayerSettingsModel) _then) =
|
||||
_$VideoPlayerSettingsModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{double? screenBrightness,
|
||||
|
|
@ -75,15 +93,12 @@ abstract class $VideoPlayerSettingsModelCopyWith<$Res> {
|
|||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$VideoPlayerSettingsModelCopyWithImpl<$Res,
|
||||
$Val extends VideoPlayerSettingsModel>
|
||||
class _$VideoPlayerSettingsModelCopyWithImpl<$Res>
|
||||
implements $VideoPlayerSettingsModelCopyWith<$Res> {
|
||||
_$VideoPlayerSettingsModelCopyWithImpl(this._value, this._then);
|
||||
_$VideoPlayerSettingsModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final VideoPlayerSettingsModel _self;
|
||||
final $Res Function(VideoPlayerSettingsModel) _then;
|
||||
|
||||
/// Create a copy of VideoPlayerSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -106,199 +121,326 @@ class _$VideoPlayerSettingsModelCopyWithImpl<$Res,
|
|||
Object? segmentSkipSettings = null,
|
||||
Object? hotKeys = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
return _then(_self.copyWith(
|
||||
screenBrightness: freezed == screenBrightness
|
||||
? _value.screenBrightness
|
||||
? _self.screenBrightness
|
||||
: screenBrightness // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
videoFit: null == videoFit
|
||||
? _value.videoFit
|
||||
? _self.videoFit
|
||||
: videoFit // ignore: cast_nullable_to_non_nullable
|
||||
as BoxFit,
|
||||
fillScreen: null == fillScreen
|
||||
? _value.fillScreen
|
||||
? _self.fillScreen
|
||||
: fillScreen // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hardwareAccel: null == hardwareAccel
|
||||
? _value.hardwareAccel
|
||||
? _self.hardwareAccel
|
||||
: hardwareAccel // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
useLibass: null == useLibass
|
||||
? _value.useLibass
|
||||
? _self.useLibass
|
||||
: useLibass // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
bufferSize: null == bufferSize
|
||||
? _value.bufferSize
|
||||
? _self.bufferSize
|
||||
: bufferSize // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
playerOptions: freezed == playerOptions
|
||||
? _value.playerOptions
|
||||
? _self.playerOptions
|
||||
: playerOptions // ignore: cast_nullable_to_non_nullable
|
||||
as PlayerOptions?,
|
||||
internalVolume: null == internalVolume
|
||||
? _value.internalVolume
|
||||
? _self.internalVolume
|
||||
: internalVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
allowedOrientations: freezed == allowedOrientations
|
||||
? _value.allowedOrientations
|
||||
? _self.allowedOrientations
|
||||
: allowedOrientations // ignore: cast_nullable_to_non_nullable
|
||||
as Set<DeviceOrientation>?,
|
||||
nextVideoType: null == nextVideoType
|
||||
? _value.nextVideoType
|
||||
? _self.nextVideoType
|
||||
: nextVideoType // ignore: cast_nullable_to_non_nullable
|
||||
as AutoNextType,
|
||||
maxHomeBitrate: null == maxHomeBitrate
|
||||
? _value.maxHomeBitrate
|
||||
? _self.maxHomeBitrate
|
||||
: maxHomeBitrate // ignore: cast_nullable_to_non_nullable
|
||||
as Bitrate,
|
||||
maxInternetBitrate: null == maxInternetBitrate
|
||||
? _value.maxInternetBitrate
|
||||
? _self.maxInternetBitrate
|
||||
: maxInternetBitrate // ignore: cast_nullable_to_non_nullable
|
||||
as Bitrate,
|
||||
audioDevice: freezed == audioDevice
|
||||
? _value.audioDevice
|
||||
? _self.audioDevice
|
||||
: audioDevice // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
segmentSkipSettings: null == segmentSkipSettings
|
||||
? _value.segmentSkipSettings
|
||||
? _self.segmentSkipSettings
|
||||
: segmentSkipSettings // ignore: cast_nullable_to_non_nullable
|
||||
as Map<MediaSegmentType, SegmentSkip>,
|
||||
hotKeys: null == hotKeys
|
||||
? _value.hotKeys
|
||||
: hotKeys // ignore: cast_nullable_to_non_nullable
|
||||
as Map<VideoHotKeys, KeyCombination>,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$VideoPlayerSettingsModelImplCopyWith<$Res>
|
||||
implements $VideoPlayerSettingsModelCopyWith<$Res> {
|
||||
factory _$$VideoPlayerSettingsModelImplCopyWith(
|
||||
_$VideoPlayerSettingsModelImpl value,
|
||||
$Res Function(_$VideoPlayerSettingsModelImpl) then) =
|
||||
__$$VideoPlayerSettingsModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{double? screenBrightness,
|
||||
BoxFit videoFit,
|
||||
bool fillScreen,
|
||||
bool hardwareAccel,
|
||||
bool useLibass,
|
||||
int bufferSize,
|
||||
PlayerOptions? playerOptions,
|
||||
double internalVolume,
|
||||
Set<DeviceOrientation>? allowedOrientations,
|
||||
AutoNextType nextVideoType,
|
||||
Bitrate maxHomeBitrate,
|
||||
Bitrate maxInternetBitrate,
|
||||
String? audioDevice,
|
||||
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
|
||||
Map<VideoHotKeys, KeyCombination> hotKeys});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$VideoPlayerSettingsModelImplCopyWithImpl<$Res>
|
||||
extends _$VideoPlayerSettingsModelCopyWithImpl<$Res,
|
||||
_$VideoPlayerSettingsModelImpl>
|
||||
implements _$$VideoPlayerSettingsModelImplCopyWith<$Res> {
|
||||
__$$VideoPlayerSettingsModelImplCopyWithImpl(
|
||||
_$VideoPlayerSettingsModelImpl _value,
|
||||
$Res Function(_$VideoPlayerSettingsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of VideoPlayerSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? screenBrightness = freezed,
|
||||
Object? videoFit = null,
|
||||
Object? fillScreen = null,
|
||||
Object? hardwareAccel = null,
|
||||
Object? useLibass = null,
|
||||
Object? bufferSize = null,
|
||||
Object? playerOptions = freezed,
|
||||
Object? internalVolume = null,
|
||||
Object? allowedOrientations = freezed,
|
||||
Object? nextVideoType = null,
|
||||
Object? maxHomeBitrate = null,
|
||||
Object? maxInternetBitrate = null,
|
||||
Object? audioDevice = freezed,
|
||||
Object? segmentSkipSettings = null,
|
||||
Object? hotKeys = null,
|
||||
}) {
|
||||
return _then(_$VideoPlayerSettingsModelImpl(
|
||||
screenBrightness: freezed == screenBrightness
|
||||
? _value.screenBrightness
|
||||
: screenBrightness // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
videoFit: null == videoFit
|
||||
? _value.videoFit
|
||||
: videoFit // ignore: cast_nullable_to_non_nullable
|
||||
as BoxFit,
|
||||
fillScreen: null == fillScreen
|
||||
? _value.fillScreen
|
||||
: fillScreen // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hardwareAccel: null == hardwareAccel
|
||||
? _value.hardwareAccel
|
||||
: hardwareAccel // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
useLibass: null == useLibass
|
||||
? _value.useLibass
|
||||
: useLibass // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
bufferSize: null == bufferSize
|
||||
? _value.bufferSize
|
||||
: bufferSize // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
playerOptions: freezed == playerOptions
|
||||
? _value.playerOptions
|
||||
: playerOptions // ignore: cast_nullable_to_non_nullable
|
||||
as PlayerOptions?,
|
||||
internalVolume: null == internalVolume
|
||||
? _value.internalVolume
|
||||
: internalVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
allowedOrientations: freezed == allowedOrientations
|
||||
? _value._allowedOrientations
|
||||
: allowedOrientations // ignore: cast_nullable_to_non_nullable
|
||||
as Set<DeviceOrientation>?,
|
||||
nextVideoType: null == nextVideoType
|
||||
? _value.nextVideoType
|
||||
: nextVideoType // ignore: cast_nullable_to_non_nullable
|
||||
as AutoNextType,
|
||||
maxHomeBitrate: null == maxHomeBitrate
|
||||
? _value.maxHomeBitrate
|
||||
: maxHomeBitrate // ignore: cast_nullable_to_non_nullable
|
||||
as Bitrate,
|
||||
maxInternetBitrate: null == maxInternetBitrate
|
||||
? _value.maxInternetBitrate
|
||||
: maxInternetBitrate // ignore: cast_nullable_to_non_nullable
|
||||
as Bitrate,
|
||||
audioDevice: freezed == audioDevice
|
||||
? _value.audioDevice
|
||||
: audioDevice // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
segmentSkipSettings: null == segmentSkipSettings
|
||||
? _value._segmentSkipSettings
|
||||
: segmentSkipSettings // ignore: cast_nullable_to_non_nullable
|
||||
as Map<MediaSegmentType, SegmentSkip>,
|
||||
hotKeys: null == hotKeys
|
||||
? _value._hotKeys
|
||||
? _self.hotKeys
|
||||
: hotKeys // ignore: cast_nullable_to_non_nullable
|
||||
as Map<VideoHotKeys, KeyCombination>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds pattern-matching-related methods to [VideoPlayerSettingsModel].
|
||||
extension VideoPlayerSettingsModelPatterns on VideoPlayerSettingsModel {
|
||||
/// A variant of `map` that fallback to returning `orElse`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_VideoPlayerSettingsModel value)? $default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _VideoPlayerSettingsModel() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// Callbacks receives the raw object, upcasted.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case final Subclass2 value:
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_VideoPlayerSettingsModel value) $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _VideoPlayerSettingsModel():
|
||||
return $default(_that);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `map` that fallback to returning `null`.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case final Subclass value:
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_VideoPlayerSettingsModel value)? $default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _VideoPlayerSettingsModel() when $default != null:
|
||||
return $default(_that);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to an `orElse` callback.
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return orElse();
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function(
|
||||
double? screenBrightness,
|
||||
BoxFit videoFit,
|
||||
bool fillScreen,
|
||||
bool hardwareAccel,
|
||||
bool useLibass,
|
||||
int bufferSize,
|
||||
PlayerOptions? playerOptions,
|
||||
double internalVolume,
|
||||
Set<DeviceOrientation>? allowedOrientations,
|
||||
AutoNextType nextVideoType,
|
||||
Bitrate maxHomeBitrate,
|
||||
Bitrate maxInternetBitrate,
|
||||
String? audioDevice,
|
||||
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
|
||||
Map<VideoHotKeys, KeyCombination> hotKeys)?
|
||||
$default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _VideoPlayerSettingsModel() when $default != null:
|
||||
return $default(
|
||||
_that.screenBrightness,
|
||||
_that.videoFit,
|
||||
_that.fillScreen,
|
||||
_that.hardwareAccel,
|
||||
_that.useLibass,
|
||||
_that.bufferSize,
|
||||
_that.playerOptions,
|
||||
_that.internalVolume,
|
||||
_that.allowedOrientations,
|
||||
_that.nextVideoType,
|
||||
_that.maxHomeBitrate,
|
||||
_that.maxInternetBitrate,
|
||||
_that.audioDevice,
|
||||
_that.segmentSkipSettings,
|
||||
_that.hotKeys);
|
||||
case _:
|
||||
return orElse();
|
||||
}
|
||||
}
|
||||
|
||||
/// A `switch`-like method, using callbacks.
|
||||
///
|
||||
/// As opposed to `map`, this offers destructuring.
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case Subclass2(:final field2):
|
||||
/// return ...;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function(
|
||||
double? screenBrightness,
|
||||
BoxFit videoFit,
|
||||
bool fillScreen,
|
||||
bool hardwareAccel,
|
||||
bool useLibass,
|
||||
int bufferSize,
|
||||
PlayerOptions? playerOptions,
|
||||
double internalVolume,
|
||||
Set<DeviceOrientation>? allowedOrientations,
|
||||
AutoNextType nextVideoType,
|
||||
Bitrate maxHomeBitrate,
|
||||
Bitrate maxInternetBitrate,
|
||||
String? audioDevice,
|
||||
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
|
||||
Map<VideoHotKeys, KeyCombination> hotKeys)
|
||||
$default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _VideoPlayerSettingsModel():
|
||||
return $default(
|
||||
_that.screenBrightness,
|
||||
_that.videoFit,
|
||||
_that.fillScreen,
|
||||
_that.hardwareAccel,
|
||||
_that.useLibass,
|
||||
_that.bufferSize,
|
||||
_that.playerOptions,
|
||||
_that.internalVolume,
|
||||
_that.allowedOrientations,
|
||||
_that.nextVideoType,
|
||||
_that.maxHomeBitrate,
|
||||
_that.maxInternetBitrate,
|
||||
_that.audioDevice,
|
||||
_that.segmentSkipSettings,
|
||||
_that.hotKeys);
|
||||
case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
}
|
||||
}
|
||||
|
||||
/// A variant of `when` that fallback to returning `null`
|
||||
///
|
||||
/// It is equivalent to doing:
|
||||
/// ```dart
|
||||
/// switch (sealedClass) {
|
||||
/// case Subclass(:final field):
|
||||
/// return ...;
|
||||
/// case _:
|
||||
/// return null;
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function(
|
||||
double? screenBrightness,
|
||||
BoxFit videoFit,
|
||||
bool fillScreen,
|
||||
bool hardwareAccel,
|
||||
bool useLibass,
|
||||
int bufferSize,
|
||||
PlayerOptions? playerOptions,
|
||||
double internalVolume,
|
||||
Set<DeviceOrientation>? allowedOrientations,
|
||||
AutoNextType nextVideoType,
|
||||
Bitrate maxHomeBitrate,
|
||||
Bitrate maxInternetBitrate,
|
||||
String? audioDevice,
|
||||
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
|
||||
Map<VideoHotKeys, KeyCombination> hotKeys)?
|
||||
$default,
|
||||
) {
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _VideoPlayerSettingsModel() when $default != null:
|
||||
return $default(
|
||||
_that.screenBrightness,
|
||||
_that.videoFit,
|
||||
_that.fillScreen,
|
||||
_that.hardwareAccel,
|
||||
_that.useLibass,
|
||||
_that.bufferSize,
|
||||
_that.playerOptions,
|
||||
_that.internalVolume,
|
||||
_that.allowedOrientations,
|
||||
_that.nextVideoType,
|
||||
_that.maxHomeBitrate,
|
||||
_that.maxInternetBitrate,
|
||||
_that.audioDevice,
|
||||
_that.segmentSkipSettings,
|
||||
_that.hotKeys);
|
||||
case _:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
|
||||
class _VideoPlayerSettingsModel extends VideoPlayerSettingsModel
|
||||
with DiagnosticableTreeMixin {
|
||||
_$VideoPlayerSettingsModelImpl(
|
||||
_VideoPlayerSettingsModel(
|
||||
{this.screenBrightness,
|
||||
this.videoFit = BoxFit.contain,
|
||||
this.fillScreen = false,
|
||||
|
|
@ -319,9 +461,8 @@ class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
|
|||
_segmentSkipSettings = segmentSkipSettings,
|
||||
_hotKeys = hotKeys,
|
||||
super._();
|
||||
|
||||
factory _$VideoPlayerSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$VideoPlayerSettingsModelImplFromJson(json);
|
||||
factory _VideoPlayerSettingsModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$VideoPlayerSettingsModelFromJson(json);
|
||||
|
||||
@override
|
||||
final double? screenBrightness;
|
||||
|
|
@ -386,14 +527,24 @@ class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
|
|||
return EqualUnmodifiableMapView(_hotKeys);
|
||||
}
|
||||
|
||||
/// Create a copy of VideoPlayerSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
||||
return 'VideoPlayerSettingsModel(screenBrightness: $screenBrightness, videoFit: $videoFit, fillScreen: $fillScreen, hardwareAccel: $hardwareAccel, useLibass: $useLibass, bufferSize: $bufferSize, playerOptions: $playerOptions, internalVolume: $internalVolume, allowedOrientations: $allowedOrientations, nextVideoType: $nextVideoType, maxHomeBitrate: $maxHomeBitrate, maxInternetBitrate: $maxInternetBitrate, audioDevice: $audioDevice, segmentSkipSettings: $segmentSkipSettings, hotKeys: $hotKeys)';
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$VideoPlayerSettingsModelCopyWith<_VideoPlayerSettingsModel> get copyWith =>
|
||||
__$VideoPlayerSettingsModelCopyWithImpl<_VideoPlayerSettingsModel>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$VideoPlayerSettingsModelToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
super.debugFillProperties(properties);
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'VideoPlayerSettingsModel'))
|
||||
..add(DiagnosticsProperty('screenBrightness', screenBrightness))
|
||||
|
|
@ -413,81 +564,130 @@ class _$VideoPlayerSettingsModelImpl extends _VideoPlayerSettingsModel
|
|||
..add(DiagnosticsProperty('hotKeys', hotKeys));
|
||||
}
|
||||
|
||||
@override
|
||||
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
||||
return 'VideoPlayerSettingsModel(screenBrightness: $screenBrightness, videoFit: $videoFit, fillScreen: $fillScreen, hardwareAccel: $hardwareAccel, useLibass: $useLibass, bufferSize: $bufferSize, playerOptions: $playerOptions, internalVolume: $internalVolume, allowedOrientations: $allowedOrientations, nextVideoType: $nextVideoType, maxHomeBitrate: $maxHomeBitrate, maxInternetBitrate: $maxInternetBitrate, audioDevice: $audioDevice, segmentSkipSettings: $segmentSkipSettings, hotKeys: $hotKeys)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$VideoPlayerSettingsModelCopyWith<$Res>
|
||||
implements $VideoPlayerSettingsModelCopyWith<$Res> {
|
||||
factory _$VideoPlayerSettingsModelCopyWith(_VideoPlayerSettingsModel value,
|
||||
$Res Function(_VideoPlayerSettingsModel) _then) =
|
||||
__$VideoPlayerSettingsModelCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{double? screenBrightness,
|
||||
BoxFit videoFit,
|
||||
bool fillScreen,
|
||||
bool hardwareAccel,
|
||||
bool useLibass,
|
||||
int bufferSize,
|
||||
PlayerOptions? playerOptions,
|
||||
double internalVolume,
|
||||
Set<DeviceOrientation>? allowedOrientations,
|
||||
AutoNextType nextVideoType,
|
||||
Bitrate maxHomeBitrate,
|
||||
Bitrate maxInternetBitrate,
|
||||
String? audioDevice,
|
||||
Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
|
||||
Map<VideoHotKeys, KeyCombination> hotKeys});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$VideoPlayerSettingsModelCopyWithImpl<$Res>
|
||||
implements _$VideoPlayerSettingsModelCopyWith<$Res> {
|
||||
__$VideoPlayerSettingsModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _VideoPlayerSettingsModel _self;
|
||||
final $Res Function(_VideoPlayerSettingsModel) _then;
|
||||
|
||||
/// Create a copy of VideoPlayerSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$VideoPlayerSettingsModelImplCopyWith<_$VideoPlayerSettingsModelImpl>
|
||||
get copyWith => __$$VideoPlayerSettingsModelImplCopyWithImpl<
|
||||
_$VideoPlayerSettingsModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$VideoPlayerSettingsModelImplToJson(
|
||||
this,
|
||||
);
|
||||
$Res call({
|
||||
Object? screenBrightness = freezed,
|
||||
Object? videoFit = null,
|
||||
Object? fillScreen = null,
|
||||
Object? hardwareAccel = null,
|
||||
Object? useLibass = null,
|
||||
Object? bufferSize = null,
|
||||
Object? playerOptions = freezed,
|
||||
Object? internalVolume = null,
|
||||
Object? allowedOrientations = freezed,
|
||||
Object? nextVideoType = null,
|
||||
Object? maxHomeBitrate = null,
|
||||
Object? maxInternetBitrate = null,
|
||||
Object? audioDevice = freezed,
|
||||
Object? segmentSkipSettings = null,
|
||||
Object? hotKeys = null,
|
||||
}) {
|
||||
return _then(_VideoPlayerSettingsModel(
|
||||
screenBrightness: freezed == screenBrightness
|
||||
? _self.screenBrightness
|
||||
: screenBrightness // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
videoFit: null == videoFit
|
||||
? _self.videoFit
|
||||
: videoFit // ignore: cast_nullable_to_non_nullable
|
||||
as BoxFit,
|
||||
fillScreen: null == fillScreen
|
||||
? _self.fillScreen
|
||||
: fillScreen // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hardwareAccel: null == hardwareAccel
|
||||
? _self.hardwareAccel
|
||||
: hardwareAccel // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
useLibass: null == useLibass
|
||||
? _self.useLibass
|
||||
: useLibass // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
bufferSize: null == bufferSize
|
||||
? _self.bufferSize
|
||||
: bufferSize // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
playerOptions: freezed == playerOptions
|
||||
? _self.playerOptions
|
||||
: playerOptions // ignore: cast_nullable_to_non_nullable
|
||||
as PlayerOptions?,
|
||||
internalVolume: null == internalVolume
|
||||
? _self.internalVolume
|
||||
: internalVolume // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
allowedOrientations: freezed == allowedOrientations
|
||||
? _self._allowedOrientations
|
||||
: allowedOrientations // ignore: cast_nullable_to_non_nullable
|
||||
as Set<DeviceOrientation>?,
|
||||
nextVideoType: null == nextVideoType
|
||||
? _self.nextVideoType
|
||||
: nextVideoType // ignore: cast_nullable_to_non_nullable
|
||||
as AutoNextType,
|
||||
maxHomeBitrate: null == maxHomeBitrate
|
||||
? _self.maxHomeBitrate
|
||||
: maxHomeBitrate // ignore: cast_nullable_to_non_nullable
|
||||
as Bitrate,
|
||||
maxInternetBitrate: null == maxInternetBitrate
|
||||
? _self.maxInternetBitrate
|
||||
: maxInternetBitrate // ignore: cast_nullable_to_non_nullable
|
||||
as Bitrate,
|
||||
audioDevice: freezed == audioDevice
|
||||
? _self.audioDevice
|
||||
: audioDevice // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
segmentSkipSettings: null == segmentSkipSettings
|
||||
? _self._segmentSkipSettings
|
||||
: segmentSkipSettings // ignore: cast_nullable_to_non_nullable
|
||||
as Map<MediaSegmentType, SegmentSkip>,
|
||||
hotKeys: null == hotKeys
|
||||
? _self._hotKeys
|
||||
: hotKeys // ignore: cast_nullable_to_non_nullable
|
||||
as Map<VideoHotKeys, KeyCombination>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _VideoPlayerSettingsModel extends VideoPlayerSettingsModel {
|
||||
factory _VideoPlayerSettingsModel(
|
||||
{final double? screenBrightness,
|
||||
final BoxFit videoFit,
|
||||
final bool fillScreen,
|
||||
final bool hardwareAccel,
|
||||
final bool useLibass,
|
||||
final int bufferSize,
|
||||
final PlayerOptions? playerOptions,
|
||||
final double internalVolume,
|
||||
final Set<DeviceOrientation>? allowedOrientations,
|
||||
final AutoNextType nextVideoType,
|
||||
final Bitrate maxHomeBitrate,
|
||||
final Bitrate maxInternetBitrate,
|
||||
final String? audioDevice,
|
||||
final Map<MediaSegmentType, SegmentSkip> segmentSkipSettings,
|
||||
final Map<VideoHotKeys, KeyCombination> hotKeys}) =
|
||||
_$VideoPlayerSettingsModelImpl;
|
||||
_VideoPlayerSettingsModel._() : super._();
|
||||
|
||||
factory _VideoPlayerSettingsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$VideoPlayerSettingsModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
double? get screenBrightness;
|
||||
@override
|
||||
BoxFit get videoFit;
|
||||
@override
|
||||
bool get fillScreen;
|
||||
@override
|
||||
bool get hardwareAccel;
|
||||
@override
|
||||
bool get useLibass;
|
||||
@override
|
||||
int get bufferSize;
|
||||
@override
|
||||
PlayerOptions? get playerOptions;
|
||||
@override
|
||||
double get internalVolume;
|
||||
@override
|
||||
Set<DeviceOrientation>? get allowedOrientations;
|
||||
@override
|
||||
AutoNextType get nextVideoType;
|
||||
@override
|
||||
Bitrate get maxHomeBitrate;
|
||||
@override
|
||||
Bitrate get maxInternetBitrate;
|
||||
@override
|
||||
String? get audioDevice;
|
||||
@override
|
||||
Map<MediaSegmentType, SegmentSkip> get segmentSkipSettings;
|
||||
@override
|
||||
Map<VideoHotKeys, KeyCombination> get hotKeys;
|
||||
|
||||
/// Create a copy of VideoPlayerSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$VideoPlayerSettingsModelImplCopyWith<_$VideoPlayerSettingsModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ part of 'video_player_settings.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$VideoPlayerSettingsModelImpl _$$VideoPlayerSettingsModelImplFromJson(
|
||||
_VideoPlayerSettingsModel _$VideoPlayerSettingsModelFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$VideoPlayerSettingsModelImpl(
|
||||
_VideoPlayerSettingsModel(
|
||||
screenBrightness: (json['screenBrightness'] as num?)?.toDouble(),
|
||||
videoFit: $enumDecodeNullable(_$BoxFitEnumMap, json['videoFit']) ??
|
||||
BoxFit.contain,
|
||||
|
|
@ -45,8 +45,8 @@ _$VideoPlayerSettingsModelImpl _$$VideoPlayerSettingsModelImplFromJson(
|
|||
const {},
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VideoPlayerSettingsModelImplToJson(
|
||||
_$VideoPlayerSettingsModelImpl instance) =>
|
||||
Map<String, dynamic> _$VideoPlayerSettingsModelToJson(
|
||||
_VideoPlayerSettingsModel instance) =>
|
||||
<String, dynamic>{
|
||||
'screenBrightness': instance.screenBrightness,
|
||||
'videoFit': _$BoxFitEnumMap[instance.videoFit]!,
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -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_streams_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';
|
||||
|
||||
part 'sync_item.freezed.dart';
|
||||
|
||||
@Freezed(copyWith: true)
|
||||
class SyncedItem with _$SyncedItem {
|
||||
abstract class SyncedItem with _$SyncedItem {
|
||||
const SyncedItem._();
|
||||
|
||||
factory SyncedItem({
|
||||
|
|
@ -126,39 +125,6 @@ class SyncedItem with _$SyncedItem {
|
|||
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 {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,46 +9,49 @@ part of 'sync_item.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SyncedItem {
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
bool get syncing => throw _privateConstructorUsedError;
|
||||
String? get parentId => throw _privateConstructorUsedError;
|
||||
String get userId => throw _privateConstructorUsedError;
|
||||
String? get path => throw _privateConstructorUsedError;
|
||||
bool get markedForDelete => throw _privateConstructorUsedError;
|
||||
String? get sortName => throw _privateConstructorUsedError;
|
||||
int? get fileSize => throw _privateConstructorUsedError;
|
||||
String? get videoFileName => throw _privateConstructorUsedError;
|
||||
MediaSegmentsModel? get mediaSegments => throw _privateConstructorUsedError;
|
||||
TrickPlayModel? get fTrickPlayModel => throw _privateConstructorUsedError;
|
||||
ImagesData? get fImages => throw _privateConstructorUsedError;
|
||||
List<Chapter> get fChapters => throw _privateConstructorUsedError;
|
||||
List<SubStreamModel> get subtitles => throw _privateConstructorUsedError;
|
||||
bool get unSyncedData => throw _privateConstructorUsedError;
|
||||
String get id;
|
||||
bool get syncing;
|
||||
String? get parentId;
|
||||
String get userId;
|
||||
String? get path;
|
||||
bool get markedForDelete;
|
||||
String? get sortName;
|
||||
int? get fileSize;
|
||||
String? get videoFileName;
|
||||
MediaSegmentsModel? get mediaSegments;
|
||||
TrickPlayModel? get fTrickPlayModel;
|
||||
ImagesData? get fImages;
|
||||
List<Chapter> get fChapters;
|
||||
List<SubStreamModel> get subtitles;
|
||||
bool get unSyncedData;
|
||||
@UserDataJsonSerializer()
|
||||
UserData? get userData =>
|
||||
throw _privateConstructorUsedError; // ignore: invalid_annotation_target
|
||||
UserData? get userData; // ignore: invalid_annotation_target
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
ItemBaseModel? get itemModel => throw _privateConstructorUsedError;
|
||||
ItemBaseModel? get itemModel;
|
||||
|
||||
/// Create a copy of SyncedItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$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
|
||||
abstract class $SyncedItemCopyWith<$Res> {
|
||||
abstract mixin class $SyncedItemCopyWith<$Res> {
|
||||
factory $SyncedItemCopyWith(
|
||||
SyncedItem value, $Res Function(SyncedItem) then) =
|
||||
_$SyncedItemCopyWithImpl<$Res, SyncedItem>;
|
||||
SyncedItem value, $Res Function(SyncedItem) _then) =
|
||||
_$SyncedItemCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String id,
|
||||
|
|
@ -74,14 +77,11 @@ abstract class $SyncedItemCopyWith<$Res> {
|
|||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SyncedItemCopyWithImpl<$Res, $Val extends SyncedItem>
|
||||
implements $SyncedItemCopyWith<$Res> {
|
||||
_$SyncedItemCopyWithImpl(this._value, this._then);
|
||||
class _$SyncedItemCopyWithImpl<$Res> implements $SyncedItemCopyWith<$Res> {
|
||||
_$SyncedItemCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final SyncedItem _self;
|
||||
final $Res Function(SyncedItem) _then;
|
||||
|
||||
/// Create a copy of SyncedItem
|
||||
/// 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? itemModel = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
return _then(_self.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
? _self.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
syncing: null == syncing
|
||||
? _value.syncing
|
||||
? _self.syncing
|
||||
: syncing // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
parentId: freezed == parentId
|
||||
? _value.parentId
|
||||
? _self.parentId
|
||||
: parentId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
userId: null == userId
|
||||
? _value.userId
|
||||
? _self.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
path: freezed == path
|
||||
? _value.path
|
||||
? _self.path
|
||||
: path // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
markedForDelete: null == markedForDelete
|
||||
? _value.markedForDelete
|
||||
? _self.markedForDelete
|
||||
: markedForDelete // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
sortName: freezed == sortName
|
||||
? _value.sortName
|
||||
? _self.sortName
|
||||
: sortName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
fileSize: freezed == fileSize
|
||||
? _value.fileSize
|
||||
? _self.fileSize
|
||||
: fileSize // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
videoFileName: freezed == videoFileName
|
||||
? _value.videoFileName
|
||||
? _self.videoFileName
|
||||
: videoFileName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
mediaSegments: freezed == mediaSegments
|
||||
? _value.mediaSegments
|
||||
? _self.mediaSegments
|
||||
: mediaSegments // ignore: cast_nullable_to_non_nullable
|
||||
as MediaSegmentsModel?,
|
||||
fTrickPlayModel: freezed == fTrickPlayModel
|
||||
? _value.fTrickPlayModel
|
||||
? _self.fTrickPlayModel
|
||||
: fTrickPlayModel // ignore: cast_nullable_to_non_nullable
|
||||
as TrickPlayModel?,
|
||||
fImages: freezed == fImages
|
||||
? _value.fImages
|
||||
? _self.fImages
|
||||
: fImages // ignore: cast_nullable_to_non_nullable
|
||||
as ImagesData?,
|
||||
fChapters: null == fChapters
|
||||
? _value.fChapters
|
||||
? _self.fChapters
|
||||
: fChapters // ignore: cast_nullable_to_non_nullable
|
||||
as List<Chapter>,
|
||||
subtitles: null == subtitles
|
||||
? _value.subtitles
|
||||
? _self.subtitles
|
||||
: subtitles // ignore: cast_nullable_to_non_nullable
|
||||
as List<SubStreamModel>,
|
||||
unSyncedData: null == unSyncedData
|
||||
? _value.unSyncedData
|
||||
? _self.unSyncedData
|
||||
: unSyncedData // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
userData: freezed == userData
|
||||
? _value.userData
|
||||
? _self.userData
|
||||
: userData // ignore: cast_nullable_to_non_nullable
|
||||
as UserData?,
|
||||
itemModel: freezed == itemModel
|
||||
? _value.itemModel
|
||||
? _self.itemModel
|
||||
: itemModel // ignore: cast_nullable_to_non_nullable
|
||||
as ItemBaseModel?,
|
||||
) as $Val);
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of SyncedItem
|
||||
|
|
@ -183,26 +183,111 @@ class _$SyncedItemCopyWithImpl<$Res, $Val extends SyncedItem>
|
|||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$TrickPlayModelCopyWith<$Res>? get fTrickPlayModel {
|
||||
if (_value.fTrickPlayModel == null) {
|
||||
if (_self.fTrickPlayModel == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $TrickPlayModelCopyWith<$Res>(_value.fTrickPlayModel!, (value) {
|
||||
return _then(_value.copyWith(fTrickPlayModel: value) as $Val);
|
||||
return $TrickPlayModelCopyWith<$Res>(_self.fTrickPlayModel!, (value) {
|
||||
return _then(_self.copyWith(fTrickPlayModel: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SyncItemImplCopyWith<$Res>
|
||||
implements $SyncedItemCopyWith<$Res> {
|
||||
factory _$$SyncItemImplCopyWith(
|
||||
_$SyncItemImpl value, $Res Function(_$SyncItemImpl) then) =
|
||||
__$$SyncItemImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String id,
|
||||
/// Adds pattern-matching-related methods to [SyncedItem].
|
||||
extension SyncedItemPatterns on SyncedItem {
|
||||
/// 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(_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,
|
||||
String? parentId,
|
||||
String userId,
|
||||
|
|
@ -219,120 +304,164 @@ abstract class _$$SyncItemImplCopyWith<$Res>
|
|||
bool unSyncedData,
|
||||
@UserDataJsonSerializer() UserData? userData,
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
ItemBaseModel? itemModel});
|
||||
|
||||
@override
|
||||
$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,
|
||||
ItemBaseModel? itemModel)?
|
||||
$default, {
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
return _then(_$SyncItemImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
syncing: null == syncing
|
||||
? _value.syncing
|
||||
: syncing // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
parentId: freezed == parentId
|
||||
? _value.parentId
|
||||
: parentId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
userId: null == userId
|
||||
? _value.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
path: freezed == path
|
||||
? _value.path
|
||||
: path // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
markedForDelete: null == markedForDelete
|
||||
? _value.markedForDelete
|
||||
: markedForDelete // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
sortName: freezed == sortName
|
||||
? _value.sortName
|
||||
: sortName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
fileSize: freezed == fileSize
|
||||
? _value.fileSize
|
||||
: fileSize // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
videoFileName: freezed == videoFileName
|
||||
? _value.videoFileName
|
||||
: videoFileName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
mediaSegments: freezed == mediaSegments
|
||||
? _value.mediaSegments
|
||||
: mediaSegments // ignore: cast_nullable_to_non_nullable
|
||||
as MediaSegmentsModel?,
|
||||
fTrickPlayModel: freezed == fTrickPlayModel
|
||||
? _value.fTrickPlayModel
|
||||
: fTrickPlayModel // ignore: cast_nullable_to_non_nullable
|
||||
as TrickPlayModel?,
|
||||
fImages: freezed == fImages
|
||||
? _value.fImages
|
||||
: fImages // ignore: cast_nullable_to_non_nullable
|
||||
as ImagesData?,
|
||||
fChapters: null == fChapters
|
||||
? _value._fChapters
|
||||
: fChapters // ignore: cast_nullable_to_non_nullable
|
||||
as List<Chapter>,
|
||||
subtitles: null == subtitles
|
||||
? _value._subtitles
|
||||
: subtitles // ignore: cast_nullable_to_non_nullable
|
||||
as List<SubStreamModel>,
|
||||
unSyncedData: null == unSyncedData
|
||||
? _value.unSyncedData
|
||||
: unSyncedData // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
userData: freezed == userData
|
||||
? _value.userData
|
||||
: userData // ignore: cast_nullable_to_non_nullable
|
||||
as UserData?,
|
||||
itemModel: freezed == itemModel
|
||||
? _value.itemModel
|
||||
: itemModel // ignore: cast_nullable_to_non_nullable
|
||||
as ItemBaseModel?,
|
||||
));
|
||||
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 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,
|
||||
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():
|
||||
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 _:
|
||||
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
|
||||
|
||||
class _$SyncItemImpl extends _SyncItem {
|
||||
_$SyncItemImpl(
|
||||
class _SyncItem extends SyncedItem {
|
||||
_SyncItem(
|
||||
{required this.id,
|
||||
this.syncing = false,
|
||||
this.parentId,
|
||||
|
|
@ -409,83 +538,166 @@ class _$SyncItemImpl extends _SyncItem {
|
|||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
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
|
||||
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
|
||||
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
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SyncItemImplCopyWith<_$SyncItemImpl> get copyWith =>
|
||||
__$$SyncItemImplCopyWithImpl<_$SyncItemImpl>(this, _$identity);
|
||||
$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(_SyncItem(
|
||||
id: null == id
|
||||
? _self.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
syncing: null == syncing
|
||||
? _self.syncing
|
||||
: syncing // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
parentId: freezed == parentId
|
||||
? _self.parentId
|
||||
: parentId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
userId: null == userId
|
||||
? _self.userId
|
||||
: userId // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
path: freezed == path
|
||||
? _self.path
|
||||
: path // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
markedForDelete: null == markedForDelete
|
||||
? _self.markedForDelete
|
||||
: markedForDelete // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
sortName: freezed == sortName
|
||||
? _self.sortName
|
||||
: sortName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
fileSize: freezed == fileSize
|
||||
? _self.fileSize
|
||||
: fileSize // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
videoFileName: freezed == videoFileName
|
||||
? _self.videoFileName
|
||||
: videoFileName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
mediaSegments: freezed == mediaSegments
|
||||
? _self.mediaSegments
|
||||
: mediaSegments // ignore: cast_nullable_to_non_nullable
|
||||
as MediaSegmentsModel?,
|
||||
fTrickPlayModel: freezed == fTrickPlayModel
|
||||
? _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?,
|
||||
));
|
||||
}
|
||||
|
||||
abstract class _SyncItem extends SyncedItem {
|
||||
factory _SyncItem(
|
||||
{required final String id,
|
||||
final bool syncing,
|
||||
final String? parentId,
|
||||
required final String userId,
|
||||
final String? path,
|
||||
final bool markedForDelete,
|
||||
final String? sortName,
|
||||
final int? fileSize,
|
||||
final String? videoFileName,
|
||||
final MediaSegmentsModel? mediaSegments,
|
||||
final TrickPlayModel? fTrickPlayModel,
|
||||
final ImagesData? fImages,
|
||||
final List<Chapter> fChapters,
|
||||
final List<SubStreamModel> subtitles,
|
||||
final bool unSyncedData,
|
||||
@UserDataJsonSerializer() final UserData? userData,
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
final ItemBaseModel? itemModel}) = _$SyncItemImpl;
|
||||
_SyncItem._() : super._();
|
||||
|
||||
@override
|
||||
String get id;
|
||||
@override
|
||||
bool get syncing;
|
||||
@override
|
||||
String? get parentId;
|
||||
@override
|
||||
String get userId;
|
||||
@override
|
||||
String? get path;
|
||||
@override
|
||||
bool get markedForDelete;
|
||||
@override
|
||||
String? get sortName;
|
||||
@override
|
||||
int? get fileSize;
|
||||
@override
|
||||
String? get videoFileName;
|
||||
@override
|
||||
MediaSegmentsModel? get mediaSegments;
|
||||
@override
|
||||
TrickPlayModel? get fTrickPlayModel;
|
||||
@override
|
||||
ImagesData? get fImages;
|
||||
@override
|
||||
List<Chapter> get fChapters;
|
||||
@override
|
||||
List<SubStreamModel> get subtitles;
|
||||
@override
|
||||
bool get unSyncedData;
|
||||
@override
|
||||
@UserDataJsonSerializer()
|
||||
UserData? get userData; // ignore: invalid_annotation_target
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
ItemBaseModel? get itemModel;
|
||||
|
||||
/// Create a copy of SyncedItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$SyncItemImplCopyWith<_$SyncItemImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
@pragma('vm:prefer-inline')
|
||||
$TrickPlayModelCopyWith<$Res>? get fTrickPlayModel {
|
||||
if (_self.fTrickPlayModel == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $TrickPlayModelCopyWith<$Res>(_self.fTrickPlayModel!, (value) {
|
||||
return _then(_self.copyWith(fTrickPlayModel: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import 'package:fladder/models/syncing/sync_item.dart';
|
|||
part 'sync_settings_model.freezed.dart';
|
||||
|
||||
@Freezed(toJson: false, fromJson: false, copyWith: true)
|
||||
class SyncSettingsModel with _$SyncSettingsModel {
|
||||
abstract class SyncSettingsModel with _$SyncSettingsModel {
|
||||
const SyncSettingsModel._();
|
||||
|
||||
factory SyncSettingsModel({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,40 +9,43 @@ part of 'sync_settings_model.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SyncSettingsModel {
|
||||
List<SyncedItem> get items => throw _privateConstructorUsedError;
|
||||
List<SyncedItem> get items;
|
||||
|
||||
/// Create a copy of SyncSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SyncSettingsModelCopyWith<SyncSettingsModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$SyncSettingsModelCopyWithImpl<SyncSettingsModel>(
|
||||
this as SyncSettingsModel, _$identity);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SyncSettingsModel(items: $items)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $SyncSettingsModelCopyWith<$Res> {
|
||||
abstract mixin class $SyncSettingsModelCopyWith<$Res> {
|
||||
factory $SyncSettingsModelCopyWith(
|
||||
SyncSettingsModel value, $Res Function(SyncSettingsModel) then) =
|
||||
_$SyncSettingsModelCopyWithImpl<$Res, SyncSettingsModel>;
|
||||
SyncSettingsModel value, $Res Function(SyncSettingsModel) _then) =
|
||||
_$SyncSettingsModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({List<SyncedItem> items});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$SyncSettingsModelCopyWithImpl<$Res, $Val extends SyncSettingsModel>
|
||||
class _$SyncSettingsModelCopyWithImpl<$Res>
|
||||
implements $SyncSettingsModelCopyWith<$Res> {
|
||||
_$SyncSettingsModelCopyWithImpl(this._value, this._then);
|
||||
_$SyncSettingsModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final SyncSettingsModel _self;
|
||||
final $Res Function(SyncSettingsModel) _then;
|
||||
|
||||
/// Create a copy of SyncSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -51,54 +54,176 @@ class _$SyncSettingsModelCopyWithImpl<$Res, $Val extends SyncSettingsModel>
|
|||
$Res call({
|
||||
Object? items = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
return _then(_self.copyWith(
|
||||
items: null == items
|
||||
? _value.items
|
||||
: items // ignore: cast_nullable_to_non_nullable
|
||||
as List<SyncedItem>,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$SyncSettignsModelImplCopyWith<$Res>
|
||||
implements $SyncSettingsModelCopyWith<$Res> {
|
||||
factory _$$SyncSettignsModelImplCopyWith(_$SyncSettignsModelImpl value,
|
||||
$Res Function(_$SyncSettignsModelImpl) then) =
|
||||
__$$SyncSettignsModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({List<SyncedItem> items});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SyncSettignsModelImplCopyWithImpl<$Res>
|
||||
extends _$SyncSettingsModelCopyWithImpl<$Res, _$SyncSettignsModelImpl>
|
||||
implements _$$SyncSettignsModelImplCopyWith<$Res> {
|
||||
__$$SyncSettignsModelImplCopyWithImpl(_$SyncSettignsModelImpl _value,
|
||||
$Res Function(_$SyncSettignsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of SyncSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? items = null,
|
||||
}) {
|
||||
return _then(_$SyncSettignsModelImpl(
|
||||
items: null == items
|
||||
? _value._items
|
||||
? _self.items
|
||||
: items // ignore: cast_nullable_to_non_nullable
|
||||
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
|
||||
|
||||
class _$SyncSettignsModelImpl extends _SyncSettignsModel {
|
||||
_$SyncSettignsModelImpl({final List<SyncedItem> items = const []})
|
||||
class _SyncSettignsModel extends SyncSettingsModel {
|
||||
_SyncSettignsModel({final List<SyncedItem> items = const []})
|
||||
: _items = items,
|
||||
super._();
|
||||
|
||||
|
|
@ -111,33 +236,53 @@ class _$SyncSettignsModelImpl extends _SyncSettignsModel {
|
|||
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
|
||||
String toString() {
|
||||
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
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SyncSettignsModelImplCopyWith<_$SyncSettignsModelImpl> get copyWith =>
|
||||
__$$SyncSettignsModelImplCopyWithImpl<_$SyncSettignsModelImpl>(
|
||||
this, _$identity);
|
||||
$Res call({
|
||||
Object? items = null,
|
||||
}) {
|
||||
return _then(_SyncSettignsModel(
|
||||
items: null == items
|
||||
? _self._items
|
||||
: items // ignore: cast_nullable_to_non_nullable
|
||||
as List<SyncedItem>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _SyncSettignsModel extends SyncSettingsModel {
|
||||
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;
|
||||
}
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ enum LibraryViewType {
|
|||
}
|
||||
|
||||
@Freezed(fromJson: false, toJson: false, copyWith: true)
|
||||
class LibraryScreenModel with _$LibraryScreenModel {
|
||||
abstract class LibraryScreenModel with _$LibraryScreenModel {
|
||||
factory LibraryScreenModel({
|
||||
@Default([]) List<ViewModel> views,
|
||||
ViewModel? selectedViewModel,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,33 +9,37 @@ part of 'library_screen_provider.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$LibraryScreenModel {
|
||||
List<ViewModel> get views => throw _privateConstructorUsedError;
|
||||
ViewModel? get selectedViewModel => throw _privateConstructorUsedError;
|
||||
Set<LibraryViewType> get viewType => throw _privateConstructorUsedError;
|
||||
List<RecommendedModel> get recommendations =>
|
||||
throw _privateConstructorUsedError;
|
||||
List<RecommendedModel> get genres => throw _privateConstructorUsedError;
|
||||
List<ItemBaseModel> get favourites => throw _privateConstructorUsedError;
|
||||
List<ViewModel> get views;
|
||||
ViewModel? get selectedViewModel;
|
||||
Set<LibraryViewType> get viewType;
|
||||
List<RecommendedModel> get recommendations;
|
||||
List<RecommendedModel> get genres;
|
||||
List<ItemBaseModel> get favourites;
|
||||
|
||||
/// Create a copy of LibraryScreenModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$LibraryScreenModelCopyWith<LibraryScreenModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
_$LibraryScreenModelCopyWithImpl<LibraryScreenModel>(
|
||||
this as LibraryScreenModel, _$identity);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LibraryScreenModel(views: $views, selectedViewModel: $selectedViewModel, viewType: $viewType, recommendations: $recommendations, genres: $genres, favourites: $favourites)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $LibraryScreenModelCopyWith<$Res> {
|
||||
abstract mixin class $LibraryScreenModelCopyWith<$Res> {
|
||||
factory $LibraryScreenModelCopyWith(
|
||||
LibraryScreenModel value, $Res Function(LibraryScreenModel) then) =
|
||||
_$LibraryScreenModelCopyWithImpl<$Res, LibraryScreenModel>;
|
||||
LibraryScreenModel value, $Res Function(LibraryScreenModel) _then) =
|
||||
_$LibraryScreenModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{List<ViewModel> views,
|
||||
|
|
@ -47,14 +51,12 @@ abstract class $LibraryScreenModelCopyWith<$Res> {
|
|||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$LibraryScreenModelCopyWithImpl<$Res, $Val extends LibraryScreenModel>
|
||||
class _$LibraryScreenModelCopyWithImpl<$Res>
|
||||
implements $LibraryScreenModelCopyWith<$Res> {
|
||||
_$LibraryScreenModelCopyWithImpl(this._value, this._then);
|
||||
_$LibraryScreenModelCopyWithImpl(this._self, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
final LibraryScreenModel _self;
|
||||
final $Res Function(LibraryScreenModel) _then;
|
||||
|
||||
/// Create a copy of LibraryScreenModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -68,105 +70,220 @@ class _$LibraryScreenModelCopyWithImpl<$Res, $Val extends LibraryScreenModel>
|
|||
Object? genres = null,
|
||||
Object? favourites = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
return _then(_self.copyWith(
|
||||
views: null == views
|
||||
? _value.views
|
||||
? _self.views
|
||||
: views // ignore: cast_nullable_to_non_nullable
|
||||
as List<ViewModel>,
|
||||
selectedViewModel: freezed == selectedViewModel
|
||||
? _value.selectedViewModel
|
||||
? _self.selectedViewModel
|
||||
: selectedViewModel // ignore: cast_nullable_to_non_nullable
|
||||
as ViewModel?,
|
||||
viewType: null == viewType
|
||||
? _value.viewType
|
||||
? _self.viewType
|
||||
: viewType // ignore: cast_nullable_to_non_nullable
|
||||
as Set<LibraryViewType>,
|
||||
recommendations: null == recommendations
|
||||
? _value.recommendations
|
||||
? _self.recommendations
|
||||
: recommendations // ignore: cast_nullable_to_non_nullable
|
||||
as List<RecommendedModel>,
|
||||
genres: null == genres
|
||||
? _value.genres
|
||||
? _self.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
|
||||
abstract class _$$LibraryScreenModelImplCopyWith<$Res>
|
||||
implements $LibraryScreenModelCopyWith<$Res> {
|
||||
factory _$$LibraryScreenModelImplCopyWith(_$LibraryScreenModelImpl value,
|
||||
$Res Function(_$LibraryScreenModelImpl) then) =
|
||||
__$$LibraryScreenModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{List<ViewModel> views,
|
||||
ViewModel? selectedViewModel,
|
||||
Set<LibraryViewType> viewType,
|
||||
List<RecommendedModel> recommendations,
|
||||
List<RecommendedModel> genres,
|
||||
List<ItemBaseModel> favourites});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$LibraryScreenModelImplCopyWithImpl<$Res>
|
||||
extends _$LibraryScreenModelCopyWithImpl<$Res, _$LibraryScreenModelImpl>
|
||||
implements _$$LibraryScreenModelImplCopyWith<$Res> {
|
||||
__$$LibraryScreenModelImplCopyWithImpl(_$LibraryScreenModelImpl _value,
|
||||
$Res Function(_$LibraryScreenModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LibraryScreenModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? views = null,
|
||||
Object? selectedViewModel = freezed,
|
||||
Object? viewType = null,
|
||||
Object? recommendations = null,
|
||||
Object? genres = null,
|
||||
Object? favourites = null,
|
||||
}) {
|
||||
return _then(_$LibraryScreenModelImpl(
|
||||
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
|
||||
? _self.favourites
|
||||
: favourites // ignore: cast_nullable_to_non_nullable
|
||||
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
|
||||
|
||||
class _$LibraryScreenModelImpl implements _LibraryScreenModel {
|
||||
_$LibraryScreenModelImpl(
|
||||
class _LibraryScreenModel implements LibraryScreenModel {
|
||||
_LibraryScreenModel(
|
||||
{final List<ViewModel> views = const [],
|
||||
this.selectedViewModel,
|
||||
final Set<LibraryViewType> viewType = const {
|
||||
|
|
@ -229,47 +346,84 @@ class _$LibraryScreenModelImpl implements _LibraryScreenModel {
|
|||
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
|
||||
String toString() {
|
||||
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
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LibraryScreenModelImplCopyWith<_$LibraryScreenModelImpl> get copyWith =>
|
||||
__$$LibraryScreenModelImplCopyWithImpl<_$LibraryScreenModelImpl>(
|
||||
this, _$identity);
|
||||
$Res call({
|
||||
Object? views = null,
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class SessionInfo extends _$SessionInfo {
|
|||
}
|
||||
|
||||
@freezed
|
||||
class SessionInfoModel with _$SessionInfoModel {
|
||||
abstract class SessionInfoModel with _$SessionInfoModel {
|
||||
const SessionInfoModel._();
|
||||
|
||||
factory SessionInfoModel({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,61 +9,206 @@ part of 'session_info_provider.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
SessionInfoModel _$SessionInfoModelFromJson(Map<String, dynamic> json) {
|
||||
return _SessionInfoModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SessionInfoModel {
|
||||
String? get playbackModel => throw _privateConstructorUsedError;
|
||||
TranscodingInfo? get transCodeInfo => throw _privateConstructorUsedError;
|
||||
String? get playbackModel;
|
||||
TranscodingInfo? get transCodeInfo;
|
||||
|
||||
/// 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
|
||||
@JsonSerializable()
|
||||
class _$SessionInfoModelImpl extends _SessionInfoModel {
|
||||
_$SessionInfoModelImpl({this.playbackModel, this.transCodeInfo}) : super._();
|
||||
|
||||
factory _$SessionInfoModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$SessionInfoModelImplFromJson(json);
|
||||
class _SessionInfoModel extends SessionInfoModel {
|
||||
_SessionInfoModel({this.playbackModel, this.transCodeInfo}) : super._();
|
||||
factory _SessionInfoModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$SessionInfoModelFromJson(json);
|
||||
|
||||
@override
|
||||
final String? playbackModel;
|
||||
@override
|
||||
final TranscodingInfo? transCodeInfo;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SessionInfoModel(playbackModel: $playbackModel, transCodeInfo: $transCodeInfo)';
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$SessionInfoModelImplToJson(
|
||||
return _$SessionInfoModelToJson(
|
||||
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
|
||||
String? get playbackModel;
|
||||
@override
|
||||
TranscodingInfo? get transCodeInfo;
|
||||
String toString() {
|
||||
return 'SessionInfoModel(playbackModel: $playbackModel, transCodeInfo: $transCodeInfo)';
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -6,9 +6,8 @@ part of 'session_info_provider.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$SessionInfoModelImpl _$$SessionInfoModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$SessionInfoModelImpl(
|
||||
_SessionInfoModel _$SessionInfoModelFromJson(Map<String, dynamic> json) =>
|
||||
_SessionInfoModel(
|
||||
playbackModel: json['playbackModel'] as String?,
|
||||
transCodeInfo: json['transCodeInfo'] == null
|
||||
? null
|
||||
|
|
@ -16,8 +15,7 @@ _$SessionInfoModelImpl _$$SessionInfoModelImplFromJson(
|
|||
json['transCodeInfo'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$SessionInfoModelImplToJson(
|
||||
_$SessionInfoModelImpl instance) =>
|
||||
Map<String, dynamic> _$SessionInfoModelToJson(_SessionInfoModel instance) =>
|
||||
<String, dynamic>{
|
||||
'playbackModel': instance.playbackModel,
|
||||
'transCodeInfo': instance.transCodeInfo,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ import 'package:fladder/providers/user_provider.dart';
|
|||
import 'package:fladder/screens/shared/fladder_snackbar.dart';
|
||||
import 'package:fladder/util/duration_extensions.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());
|
||||
|
||||
|
|
@ -67,11 +66,6 @@ class SyncNotifier extends StateNotifier<SyncSettingsModel> {
|
|||
updateSyncStates();
|
||||
}
|
||||
|
||||
void migrateFromIsar() async {
|
||||
await isarMigration(ref, _db, mainDirectory.path);
|
||||
_initializeQueryStream();
|
||||
}
|
||||
|
||||
Future<void> updateSyncStates() async {
|
||||
final lastState =
|
||||
(await _db.getAllItems.get()).where((item) => item.unSyncedData && item.userData != null).toList();
|
||||
|
|
@ -114,7 +108,7 @@ class SyncNotifier extends StateNotifier<SyncSettingsModel> {
|
|||
updateSyncStates();
|
||||
}
|
||||
});
|
||||
migrateFromIsar();
|
||||
_initializeQueryStream();
|
||||
}
|
||||
|
||||
void _initializeQueryStream({String? id}) async {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ class Update extends _$Update {
|
|||
}
|
||||
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
class UpdatesModel with _$UpdatesModel {
|
||||
abstract class UpdatesModel with _$UpdatesModel {
|
||||
const UpdatesModel._();
|
||||
|
||||
factory UpdatesModel({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,20 +9,187 @@ part of 'update_provider.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UpdatesModel {
|
||||
List<ReleaseInfo> get lastRelease => throw _privateConstructorUsedError;
|
||||
mixin _$UpdatesModel implements DiagnosticableTreeMixin {
|
||||
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
|
||||
|
||||
class _$UpdatesModelImpl extends _UpdatesModel with DiagnosticableTreeMixin {
|
||||
_$UpdatesModelImpl({final List<ReleaseInfo> lastRelease = const []})
|
||||
class _UpdatesModel extends UpdatesModel with DiagnosticableTreeMixin {
|
||||
_UpdatesModel({final List<ReleaseInfo> lastRelease = const []})
|
||||
: _lastRelease = lastRelease,
|
||||
super._();
|
||||
|
||||
|
|
@ -35,25 +202,17 @@ class _$UpdatesModelImpl extends _UpdatesModel with DiagnosticableTreeMixin {
|
|||
return EqualUnmodifiableListView(_lastRelease);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
||||
return 'UpdatesModel(lastRelease: $lastRelease)';
|
||||
}
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
super.debugFillProperties(properties);
|
||||
properties
|
||||
..add(DiagnosticsProperty('type', 'UpdatesModel'))
|
||||
..add(DiagnosticsProperty('lastRelease', lastRelease));
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _UpdatesModel extends UpdatesModel {
|
||||
factory _UpdatesModel({final List<ReleaseInfo> lastRelease}) =
|
||||
_$UpdatesModelImpl;
|
||||
_UpdatesModel._() : super._();
|
||||
|
||||
@override
|
||||
List<ReleaseInfo> get lastRelease;
|
||||
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
||||
return 'UpdatesModel(lastRelease: $lastRelease)';
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class AuthGuard extends AutoRouteGuard {
|
|||
return resolver.next(true);
|
||||
}
|
||||
|
||||
resolver.redirect<bool>(SplashRoute(loggedIn: (value) {
|
||||
resolver.redirectUntil<bool>(SplashRoute(loggedIn: (value) {
|
||||
if (value) {
|
||||
resolver.next(true);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
// **************************************************************************
|
||||
|
|
@ -8,9 +9,10 @@
|
|||
// coverage:ignore-file
|
||||
|
||||
// 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:collection/collection.dart' as _i23;
|
||||
import 'package:fladder/models/item_base_model.dart' as _i19;
|
||||
import 'package:fladder/models/items/photos_model.dart' as _i22;
|
||||
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/syncing/synced_screen.dart' as _i17;
|
||||
import 'package:flutter/foundation.dart' as _i20;
|
||||
import 'package:flutter/material.dart' as _i24;
|
||||
import 'package:flutter/material.dart' as _i25;
|
||||
|
||||
/// generated route for
|
||||
/// [_i1.AboutSettingsPage]
|
||||
class AboutSettingsRoute extends _i18.PageRouteInfo<void> {
|
||||
const AboutSettingsRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
AboutSettingsRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(AboutSettingsRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'AboutSettingsRoute';
|
||||
|
||||
|
|
@ -60,10 +59,7 @@ class AboutSettingsRoute extends _i18.PageRouteInfo<void> {
|
|||
/// [_i2.ClientSettingsPage]
|
||||
class ClientSettingsRoute extends _i18.PageRouteInfo<void> {
|
||||
const ClientSettingsRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
ClientSettingsRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(ClientSettingsRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ClientSettingsRoute';
|
||||
|
||||
|
|
@ -79,10 +75,7 @@ class ClientSettingsRoute extends _i18.PageRouteInfo<void> {
|
|||
/// [_i3.DashboardScreen]
|
||||
class DashboardRoute extends _i18.PageRouteInfo<void> {
|
||||
const DashboardRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
DashboardRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(DashboardRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'DashboardRoute';
|
||||
|
||||
|
|
@ -104,11 +97,7 @@ class DetailsRoute extends _i18.PageRouteInfo<DetailsRouteArgs> {
|
|||
List<_i18.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
DetailsRoute.name,
|
||||
args: DetailsRouteArgs(
|
||||
id: id,
|
||||
item: item,
|
||||
key: key,
|
||||
),
|
||||
args: DetailsRouteArgs(id: id, item: item, key: key),
|
||||
rawQueryParams: {'id': id},
|
||||
initialChildren: children,
|
||||
);
|
||||
|
|
@ -120,26 +109,15 @@ class DetailsRoute extends _i18.PageRouteInfo<DetailsRouteArgs> {
|
|||
builder: (data) {
|
||||
final queryParams = data.queryParams;
|
||||
final args = data.argsAs<DetailsRouteArgs>(
|
||||
orElse: () => DetailsRouteArgs(
|
||||
id: queryParams.getString(
|
||||
'id',
|
||||
'',
|
||||
)));
|
||||
return _i4.DetailsScreen(
|
||||
id: args.id,
|
||||
item: args.item,
|
||||
key: args.key,
|
||||
orElse: () => DetailsRouteArgs(id: queryParams.getString('id', '')),
|
||||
);
|
||||
return _i4.DetailsScreen(id: args.id, item: args.item, key: args.key);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class DetailsRouteArgs {
|
||||
const DetailsRouteArgs({
|
||||
this.id = '',
|
||||
this.item,
|
||||
this.key,
|
||||
});
|
||||
const DetailsRouteArgs({this.id = '', this.item, this.key});
|
||||
|
||||
final String id;
|
||||
|
||||
|
|
@ -151,16 +129,23 @@ class DetailsRouteArgs {
|
|||
String toString() {
|
||||
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
|
||||
/// [_i5.FavouritesScreen]
|
||||
class FavouritesRoute extends _i18.PageRouteInfo<void> {
|
||||
const FavouritesRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
FavouritesRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(FavouritesRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'FavouritesRoute';
|
||||
|
||||
|
|
@ -176,10 +161,7 @@ class FavouritesRoute extends _i18.PageRouteInfo<void> {
|
|||
/// [_i6.HomeScreen]
|
||||
class HomeRoute extends _i18.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
HomeRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(HomeRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'HomeRoute';
|
||||
|
||||
|
|
@ -195,10 +177,7 @@ class HomeRoute extends _i18.PageRouteInfo<void> {
|
|||
/// [_i7.LibraryScreen]
|
||||
class LibraryRoute extends _i18.PageRouteInfo<void> {
|
||||
const LibraryRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
LibraryRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(LibraryRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LibraryRoute';
|
||||
|
||||
|
|
@ -256,7 +235,8 @@ class LibrarySearchRoute extends _i18.PageRouteInfo<LibrarySearchRouteArgs> {
|
|||
favourites: queryParams.optBool('favourites'),
|
||||
sortOrder: queryParams.get('sortOrder'),
|
||||
sortingOptions: queryParams.get('sortOptions'),
|
||||
));
|
||||
),
|
||||
);
|
||||
return _i8.LibrarySearchScreen(
|
||||
viewModelId: args.viewModelId,
|
||||
folderId: args.folderId,
|
||||
|
|
@ -299,16 +279,36 @@ class LibrarySearchRouteArgs {
|
|||
String toString() {
|
||||
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
|
||||
/// [_i9.LockScreen]
|
||||
class LockRoute extends _i18.PageRouteInfo<void> {
|
||||
const LockRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
LockRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(LockRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LockRoute';
|
||||
|
||||
|
|
@ -324,10 +324,7 @@ class LockRoute extends _i18.PageRouteInfo<void> {
|
|||
/// [_i10.LoginScreen]
|
||||
class LoginRoute extends _i18.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
LoginRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(LoginRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LoginRoute';
|
||||
|
||||
|
|
@ -345,8 +342,8 @@ class PhotoViewerRoute extends _i18.PageRouteInfo<PhotoViewerRouteArgs> {
|
|||
PhotoViewerRoute({
|
||||
List<_i22.PhotoModel>? items,
|
||||
String? selected,
|
||||
_i23.Future<List<_i22.PhotoModel>>? loadingItems,
|
||||
_i24.Key? key,
|
||||
_i24.Future<List<_i22.PhotoModel>>? loadingItems,
|
||||
_i25.Key? key,
|
||||
List<_i18.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
PhotoViewerRoute.name,
|
||||
|
|
@ -367,8 +364,9 @@ class PhotoViewerRoute extends _i18.PageRouteInfo<PhotoViewerRouteArgs> {
|
|||
builder: (data) {
|
||||
final queryParams = data.queryParams;
|
||||
final args = data.argsAs<PhotoViewerRouteArgs>(
|
||||
orElse: () => PhotoViewerRouteArgs(
|
||||
selected: queryParams.optString('selectedId')));
|
||||
orElse: () =>
|
||||
PhotoViewerRouteArgs(selected: queryParams.optString('selectedId')),
|
||||
);
|
||||
return _i11.PhotoViewerScreen(
|
||||
items: args.items,
|
||||
selected: args.selected,
|
||||
|
|
@ -391,24 +389,38 @@ class PhotoViewerRouteArgs {
|
|||
|
||||
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
|
||||
String toString() {
|
||||
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
|
||||
/// [_i12.PlayerSettingsPage]
|
||||
class PlayerSettingsRoute extends _i18.PageRouteInfo<void> {
|
||||
const PlayerSettingsRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
PlayerSettingsRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(PlayerSettingsRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'PlayerSettingsRoute';
|
||||
|
||||
|
|
@ -424,10 +436,7 @@ class PlayerSettingsRoute extends _i18.PageRouteInfo<void> {
|
|||
/// [_i13.SecuritySettingsPage]
|
||||
class SecuritySettingsRoute extends _i18.PageRouteInfo<void> {
|
||||
const SecuritySettingsRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
SecuritySettingsRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(SecuritySettingsRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SecuritySettingsRoute';
|
||||
|
||||
|
|
@ -443,10 +452,7 @@ class SecuritySettingsRoute extends _i18.PageRouteInfo<void> {
|
|||
/// [_i14.SettingsScreen]
|
||||
class SettingsRoute extends _i18.PageRouteInfo<void> {
|
||||
const SettingsRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
SettingsRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(SettingsRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SettingsRoute';
|
||||
|
||||
|
|
@ -462,10 +468,7 @@ class SettingsRoute extends _i18.PageRouteInfo<void> {
|
|||
/// [_i15.SettingsSelectionScreen]
|
||||
class SettingsSelectionRoute extends _i18.PageRouteInfo<void> {
|
||||
const SettingsSelectionRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(
|
||||
SettingsSelectionRoute.name,
|
||||
initialChildren: children,
|
||||
);
|
||||
: super(SettingsSelectionRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SettingsSelectionRoute';
|
||||
|
||||
|
|
@ -482,14 +485,11 @@ class SettingsSelectionRoute extends _i18.PageRouteInfo<void> {
|
|||
class SplashRoute extends _i18.PageRouteInfo<SplashRouteArgs> {
|
||||
SplashRoute({
|
||||
dynamic Function(bool)? loggedIn,
|
||||
_i24.Key? key,
|
||||
_i25.Key? key,
|
||||
List<_i18.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
SplashRoute.name,
|
||||
args: SplashRouteArgs(
|
||||
loggedIn: loggedIn,
|
||||
key: key,
|
||||
),
|
||||
args: SplashRouteArgs(loggedIn: loggedIn, key: key),
|
||||
initialChildren: children,
|
||||
);
|
||||
|
||||
|
|
@ -498,37 +498,42 @@ class SplashRoute extends _i18.PageRouteInfo<SplashRouteArgs> {
|
|||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args =
|
||||
data.argsAs<SplashRouteArgs>(orElse: () => const SplashRouteArgs());
|
||||
return _i16.SplashScreen(
|
||||
loggedIn: args.loggedIn,
|
||||
key: args.key,
|
||||
final args = data.argsAs<SplashRouteArgs>(
|
||||
orElse: () => const SplashRouteArgs(),
|
||||
);
|
||||
return _i16.SplashScreen(loggedIn: args.loggedIn, key: args.key);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class SplashRouteArgs {
|
||||
const SplashRouteArgs({
|
||||
this.loggedIn,
|
||||
this.key,
|
||||
});
|
||||
const SplashRouteArgs({this.loggedIn, this.key});
|
||||
|
||||
final dynamic Function(bool)? loggedIn;
|
||||
|
||||
final _i24.Key? key;
|
||||
final _i25.Key? key;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
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
|
||||
/// [_i17.SyncedScreen]
|
||||
class SyncedRoute extends _i18.PageRouteInfo<SyncedRouteArgs> {
|
||||
SyncedRoute({
|
||||
_i24.ScrollController? navigationScrollController,
|
||||
_i25.ScrollController? navigationScrollController,
|
||||
_i20.Key? key,
|
||||
List<_i18.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
|
|
@ -545,8 +550,9 @@ class SyncedRoute extends _i18.PageRouteInfo<SyncedRouteArgs> {
|
|||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args =
|
||||
data.argsAs<SyncedRouteArgs>(orElse: () => const SyncedRouteArgs());
|
||||
final args = data.argsAs<SyncedRouteArgs>(
|
||||
orElse: () => const SyncedRouteArgs(),
|
||||
);
|
||||
return _i17.SyncedScreen(
|
||||
navigationScrollController: args.navigationScrollController,
|
||||
key: args.key,
|
||||
|
|
@ -556,12 +562,9 @@ class SyncedRoute extends _i18.PageRouteInfo<SyncedRouteArgs> {
|
|||
}
|
||||
|
||||
class SyncedRouteArgs {
|
||||
const SyncedRouteArgs({
|
||||
this.navigationScrollController,
|
||||
this.key,
|
||||
});
|
||||
const SyncedRouteArgs({this.navigationScrollController, this.key});
|
||||
|
||||
final _i24.ScrollController? navigationScrollController;
|
||||
final _i25.ScrollController? navigationScrollController;
|
||||
|
||||
final _i20.Key? key;
|
||||
|
||||
|
|
@ -569,4 +572,15 @@ class SyncedRouteArgs {
|
|||
String toString() {
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,14 +173,16 @@ class _LibraryFilterChipsState extends ConsumerState<LibraryFilterChips> {
|
|||
children: [
|
||||
Text(context.localized.groupBy),
|
||||
...GroupBy.values.map(
|
||||
(group) => RadioListTile.adaptive(
|
||||
value: group,
|
||||
(group) => RadioGroup(
|
||||
groupValue: groupBy,
|
||||
title: Text(group.value(context)),
|
||||
onChanged: (_) {
|
||||
provider.setGroupBy(group);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: RadioListTile.adaptive(
|
||||
value: group,
|
||||
title: Text(group.value(context)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:fladder/models/library_search/library_search_options.dart';
|
||||
import 'package:fladder/providers/library_search_provider.dart';
|
||||
import 'package:fladder/util/localization_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDialogue(
|
||||
BuildContext context, {
|
||||
|
|
@ -27,9 +28,7 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
|
|||
child: Text(context.localized.sortBy, style: Theme.of(context).textTheme.titleLarge),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
...SortingOptions.values.map((e) => RadioListTile.adaptive(
|
||||
value: e,
|
||||
title: Text(e.label(context)),
|
||||
...SortingOptions.values.map((e) => RadioGroup(
|
||||
groupValue: newSortingOptions,
|
||||
onChanged: (value) {
|
||||
state(
|
||||
|
|
@ -38,6 +37,10 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
|
|||
},
|
||||
);
|
||||
},
|
||||
child: RadioListTile.adaptive(
|
||||
value: e,
|
||||
title: Text(e.label(context)),
|
||||
),
|
||||
)),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 8),
|
||||
|
|
@ -49,9 +52,7 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
...SortingOrder.values.map(
|
||||
(e) => RadioListTile.adaptive(
|
||||
value: e,
|
||||
title: Text(e.label(context)),
|
||||
(e) => RadioGroup(
|
||||
groupValue: newSortOrder,
|
||||
onChanged: (value) {
|
||||
state(
|
||||
|
|
@ -60,6 +61,10 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
|
|||
},
|
||||
);
|
||||
},
|
||||
child: RadioListTile.adaptive(
|
||||
value: e,
|
||||
title: Text(e.label(context)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class _LockScreenState extends ConsumerState<LockScreen> with WidgetsBindingObse
|
|||
void handleLogin(AccountModel user) {
|
||||
ref.read(lockScreenActiveProvider.notifier).update((state) => false);
|
||||
poppingLockScreen = true;
|
||||
context.router.popForced();
|
||||
context.router.pop();
|
||||
}
|
||||
|
||||
void tapLoggedInAccount(AccountModel user) async {
|
||||
|
|
|
|||
|
|
@ -24,13 +24,15 @@ List<Widget> buildClientSettingsTheme(BuildContext context, WidgetRef ref) {
|
|||
items: ThemeMode.values,
|
||||
selected: [ref.read(clientSettingsProvider.select((value) => value.themeMode))],
|
||||
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,
|
||||
title: Text(type.label(context)),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
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],
|
||||
selected: [(ref.read(clientSettingsProvider.select((value) => value.themeColor)))],
|
||||
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)),
|
||||
child: RadioListTile<ColorThemes?>(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
value: type,
|
||||
onChanged: (value) => tap(),
|
||||
title: Row(
|
||||
children: [
|
||||
Container(
|
||||
|
|
@ -78,6 +81,7 @@ List<Widget> buildClientSettingsTheme(BuildContext context, WidgetRef ref) {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SettingsListTile(
|
||||
label: Text(context.localized.clientSettingsSchemeVariantTitle),
|
||||
subLabel: Text(clientSettings.schemeVariant.label(context)),
|
||||
|
|
@ -88,13 +92,15 @@ List<Widget> buildClientSettingsTheme(BuildContext context, WidgetRef ref) {
|
|||
items: DynamicSchemeVariant.values,
|
||||
selected: [(ref.read(clientSettingsProvider.select((value) => value.schemeVariant)))],
|
||||
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,
|
||||
child: RadioListTile<DynamicSchemeVariant>(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
value: type,
|
||||
onChanged: (value) => tap(),
|
||||
title: Text(type.label(context)),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class SettingsScaffold extends ConsumerWidget {
|
|||
if (AdaptiveLayout.layoutModeOf(context) == LayoutMode.single && context.tabsRouter.activeIndex != 0) {
|
||||
context.tabsRouter.setActiveIndex(0);
|
||||
} else {
|
||||
context.router.popForced();
|
||||
context.router.pop();
|
||||
}
|
||||
} else {
|
||||
context.router.popBack();
|
||||
|
|
|
|||
|
|
@ -70,10 +70,6 @@ class _SyncedScreenState extends ConsumerState<SyncedScreen> {
|
|||
onPressed: () => ref.read(syncProvider.notifier).removeAllSyncedData(),
|
||||
child: const Text("Clear drift database"),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () => ref.read(syncProvider.notifier).migrateFromIsar(),
|
||||
child: const Text("Migrate Isar to Drift"),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -42,8 +42,7 @@ class _QualityOptionsDialogue extends ConsumerWidget {
|
|||
shrinkWrap: true,
|
||||
children: qualityOptions?.entries
|
||||
.map(
|
||||
(entry) => RadioListTile(
|
||||
value: entry.value,
|
||||
(entry) => RadioGroup(
|
||||
groupValue: true,
|
||||
onChanged: (value) async {
|
||||
final newModel = await playbackModel?.setQualityOption(
|
||||
|
|
@ -57,8 +56,10 @@ class _QualityOptionsDialogue extends ConsumerWidget {
|
|||
}
|
||||
context.router.maybePop();
|
||||
},
|
||||
child: RadioListTile(
|
||||
value: entry.value,
|
||||
title: Text(entry.key.label(context)),
|
||||
),
|
||||
)),
|
||||
)
|
||||
.toList() ??
|
||||
[],
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ final applicationInfoProvider = StateProvider<ApplicationInfo>((ref) {
|
|||
});
|
||||
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
class ApplicationInfo with _$ApplicationInfo {
|
||||
abstract class ApplicationInfo with _$ApplicationInfo {
|
||||
const ApplicationInfo._();
|
||||
|
||||
factory ApplicationInfo({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
|
|
@ -9,23 +9,183 @@ part of 'application_info.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ApplicationInfo {
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
String get version => throw _privateConstructorUsedError;
|
||||
String get buildNumber => throw _privateConstructorUsedError;
|
||||
String get os => throw _privateConstructorUsedError;
|
||||
String get name;
|
||||
String get version;
|
||||
String get buildNumber;
|
||||
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
|
||||
|
||||
class _$ApplicationInfoImpl extends _ApplicationInfo {
|
||||
_$ApplicationInfoImpl(
|
||||
class _ApplicationInfo extends ApplicationInfo {
|
||||
_ApplicationInfo(
|
||||
{required this.name,
|
||||
required this.version,
|
||||
required this.buildNumber,
|
||||
|
|
@ -42,20 +202,4 @@ class _$ApplicationInfoImpl extends _ApplicationInfo {
|
|||
final String os;
|
||||
}
|
||||
|
||||
abstract class _ApplicationInfo extends ApplicationInfo {
|
||||
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;
|
||||
}
|
||||
// dart format on
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
// }
|
||||
}
|
||||
|
|
@ -9,7 +9,6 @@
|
|||
#include <desktop_drop/desktop_drop_plugin.h>
|
||||
#include <dynamic_color/dynamic_color_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_video/media_kit_video_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 =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FvpPlugin");
|
||||
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 =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin");
|
||||
media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||
desktop_drop
|
||||
dynamic_color
|
||||
fvp
|
||||
isar_flutter_libs
|
||||
media_kit_libs_linux
|
||||
media_kit_video
|
||||
screen_retriever_linux
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import desktop_drop
|
|||
import dynamic_color
|
||||
import file_picker
|
||||
import fvp
|
||||
import isar_flutter_libs
|
||||
import just_audio
|
||||
import local_auth_darwin
|
||||
import media_kit_libs_macos_video
|
||||
|
|
@ -40,7 +39,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
||||
FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin"))
|
||||
FvpPlugin.register(with: registry.registrar(forPlugin: "FvpPlugin"))
|
||||
IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin"))
|
||||
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
|
||||
LocalAuthPlugin.register(with: registry.registrar(forPlugin: "LocalAuthPlugin"))
|
||||
MediaKitLibsMacosVideoPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosVideoPlugin"))
|
||||
|
|
|
|||
415
pubspec.lock
415
pubspec.lock
|
|
@ -5,31 +5,26 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab"
|
||||
sha256: da0d9209ca76bde579f2da330aeb9df62b6319c834fa7baae052021b0462401f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "76.0.0"
|
||||
_macros:
|
||||
dependency: transitive
|
||||
description: dart
|
||||
source: sdk
|
||||
version: "0.3.3"
|
||||
version: "85.0.0"
|
||||
analyzer:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer
|
||||
sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e"
|
||||
sha256: f4ad0fea5f102201015c9aae9d93bc02f75dd9491529a8c21f88d17a8523d44c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.11.0"
|
||||
version: "7.6.0"
|
||||
analyzer_plugin:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer_plugin
|
||||
sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161"
|
||||
sha256: a5ab7590c27b779f3d4de67f31c4109dbe13dd7339f86461a6f2a8ab2594d8ce
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.11.3"
|
||||
version: "0.13.4"
|
||||
animations:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -106,18 +101,18 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: auto_route
|
||||
sha256: "1d1bd908a1fec327719326d5d0791edd37f16caff6493c01003689fb03315ad7"
|
||||
sha256: c820e918863a03544aac68eaf61e17c8a6126b663d7cad24a8fd3657a1e6be61
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.3.0+1"
|
||||
version: "10.1.2"
|
||||
auto_route_generator:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: auto_route_generator
|
||||
sha256: c9086eb07271e51b44071ad5cff34e889f3156710b964a308c2ab590769e79e6
|
||||
sha256: "2a5b5bf9c55d4a2098931037dac90921a4663808aed494bb4f134d82d46cb8ec"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.0.0"
|
||||
version: "10.2.3"
|
||||
automatic_animated_list:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -210,10 +205,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: built_value
|
||||
sha256: "0b1b12a0a549605e5f04476031cd0bc91ead1d7c8e830773a18ee54179b3cb62"
|
||||
sha256: ba95c961bafcd8686d1cf63be864eb59447e795e124d98d6a27d91fcd13602fb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.11.0"
|
||||
version: "8.11.1"
|
||||
cached_network_image:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -274,10 +269,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: chopper
|
||||
sha256: f366529b450d0fd91931b08339c7c1d09c746d0d20e5ffb8c8641a79b6114dc2
|
||||
sha256: "35cde96292178809ca4290f42dbb83d832551333c2b18a2226a2538103ab40d3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.2.0"
|
||||
version: "8.3.0"
|
||||
chopper_generator:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
|
@ -294,6 +289,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -330,10 +333,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: connectivity_plus
|
||||
sha256: "051849e2bd7c7b3bc5844ea0d096609ddc3a859890ec3a9ac4a65a2620cc1f99"
|
||||
sha256: b5e72753cf63becce2c61fd04dfe0f1c430cc5278b53a1342dc5ad839eab29ec
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.4"
|
||||
version: "6.1.5"
|
||||
connectivity_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -350,6 +353,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
coverage:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: coverage
|
||||
sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.15.0"
|
||||
cross_file:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -386,50 +397,50 @@ packages:
|
|||
dependency: "direct dev"
|
||||
description:
|
||||
name: custom_lint
|
||||
sha256: "3486c470bb93313a9417f926c7dd694a2e349220992d7b9d14534dc49c15bba9"
|
||||
sha256: "9656925637516c5cf0f5da018b33df94025af2088fe09c8ae2ca54c53f2d9a84"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.0"
|
||||
version: "0.7.6"
|
||||
custom_lint_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: custom_lint_core
|
||||
sha256: "02450c3e45e2a6e8b26c4d16687596ab3c4644dd5792e3313aa9ceba5a49b7f5"
|
||||
sha256: "31110af3dde9d29fb10828ca33f1dce24d2798477b167675543ce3d208dee8be"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.0"
|
||||
version: "0.7.5"
|
||||
custom_lint_visitor:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: custom_lint_visitor
|
||||
sha256: bfe9b7a09c4775a587b58d10ebb871d4fe618237639b1e84d5ec62d7dfef25f9
|
||||
sha256: "4a86a0d8415a91fbb8298d6ef03e9034dc8e323a599ddc4120a0e36c433983a2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0+6.11.0"
|
||||
version: "1.0.0+7.7.0"
|
||||
dart_mappable:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dart_mappable
|
||||
sha256: "2255b2c00e328a65fef5a8df2dabfc0dc9c2e518c33a50051a4519b1c7a28c48"
|
||||
sha256: "15f41a35da8ee690bbfa0059fa241edeeaea73f89a2ba685b354ece07cd8ada6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.5.0"
|
||||
version: "4.6.0"
|
||||
dart_mappable_builder:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: dart_mappable_builder
|
||||
sha256: b3673a6d190f2ea766b39ea298d4c55d1caca9382a536cf164ffe7e2f955c501
|
||||
sha256: adea8c55aac73c8254aa14a8272b788eb0f72799dd8e4810a9b664ec9b4e353c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.3.1+1"
|
||||
version: "4.5.0"
|
||||
dart_style:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dart_style
|
||||
sha256: "7306ab8a2359a48d22310ad823521d723acfed60ee1f7e37388e8986853b6820"
|
||||
sha256: "8a0e5fba27e8ee025d2ffb4ee820b4e6e2cf5e4246a6b1a477eb66866947e0bb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.8"
|
||||
version: "3.1.1"
|
||||
db_viewer:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -474,10 +485,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: drift
|
||||
sha256: b584ddeb2b74436735dd2cf746d2d021e19a9a6770f409212fd5cbc2814ada85
|
||||
sha256: "6aaea757f53bb035e8a3baedf3d1d53a79d6549a6c13d84f7546509da9372c7c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.26.1"
|
||||
version: "2.28.1"
|
||||
drift_db_viewer:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -490,10 +501,10 @@ packages:
|
|||
dependency: "direct dev"
|
||||
description:
|
||||
name: drift_dev
|
||||
sha256: "0d3f8b33b76cf1c6a82ee34d9511c40957549c4674b8f1688609e6d6c7306588"
|
||||
sha256: "68c138e884527d2bd61df2ade276c3a144df84d1adeb0ab8f3196b5afe021bd4"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.26.0"
|
||||
version: "2.28.0"
|
||||
drift_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -514,10 +525,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: dynamic_color
|
||||
sha256: eae98052fa6e2826bdac3dd2e921c6ce2903be15c6b7f8b6d8a5d49b5086298d
|
||||
sha256: "43a5a6679649a7731ab860334a5812f2067c2d9ce6452cf069c5e0c25336c17c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.7.0"
|
||||
version: "1.8.1"
|
||||
equatable:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -570,10 +581,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: file_picker
|
||||
sha256: ef9908739bdd9c476353d6adff72e88fd00c625f5b959ae23f7567bd5137db0a
|
||||
sha256: e7e16c9d15c36330b94ca0e2ad8cb61f93cd5282d0158c09805aed13b5452f22
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.2.0"
|
||||
version: "10.3.2"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -724,10 +735,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: flutter_plugin_android_lifecycle
|
||||
sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e
|
||||
sha256: "6382ce712ff69b0f719640ce957559dde459e55ecd433c767e06d139ddf16cab"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.28"
|
||||
version: "2.0.29"
|
||||
flutter_riverpod:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -740,10 +751,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: flutter_rust_bridge
|
||||
sha256: "0ad5079de35d317650fec59b26cb4d0c116ebc2ce703a29f9367513b8a91c287"
|
||||
sha256: "37ef40bc6f863652e865f0b2563ea07f0d3c58d8efad803cc01933a4b2ee067e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.0"
|
||||
version: "2.11.1"
|
||||
flutter_staggered_grid_view:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -806,26 +817,26 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: font_awesome_flutter
|
||||
sha256: d3a89184101baec7f4600d58840a764d2ef760fe1c5a20ef9e6b0e9b24a07a3a
|
||||
sha256: "27af5982e6c510dec1ba038eff634fa284676ee84e3fd807225c80c4ad869177"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.8.0"
|
||||
version: "10.10.0"
|
||||
freezed:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: freezed
|
||||
sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e"
|
||||
sha256: "2d399f823b8849663744d2a9ddcce01c49268fb4170d0442a655bf6a2f47be22"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.7"
|
||||
version: "3.1.0"
|
||||
freezed_annotation:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: freezed_annotation
|
||||
sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2
|
||||
sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.4"
|
||||
version: "3.1.0"
|
||||
frontend_server_client:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -938,6 +949,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.0"
|
||||
hotreloader:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: hotreloader
|
||||
sha256: bc167a1163807b03bada490bfe2df25b0d744df359227880220a5cbd04e5734b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.3.0"
|
||||
html:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -950,10 +969,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: http
|
||||
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
|
||||
sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.5.0"
|
||||
http2:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -990,10 +1009,10 @@ packages:
|
|||
dependency: "direct dev"
|
||||
description:
|
||||
name: icons_launcher
|
||||
sha256: "2949eef3d336028d89133f69ef221d877e09deed04ebd8e738ab4a427850a7a2"
|
||||
sha256: e6d806458fac6d3b1126ad757b4208a314ba775b3c8119cd88877091379edc7a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "3.0.2"
|
||||
iconsax_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1026,30 +1045,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||
sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.7"
|
||||
version: "0.7.2"
|
||||
json_annotation:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1062,10 +1065,10 @@ packages:
|
|||
dependency: "direct dev"
|
||||
description:
|
||||
name: json_serializable
|
||||
sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c
|
||||
sha256: c50ef5fc083d5b5e12eef489503ba3bf5ccc899e487d691584699b4bdefeea8c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.9.0"
|
||||
version: "6.9.5"
|
||||
just_audio:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1078,10 +1081,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: just_audio_platform_interface
|
||||
sha256: "4cd94536af0219fa306205a58e78d67e02b0555283c1c094ee41e402a14a5c4a"
|
||||
sha256: "2532c8d6702528824445921c5ff10548b518b13f808c2e34c2fd54793b999a6a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.5.0"
|
||||
version: "4.6.0"
|
||||
just_audio_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1094,26 +1097,34 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
|
||||
sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.9"
|
||||
version: "11.0.1"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
|
||||
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.9"
|
||||
version: "3.0.10"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
|
||||
url: "https://pub.dev"
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1134,18 +1145,18 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: local_auth_android
|
||||
sha256: "82b2bdeee2199a510d3b7716121e96a6609da86693bb0863edd8566355406b79"
|
||||
sha256: "316503f6772dea9c0c038bb7aac4f68ab00112d707d258c770f7fc3c250a2d88"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.50"
|
||||
version: "1.0.51"
|
||||
local_auth_darwin:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: local_auth_darwin
|
||||
sha256: "25163ce60a5a6c468cf7a0e3dc8a165f824cabc2aa9e39a5e9fc5c2311b7686f"
|
||||
sha256: "0e9706a8543a4a2eee60346294d6a633dd7c3ee60fae6b752570457c4ff32055"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
version: "1.6.0"
|
||||
local_auth_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1170,14 +1181,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1306,6 +1309,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1334,18 +1345,18 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info_plus
|
||||
sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191"
|
||||
sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.3.0"
|
||||
version: "8.3.1"
|
||||
package_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_info_plus_platform_interface
|
||||
sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c"
|
||||
sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
version: "3.2.1"
|
||||
page_transition:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1390,10 +1401,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_foundation
|
||||
sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942"
|
||||
sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
version: "2.4.2"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1494,18 +1505,18 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: protobuf
|
||||
sha256: "6153efcc92a06910918f3db8231fd2cf828ac81e50ebd87adc8f8a8cb3caff0e"
|
||||
sha256: de9c9eb2c33f8e933a42932fe1dc504800ca45ebc3d673e6ed7f39754ee4053e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.1"
|
||||
version: "4.2.0"
|
||||
provider:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: provider
|
||||
sha256: "4abbd070a04e9ddc287673bf5a030c7ca8b685ff70218720abab8b092f53dd84"
|
||||
sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.5"
|
||||
version: "6.1.5+1"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1526,10 +1537,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: qs_dart
|
||||
sha256: "42a7ca80f965786d8d0730633b7cf05c132ebcb9558e04dbc8752f2865caa705"
|
||||
sha256: ffeb30c6a0999a9b62ab372d4780437339d75036e6eedb9685727cca70d72bca
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.9"
|
||||
version: "1.5.4"
|
||||
rational:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1546,22 +1557,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: reorderable_grid
|
||||
sha256: "0b9cd95ef0f070ef99f92affe9cf85a4aa127099cd1334e5940950ce58cd981d"
|
||||
sha256: c7d2e1f2e032a8fffe121f9da828546ee58db35c9c7d19d7a2d189dea2f9939d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.10"
|
||||
version: "1.0.12"
|
||||
riverpod:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1574,10 +1577,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: riverpod_analyzer_utils
|
||||
sha256: c6b8222b2b483cb87ae77ad147d6408f400c64f060df7a225b127f4afef4f8c8
|
||||
sha256: "03a17170088c63aab6c54c44456f5ab78876a1ddb6032ffde1662ddab4959611"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.8"
|
||||
version: "0.5.10"
|
||||
riverpod_annotation:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1590,10 +1593,10 @@ packages:
|
|||
dependency: "direct dev"
|
||||
description:
|
||||
name: riverpod_generator
|
||||
sha256: "63546d70952015f0981361636bf8f356d9cfd9d7f6f0815e3c07789a41233188"
|
||||
sha256: "44a0992d54473eb199ede00e2260bd3c262a86560e3c6f6374503d86d0580e36"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.6.3"
|
||||
version: "2.6.5"
|
||||
rxdart:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1614,18 +1617,18 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: screen_brightness
|
||||
sha256: f9bcfd7029d81aa2ba960f8c67a51427c721796f7f4eea02bc2bb84c41205ad7
|
||||
sha256: "5f70754028f169f059fdc61112a19dcbee152f8b293c42c848317854d650cba3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.5"
|
||||
version: "2.1.7"
|
||||
screen_brightness_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: screen_brightness_android
|
||||
sha256: fb5fa43cb89d0c9b8534556c427db1e97e46594ac5d66ebdcf16063b773d54ed
|
||||
sha256: d34f5321abd03bc3474f4c381f53d189117eba0b039eac1916aa92cca5fd0a96
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
version: "2.1.3"
|
||||
screen_brightness_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1646,10 +1649,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: screen_brightness_ohos
|
||||
sha256: "61e313e46eaee3f83dd4e85a2a91f8a81be02c154bc9e60830a7c0fd76dac286"
|
||||
sha256: a93a263dcd39b5c56e589eb495bcd001ce65cdd96ff12ab1350683559d5c5bb7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.2"
|
||||
screen_brightness_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1718,18 +1721,18 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: share_plus
|
||||
sha256: b2961506569e28948d75ec346c28775bb111986bb69dc6a20754a457e3d97fa0
|
||||
sha256: d7dc0630a923883c6328ca31b89aa682bacbf2f8304162d29f7c6aaff03a27a1
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.0.0"
|
||||
version: "11.1.0"
|
||||
share_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: share_plus_platform_interface
|
||||
sha256: "1032d392bc5d2095a77447a805aa3f804d2ae6a4d5eef5e6ebb3bd94c1bc19ef"
|
||||
sha256: "88023e53a13429bd65d8e85e11a9b484f49d4c190abbd96c7932b74d6927cc9a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
version: "6.1.0"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1742,10 +1745,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac"
|
||||
sha256: "5bcf0772a761b04f8c6bf814721713de6f3e5d9d89caf8d3fe031b02a342379e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.10"
|
||||
version: "2.4.11"
|
||||
shared_preferences_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1794,6 +1797,22 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1819,26 +1838,42 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: smtc_windows
|
||||
sha256: "80f7c10867da485ffdf87f842bf27e6763589933c18c11af5dc1cd1e158c3154"
|
||||
sha256: dee279b0ddf663c4c729a88bca4e57fb4861aa1b3d01e230bdbf1277b8bfe664
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "1.1.0"
|
||||
source_gen:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_gen
|
||||
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
|
||||
sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
version: "2.0.0"
|
||||
source_helper:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_helper
|
||||
sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c"
|
||||
sha256: a447acb083d3a5ef17f983dd36201aeea33fedadb3228fa831f2f0c92f0f3aca
|
||||
url: "https://pub.dev"
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1867,18 +1902,18 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: sqflite_android
|
||||
sha256: "2b3070c5fa881839f8b402ee4a39c1b4d561704d4ebbbcfb808a119bc2a1701b"
|
||||
sha256: ecd684501ebc2ae9a83536e8b15731642b9570dc8623e0073d227d0ee2bfea88
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
version: "2.4.2+2"
|
||||
sqflite_common:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqflite_common
|
||||
sha256: "84731e8bfd8303a3389903e01fb2141b6e59b5973cacbb0929021df08dddbe8b"
|
||||
sha256: "6ef422a4525ecc601db6c0a2233ff448c731307906e92cabc9ba292afaae16a6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.5"
|
||||
version: "2.5.6"
|
||||
sqflite_darwin:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1899,18 +1934,18 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: sqlite3
|
||||
sha256: "608b56d594e4c8498c972c8f1507209f9fd74939971b948ddbbfbfd1c9cb3c15"
|
||||
sha256: f393d92c71bdcc118d6203d07c991b9be0f84b1a6f89dd4f7eed348131329924
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.7.7"
|
||||
version: "2.9.0"
|
||||
sqlite3_flutter_libs:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sqlite3_flutter_libs
|
||||
sha256: "60464aa06f3f6f6fba9abd7564e315526c1fee6d6a77d6ee52a1f7f48a9107f6"
|
||||
sha256: "2b03273e71867a8a4d030861fc21706200debe5c5858a4b9e58f4a1c129586a4"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.37"
|
||||
version: "0.5.39"
|
||||
sqlparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1979,10 +2014,10 @@ packages:
|
|||
dependency: "direct dev"
|
||||
description:
|
||||
name: swagger_dart_code_generator
|
||||
sha256: e6fab279c2adb3f91aa170c9126601d22e1485217dddc1443cf3c05eb6480d45
|
||||
sha256: "64f10f8e2f38c2139b394d00381d69eae55d3bb42b6f524eb21f27145e60c671"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "3.0.3"
|
||||
synchronized:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1999,14 +2034,30 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
test:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test
|
||||
sha256: "65e29d831719be0591f7b3b1a32a3cda258ec98c58c7b25f7b84241bc31215bb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.26.2"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
|
||||
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
|
||||
url: "https://pub.dev"
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -2083,18 +2134,18 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
sha256: "8582d7f6fe14d2652b4c45c9b6c14c0b678c2af2d083a11b604caeba51930d79"
|
||||
sha256: "0aedad096a85b49df2e4725fa32118f9fa580f3b14af7a2d2221896a02cd5656"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.16"
|
||||
version: "6.3.17"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_ios
|
||||
sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb"
|
||||
sha256: d80b3f567a617cb923546034cc94bfe44eb15f989fe670b37f26abdb9d939cb7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.3"
|
||||
version: "6.3.4"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -2107,10 +2158,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_macos
|
||||
sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2"
|
||||
sha256: c043a77d6600ac9c38300567f33ef12b0ef4f4783a2c1f00231d2b1941fea13f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.2"
|
||||
version: "3.2.3"
|
||||
url_launcher_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -2171,18 +2222,18 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: vector_graphics_compiler
|
||||
sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331"
|
||||
sha256: ca81fdfaf62a5ab45d7296614aea108d2c7d0efca8393e96174bf4d51e6725b0
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.17"
|
||||
version: "1.1.18"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.2.0"
|
||||
video_player:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -2195,18 +2246,18 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: video_player_android
|
||||
sha256: "9d5af2d233ba69df803dcf2f31e66d9a4c6206f2d96178df06b09b0ec3056b39"
|
||||
sha256: "53f3b57c7ac88c18e6074d0f94c7146e128c515f0a4503c3061b8e71dea3a0f2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.8.9"
|
||||
version: "2.8.12"
|
||||
video_player_avfoundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_avfoundation
|
||||
sha256: "9fedd55023249f3a02738c195c906b4e530956191febf0838e37d0dac912f953"
|
||||
sha256: f9a780aac57802b2892f93787e5ea53b5f43cc57dc107bee9436458365be71cd
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.8.0"
|
||||
version: "2.8.4"
|
||||
video_player_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -2235,10 +2286,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
|
||||
sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "15.0.0"
|
||||
version: "15.0.2"
|
||||
volume_controller:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -2303,6 +2354,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -2315,26 +2374,26 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_android
|
||||
sha256: "9573ad97890d199ac3ab32399aa33a5412163b37feb573eb5b0a76b35e9ffe41"
|
||||
sha256: "0a42444056b24ed832bdf3442d65c5194f6416f7e782152384944053c2ecc9a3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.8.2"
|
||||
version: "4.10.0"
|
||||
webview_flutter_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_platform_interface
|
||||
sha256: f0dc2dc3a2b1e3a6abdd6801b9355ebfeb3b8f6cde6b9dc7c9235909c4a1f147
|
||||
sha256: "63d26ee3aca7256a83ccb576a50272edd7cfc80573a4305caa98985feb493ee0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.13.1"
|
||||
version: "2.14.0"
|
||||
webview_flutter_wkwebview:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_wkwebview
|
||||
sha256: "71523b9048cf510cfa1fd4e0a3fa5e476a66e0884d5df51d59d5023dba237107"
|
||||
sha256: fb46db8216131a3e55bcf44040ca808423539bc6732e7ed34fb6d8044e3d512f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.22.1"
|
||||
version: "3.23.0"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -2375,6 +2434,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.5.0"
|
||||
xxh3:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xxh3
|
||||
sha256: "399a0438f5d426785723c99da6b16e136f4953fb1e9db0bf270bd41dd4619916"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -2384,5 +2451,5 @@ packages:
|
|||
source: hosted
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.8.0 <4.0.0"
|
||||
dart: ">=3.9.0 <4.0.0"
|
||||
flutter: ">=3.32.0"
|
||||
|
|
|
|||
72
pubspec.yaml
72
pubspec.yaml
|
|
@ -40,11 +40,11 @@ dependencies:
|
|||
iconsax_plus: ^1.0.0
|
||||
|
||||
# Network and HTTP
|
||||
chopper: ^8.1.0
|
||||
chopper: ^8.3.0
|
||||
cached_network_image: ^3.4.1
|
||||
http: ^1.4.0
|
||||
http: ^1.5.0
|
||||
flutter_cache_manager: ^3.4.1
|
||||
connectivity_plus: ^6.1.4
|
||||
connectivity_plus: ^6.1.5
|
||||
|
||||
# State Management
|
||||
flutter_riverpod: ^2.6.1
|
||||
|
|
@ -52,7 +52,7 @@ dependencies:
|
|||
|
||||
# JSON and Serialization
|
||||
json_annotation: ^4.9.0
|
||||
freezed_annotation: ^2.4.4
|
||||
freezed_annotation: ^3.1.0
|
||||
|
||||
# Logging
|
||||
logging: ^1.3.0
|
||||
|
|
@ -73,8 +73,8 @@ dependencies:
|
|||
video_player: ^2.10.0
|
||||
|
||||
# UI Components
|
||||
dynamic_color: ^1.7.0
|
||||
flutter_svg: ^2.1.0
|
||||
dynamic_color: ^1.8.1
|
||||
flutter_svg: ^2.2.0
|
||||
animations: ^2.0.11
|
||||
automatic_animated_list: ^1.1.0
|
||||
page_transition: ^2.2.1
|
||||
|
|
@ -85,55 +85,49 @@ dependencies:
|
|||
flutter_blurhash: ^0.9.1
|
||||
extended_image: ^10.0.1
|
||||
flutter_widget_from_html: ^0.17.0
|
||||
font_awesome_flutter: ^10.8.0
|
||||
reorderable_grid: ^1.0.10
|
||||
font_awesome_flutter: ^10.9.1
|
||||
reorderable_grid: ^1.0.12
|
||||
overflow_view: ^0.5.0
|
||||
flutter_sticky_header: ^0.8.0
|
||||
markdown_widget: ^2.3.2+8
|
||||
|
||||
# Navigation
|
||||
auto_route: ^9.3.0+1
|
||||
url_launcher: ^6.3.1
|
||||
auto_route: ^10.1.2
|
||||
url_launcher: ^6.3.2
|
||||
flutter_custom_tabs: ^2.4.0
|
||||
|
||||
# Utility
|
||||
path: ^1.9.1
|
||||
file_picker: ^10.2.0
|
||||
file_picker: ^10.3.2
|
||||
transparent_image: ^2.0.1
|
||||
universal_html: ^2.2.4
|
||||
collection: ^1.19.1
|
||||
|
||||
# Device and System
|
||||
local_auth: ^2.3.0
|
||||
package_info_plus: ^8.3.0
|
||||
package_info_plus: ^8.3.1
|
||||
wakelock_plus: ^1.3.2
|
||||
screen_brightness: ^2.1.4
|
||||
window_manager: ^0.5.0
|
||||
smtc_windows: ^1.0.0
|
||||
background_downloader: ^9.2.2
|
||||
screen_brightness: ^2.1.7
|
||||
window_manager: ^0.5.1
|
||||
smtc_windows: ^1.1.0
|
||||
background_downloader: ^9.2.3
|
||||
screen_retriever: ^0.2.0
|
||||
|
||||
# Data
|
||||
isar:
|
||||
version: ^4.0.3
|
||||
hosted: https://pub.isar-community.dev/
|
||||
isar_flutter_libs: # contains Isar Core
|
||||
version: ^4.0.3
|
||||
hosted: https://pub.isar-community.dev/
|
||||
drift: ^2.28.1
|
||||
drift_flutter: ^0.2.5
|
||||
drift_sync: ^0.13.0
|
||||
drift_db_viewer: ^2.1.0
|
||||
|
||||
# Other
|
||||
async: ^2.13.0
|
||||
xid: ^1.2.1
|
||||
desktop_drop: ^0.6.0
|
||||
desktop_drop: ^0.6.1
|
||||
flexible_scrollbar: ^0.1.3
|
||||
flutter_typeahead: ^5.2.0
|
||||
share_plus: ^11.0.0
|
||||
share_plus: ^11.1.0
|
||||
archive: ^4.0.7
|
||||
dart_mappable: ^4.5.0
|
||||
drift: ^2.26.1
|
||||
drift_flutter: ^0.2.5
|
||||
drift_sync: ^0.13.0
|
||||
drift_db_viewer: ^2.1.0
|
||||
dart_mappable: ^4.6.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
@ -144,18 +138,18 @@ dev_dependencies:
|
|||
# activated in the `analysis_options.yaml` file located at the root of your
|
||||
# package. See that file for information about deactivating specific lint
|
||||
# rules and activating additional ones.
|
||||
drift_dev: ^2.26.0
|
||||
drift_dev: ^2.28.0
|
||||
flutter_lints: ^6.0.0
|
||||
build_runner: ^2.5.4
|
||||
chopper_generator: ^8.1.0
|
||||
json_serializable: ^6.9.0
|
||||
custom_lint: ^0.7.0
|
||||
freezed: ^2.5.7
|
||||
swagger_dart_code_generator: ^3.0.1
|
||||
riverpod_generator: ^2.6.3
|
||||
dart_mappable_builder: ^4.3.1+1
|
||||
auto_route_generator: ^9.0.0
|
||||
icons_launcher: ^3.0.1
|
||||
chopper_generator: ^8.2.0
|
||||
json_serializable: ^6.9.5
|
||||
custom_lint: ^0.7.6
|
||||
freezed: ^3.1.0
|
||||
swagger_dart_code_generator: ^3.0.3
|
||||
riverpod_generator: ^2.6.5
|
||||
dart_mappable_builder: ^4.5.0
|
||||
auto_route_generator: ^10.2.3
|
||||
icons_launcher: ^3.0.2
|
||||
|
||||
flutter:
|
||||
# The following line ensures that the Material Icons font is
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include <desktop_drop/desktop_drop_plugin.h>
|
||||
#include <dynamic_color/dynamic_color_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 <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>
|
||||
|
|
@ -31,8 +30,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||
FvpPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FvpPluginCApi"));
|
||||
IsarFlutterLibsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin"));
|
||||
LocalAuthPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("LocalAuthPlugin"));
|
||||
MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar(
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||
desktop_drop
|
||||
dynamic_color
|
||||
fvp
|
||||
isar_flutter_libs
|
||||
local_auth_windows
|
||||
media_kit_libs_windows_video
|
||||
media_kit_video
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue