Add the Flutter video editing application with project management, media import, timeline editing, preview, AI assistance, diagnostics and settings. Include shared UI and native host packages, platform runners, application tests and release tooling. Provide usage and contribution guides, the MIT license and third-party notices. Exclude local credentials, build outputs and validation data.
1141 lines
31 KiB
Dart
1141 lines
31 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// coverage:ignore-file
|
|
// ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package
|
|
// 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
|
|
|
|
part of 'timeline_drop_preparation.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$TimelineDropSource implements DiagnosticableTreeMixin {
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties..add(DiagnosticsProperty('type', 'TimelineDropSource'));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType && other is TimelineDropSource);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
return 'TimelineDropSource()';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
class $TimelineDropSourceCopyWith<$Res> {
|
|
$TimelineDropSourceCopyWith(
|
|
TimelineDropSource _,
|
|
$Res Function(TimelineDropSource) __,
|
|
);
|
|
}
|
|
|
|
/// Adds pattern-matching-related methods to [TimelineDropSource].
|
|
extension TimelineDropSourcePatterns on TimelineDropSource {
|
|
/// 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(DroppedFile value)? file,
|
|
TResult Function(DroppedAsset value)? asset,
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case DroppedFile() when file != null:
|
|
return file(_that);
|
|
case DroppedAsset() when asset != null:
|
|
return asset(_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(DroppedFile value) file,
|
|
required TResult Function(DroppedAsset value) asset,
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case DroppedFile():
|
|
return file(_that);
|
|
case DroppedAsset():
|
|
return asset(_that);
|
|
}
|
|
}
|
|
|
|
/// A variant of `map` that fallback to returning `null`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
TResult? Function(DroppedFile value)? file,
|
|
TResult? Function(DroppedAsset value)? asset,
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case DroppedFile() when file != null:
|
|
return file(_that);
|
|
case DroppedAsset() when asset != null:
|
|
return asset(_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(ExternalMediaFile file)? file,
|
|
TResult Function(AssetDocument asset)? asset,
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case DroppedFile() when file != null:
|
|
return file(_that.file);
|
|
case DroppedAsset() when asset != null:
|
|
return asset(_that.asset);
|
|
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(ExternalMediaFile file) file,
|
|
required TResult Function(AssetDocument asset) asset,
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case DroppedFile():
|
|
return file(_that.file);
|
|
case DroppedAsset():
|
|
return asset(_that.asset);
|
|
}
|
|
}
|
|
|
|
/// 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(ExternalMediaFile file)? file,
|
|
TResult? Function(AssetDocument asset)? asset,
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case DroppedFile() when file != null:
|
|
return file(_that.file);
|
|
case DroppedAsset() when asset != null:
|
|
return asset(_that.asset);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class DroppedFile with DiagnosticableTreeMixin implements TimelineDropSource {
|
|
const DroppedFile(this.file);
|
|
|
|
final ExternalMediaFile file;
|
|
|
|
/// Create a copy of TimelineDropSource
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$DroppedFileCopyWith<DroppedFile> get copyWith =>
|
|
_$DroppedFileCopyWithImpl<DroppedFile>(this, _$identity);
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'TimelineDropSource.file'))
|
|
..add(DiagnosticsProperty('file', file));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is DroppedFile &&
|
|
(identical(other.file, file) || other.file == file));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType, file);
|
|
}
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
return 'TimelineDropSource.file(file: $file)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $DroppedFileCopyWith<$Res>
|
|
implements $TimelineDropSourceCopyWith<$Res> {
|
|
factory $DroppedFileCopyWith(
|
|
DroppedFile value,
|
|
$Res Function(DroppedFile) _then,
|
|
) = _$DroppedFileCopyWithImpl;
|
|
@useResult
|
|
$Res call({ExternalMediaFile file});
|
|
|
|
$ExternalMediaFileCopyWith<$Res> get file;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$DroppedFileCopyWithImpl<$Res> implements $DroppedFileCopyWith<$Res> {
|
|
_$DroppedFileCopyWithImpl(this._self, this._then);
|
|
|
|
final DroppedFile _self;
|
|
final $Res Function(DroppedFile) _then;
|
|
|
|
/// Create a copy of TimelineDropSource
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({Object? file = null}) {
|
|
return _then(
|
|
DroppedFile(
|
|
null == file
|
|
? _self.file
|
|
: file // ignore: cast_nullable_to_non_nullable
|
|
as ExternalMediaFile,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of TimelineDropSource
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$ExternalMediaFileCopyWith<$Res> get file {
|
|
return $ExternalMediaFileCopyWith<$Res>(_self.file, (value) {
|
|
return _then(_self.copyWith(file: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class DroppedAsset with DiagnosticableTreeMixin implements TimelineDropSource {
|
|
const DroppedAsset(this.asset);
|
|
|
|
final AssetDocument asset;
|
|
|
|
/// Create a copy of TimelineDropSource
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$DroppedAssetCopyWith<DroppedAsset> get copyWith =>
|
|
_$DroppedAssetCopyWithImpl<DroppedAsset>(this, _$identity);
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'TimelineDropSource.asset'))
|
|
..add(DiagnosticsProperty('asset', asset));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is DroppedAsset &&
|
|
(identical(other.asset, asset) || other.asset == asset));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType, asset);
|
|
}
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
return 'TimelineDropSource.asset(asset: $asset)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $DroppedAssetCopyWith<$Res>
|
|
implements $TimelineDropSourceCopyWith<$Res> {
|
|
factory $DroppedAssetCopyWith(
|
|
DroppedAsset value,
|
|
$Res Function(DroppedAsset) _then,
|
|
) = _$DroppedAssetCopyWithImpl;
|
|
@useResult
|
|
$Res call({AssetDocument asset});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$DroppedAssetCopyWithImpl<$Res> implements $DroppedAssetCopyWith<$Res> {
|
|
_$DroppedAssetCopyWithImpl(this._self, this._then);
|
|
|
|
final DroppedAsset _self;
|
|
final $Res Function(DroppedAsset) _then;
|
|
|
|
/// Create a copy of TimelineDropSource
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({Object? asset = null}) {
|
|
return _then(
|
|
DroppedAsset(
|
|
null == asset
|
|
? _self.asset
|
|
: asset // ignore: cast_nullable_to_non_nullable
|
|
as AssetDocument,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$PreparedTimelineMedia implements DiagnosticableTreeMixin {
|
|
TimelineDropSource get source;
|
|
MediaReference get media;
|
|
PreparedMediaMetadata get metadata;
|
|
|
|
/// Create a copy of PreparedTimelineMedia
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$PreparedTimelineMediaCopyWith<PreparedTimelineMedia> get copyWith =>
|
|
_$PreparedTimelineMediaCopyWithImpl<PreparedTimelineMedia>(
|
|
this as PreparedTimelineMedia,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
final _this = this as PreparedTimelineMedia;
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'PreparedTimelineMedia'))
|
|
..add(DiagnosticsProperty('source', _this.source))
|
|
..add(DiagnosticsProperty('media', _this.media))
|
|
..add(DiagnosticsProperty('metadata', _this.metadata));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as PreparedTimelineMedia;
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is PreparedTimelineMedia &&
|
|
(identical(other.source, _this.source) ||
|
|
other.source == _this.source) &&
|
|
(identical(other.media, _this.media) ||
|
|
other.media == _this.media) &&
|
|
(identical(other.metadata, _this.metadata) ||
|
|
other.metadata == _this.metadata));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as PreparedTimelineMedia;
|
|
return Object.hash(runtimeType, _this.source, _this.media, _this.metadata);
|
|
}
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
final _this = this as PreparedTimelineMedia;
|
|
return 'PreparedTimelineMedia(source: ${_this.source}, media: ${_this.media}, metadata: ${_this.metadata})';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $PreparedTimelineMediaCopyWith<$Res> {
|
|
factory $PreparedTimelineMediaCopyWith(
|
|
PreparedTimelineMedia value,
|
|
$Res Function(PreparedTimelineMedia) _then,
|
|
) = _$PreparedTimelineMediaCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
TimelineDropSource source,
|
|
MediaReference media,
|
|
PreparedMediaMetadata metadata,
|
|
});
|
|
|
|
$TimelineDropSourceCopyWith<$Res> get source;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$PreparedTimelineMediaCopyWithImpl<$Res>
|
|
implements $PreparedTimelineMediaCopyWith<$Res> {
|
|
_$PreparedTimelineMediaCopyWithImpl(this._self, this._then);
|
|
|
|
final PreparedTimelineMedia _self;
|
|
final $Res Function(PreparedTimelineMedia) _then;
|
|
|
|
/// Create a copy of PreparedTimelineMedia
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? source = null,
|
|
Object? media = null,
|
|
Object? metadata = null,
|
|
}) {
|
|
return _then(
|
|
PreparedTimelineMedia(
|
|
source: null == source
|
|
? _self.source
|
|
: source // ignore: cast_nullable_to_non_nullable
|
|
as TimelineDropSource,
|
|
media: null == media
|
|
? _self.media
|
|
: media // ignore: cast_nullable_to_non_nullable
|
|
as MediaReference,
|
|
metadata: null == metadata
|
|
? _self.metadata
|
|
: metadata // ignore: cast_nullable_to_non_nullable
|
|
as PreparedMediaMetadata,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of PreparedTimelineMedia
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TimelineDropSourceCopyWith<$Res> get source {
|
|
return $TimelineDropSourceCopyWith<$Res>(_self.source, (value) {
|
|
return _then(_self.copyWith(source: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
/// Adds pattern-matching-related methods to [PreparedTimelineMedia].
|
|
extension PreparedTimelineMediaPatterns on PreparedTimelineMedia {
|
|
/// 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(_PreparedTimelineMedia value)? $default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _PreparedTimelineMedia() 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(_PreparedTimelineMedia value) $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _PreparedTimelineMedia():
|
|
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(_PreparedTimelineMedia value)? $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _PreparedTimelineMedia() 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(
|
|
TimelineDropSource source,
|
|
MediaReference media,
|
|
PreparedMediaMetadata metadata,
|
|
)?
|
|
$default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _PreparedTimelineMedia() when $default != null:
|
|
return $default(_that.source, _that.media, _that.metadata);
|
|
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(
|
|
TimelineDropSource source,
|
|
MediaReference media,
|
|
PreparedMediaMetadata metadata,
|
|
)
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _PreparedTimelineMedia():
|
|
return $default(_that.source, _that.media, _that.metadata);
|
|
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(
|
|
TimelineDropSource source,
|
|
MediaReference media,
|
|
PreparedMediaMetadata metadata,
|
|
)?
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _PreparedTimelineMedia() when $default != null:
|
|
return $default(_that.source, _that.media, _that.metadata);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _PreparedTimelineMedia
|
|
with DiagnosticableTreeMixin
|
|
implements PreparedTimelineMedia {
|
|
const _PreparedTimelineMedia({
|
|
required this.source,
|
|
required this.media,
|
|
required this.metadata,
|
|
});
|
|
|
|
@override
|
|
final TimelineDropSource source;
|
|
@override
|
|
final MediaReference media;
|
|
@override
|
|
final PreparedMediaMetadata metadata;
|
|
|
|
/// Create a copy of PreparedTimelineMedia
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$PreparedTimelineMediaCopyWith<_PreparedTimelineMedia> get copyWith =>
|
|
__$PreparedTimelineMediaCopyWithImpl<_PreparedTimelineMedia>(
|
|
this,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'PreparedTimelineMedia'))
|
|
..add(DiagnosticsProperty('source', source))
|
|
..add(DiagnosticsProperty('media', media))
|
|
..add(DiagnosticsProperty('metadata', metadata));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _PreparedTimelineMedia &&
|
|
(identical(other.source, source) || other.source == source) &&
|
|
(identical(other.media, media) || other.media == media) &&
|
|
(identical(other.metadata, metadata) ||
|
|
other.metadata == metadata));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType, source, media, metadata);
|
|
}
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
return 'PreparedTimelineMedia(source: $source, media: $media, metadata: $metadata)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$PreparedTimelineMediaCopyWith<$Res>
|
|
implements $PreparedTimelineMediaCopyWith<$Res> {
|
|
factory _$PreparedTimelineMediaCopyWith(
|
|
_PreparedTimelineMedia value,
|
|
$Res Function(_PreparedTimelineMedia) _then,
|
|
) = __$PreparedTimelineMediaCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
TimelineDropSource source,
|
|
MediaReference media,
|
|
PreparedMediaMetadata metadata,
|
|
});
|
|
|
|
@override
|
|
$TimelineDropSourceCopyWith<$Res> get source;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$PreparedTimelineMediaCopyWithImpl<$Res>
|
|
implements _$PreparedTimelineMediaCopyWith<$Res> {
|
|
__$PreparedTimelineMediaCopyWithImpl(this._self, this._then);
|
|
|
|
final _PreparedTimelineMedia _self;
|
|
final $Res Function(_PreparedTimelineMedia) _then;
|
|
|
|
/// Create a copy of PreparedTimelineMedia
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({
|
|
Object? source = null,
|
|
Object? media = null,
|
|
Object? metadata = null,
|
|
}) {
|
|
return _then(
|
|
_PreparedTimelineMedia(
|
|
source: null == source
|
|
? _self.source
|
|
: source // ignore: cast_nullable_to_non_nullable
|
|
as TimelineDropSource,
|
|
media: null == media
|
|
? _self.media
|
|
: media // ignore: cast_nullable_to_non_nullable
|
|
as MediaReference,
|
|
metadata: null == metadata
|
|
? _self.metadata
|
|
: metadata // ignore: cast_nullable_to_non_nullable
|
|
as PreparedMediaMetadata,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of PreparedTimelineMedia
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$TimelineDropSourceCopyWith<$Res> get source {
|
|
return $TimelineDropSourceCopyWith<$Res>(_self.source, (value) {
|
|
return _then(_self.copyWith(source: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$TimelineDropState implements DiagnosticableTreeMixin {
|
|
AsyncValue<PreparedTimelineMedia?> get preparation;
|
|
AsyncValue<void> get commit;
|
|
|
|
/// Create a copy of TimelineDropState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$TimelineDropStateCopyWith<TimelineDropState> get copyWith =>
|
|
_$TimelineDropStateCopyWithImpl<TimelineDropState>(
|
|
this as TimelineDropState,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
final _this = this as TimelineDropState;
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'TimelineDropState'))
|
|
..add(DiagnosticsProperty('preparation', _this.preparation))
|
|
..add(DiagnosticsProperty('commit', _this.commit));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as TimelineDropState;
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is TimelineDropState &&
|
|
(identical(other.preparation, _this.preparation) ||
|
|
other.preparation == _this.preparation) &&
|
|
(identical(other.commit, _this.commit) ||
|
|
other.commit == _this.commit));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as TimelineDropState;
|
|
return Object.hash(runtimeType, _this.preparation, _this.commit);
|
|
}
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
final _this = this as TimelineDropState;
|
|
return 'TimelineDropState(preparation: ${_this.preparation}, commit: ${_this.commit})';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $TimelineDropStateCopyWith<$Res> {
|
|
factory $TimelineDropStateCopyWith(
|
|
TimelineDropState value,
|
|
$Res Function(TimelineDropState) _then,
|
|
) = _$TimelineDropStateCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
AsyncValue<PreparedTimelineMedia?> preparation,
|
|
AsyncValue<void> commit,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$TimelineDropStateCopyWithImpl<$Res>
|
|
implements $TimelineDropStateCopyWith<$Res> {
|
|
_$TimelineDropStateCopyWithImpl(this._self, this._then);
|
|
|
|
final TimelineDropState _self;
|
|
final $Res Function(TimelineDropState) _then;
|
|
|
|
/// Create a copy of TimelineDropState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({Object? preparation = null, Object? commit = null}) {
|
|
return _then(
|
|
TimelineDropState(
|
|
preparation: null == preparation
|
|
? _self.preparation
|
|
: preparation // ignore: cast_nullable_to_non_nullable
|
|
as AsyncValue<PreparedTimelineMedia?>,
|
|
commit: null == commit
|
|
? _self.commit
|
|
: commit // ignore: cast_nullable_to_non_nullable
|
|
as AsyncValue<void>,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// Adds pattern-matching-related methods to [TimelineDropState].
|
|
extension TimelineDropStatePatterns on TimelineDropState {
|
|
/// 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(_TimelineDropState value)? $default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TimelineDropState() 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(_TimelineDropState value) $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TimelineDropState():
|
|
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(_TimelineDropState value)? $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TimelineDropState() 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(
|
|
AsyncValue<PreparedTimelineMedia?> preparation,
|
|
AsyncValue<void> commit,
|
|
)?
|
|
$default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TimelineDropState() when $default != null:
|
|
return $default(_that.preparation, _that.commit);
|
|
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(
|
|
AsyncValue<PreparedTimelineMedia?> preparation,
|
|
AsyncValue<void> commit,
|
|
)
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TimelineDropState():
|
|
return $default(_that.preparation, _that.commit);
|
|
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(
|
|
AsyncValue<PreparedTimelineMedia?> preparation,
|
|
AsyncValue<void> commit,
|
|
)?
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _TimelineDropState() when $default != null:
|
|
return $default(_that.preparation, _that.commit);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _TimelineDropState
|
|
with DiagnosticableTreeMixin
|
|
implements TimelineDropState {
|
|
const _TimelineDropState({
|
|
this.preparation = const AsyncData<PreparedTimelineMedia?>(null),
|
|
this.commit = const AsyncData<void>(null),
|
|
});
|
|
|
|
@override
|
|
@JsonKey()
|
|
final AsyncValue<PreparedTimelineMedia?> preparation;
|
|
@override
|
|
@JsonKey()
|
|
final AsyncValue<void> commit;
|
|
|
|
/// Create a copy of TimelineDropState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$TimelineDropStateCopyWith<_TimelineDropState> get copyWith =>
|
|
__$TimelineDropStateCopyWithImpl<_TimelineDropState>(this, _$identity);
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'TimelineDropState'))
|
|
..add(DiagnosticsProperty('preparation', preparation))
|
|
..add(DiagnosticsProperty('commit', commit));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _TimelineDropState &&
|
|
(identical(other.preparation, preparation) ||
|
|
other.preparation == preparation) &&
|
|
(identical(other.commit, commit) || other.commit == commit));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType, preparation, commit);
|
|
}
|
|
|
|
@override
|
|
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
|
|
return 'TimelineDropState(preparation: $preparation, commit: $commit)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$TimelineDropStateCopyWith<$Res>
|
|
implements $TimelineDropStateCopyWith<$Res> {
|
|
factory _$TimelineDropStateCopyWith(
|
|
_TimelineDropState value,
|
|
$Res Function(_TimelineDropState) _then,
|
|
) = __$TimelineDropStateCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
AsyncValue<PreparedTimelineMedia?> preparation,
|
|
AsyncValue<void> commit,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$TimelineDropStateCopyWithImpl<$Res>
|
|
implements _$TimelineDropStateCopyWith<$Res> {
|
|
__$TimelineDropStateCopyWithImpl(this._self, this._then);
|
|
|
|
final _TimelineDropState _self;
|
|
final $Res Function(_TimelineDropState) _then;
|
|
|
|
/// Create a copy of TimelineDropState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({Object? preparation = null, Object? commit = null}) {
|
|
return _then(
|
|
_TimelineDropState(
|
|
preparation: null == preparation
|
|
? _self.preparation
|
|
: preparation // ignore: cast_nullable_to_non_nullable
|
|
as AsyncValue<PreparedTimelineMedia?>,
|
|
commit: null == commit
|
|
? _self.commit
|
|
: commit // ignore: cast_nullable_to_non_nullable
|
|
as AsyncValue<void>,
|
|
),
|
|
);
|
|
}
|
|
}
|