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.
431 lines
12 KiB
Dart
431 lines
12 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 'external_media_import.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$ExternalMediaSelection {
|
|
List<AssetDocument> get selected;
|
|
MediaImportResult? get result;
|
|
bool get failed;
|
|
|
|
/// Create a copy of ExternalMediaSelection
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ExternalMediaSelectionCopyWith<ExternalMediaSelection> get copyWith =>
|
|
_$ExternalMediaSelectionCopyWithImpl<ExternalMediaSelection>(
|
|
this as ExternalMediaSelection,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as ExternalMediaSelection;
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is ExternalMediaSelection &&
|
|
const DeepCollectionEquality().equals(
|
|
other.selected,
|
|
_this.selected,
|
|
) &&
|
|
(identical(other.result, _this.result) ||
|
|
other.result == _this.result) &&
|
|
(identical(other.failed, _this.failed) ||
|
|
other.failed == _this.failed));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as ExternalMediaSelection;
|
|
return Object.hash(
|
|
runtimeType,
|
|
const DeepCollectionEquality().hash(_this.selected),
|
|
_this.result,
|
|
_this.failed,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
final _this = this as ExternalMediaSelection;
|
|
return 'ExternalMediaSelection(selected: ${_this.selected}, result: ${_this.result}, failed: ${_this.failed})';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ExternalMediaSelectionCopyWith<$Res> {
|
|
factory $ExternalMediaSelectionCopyWith(
|
|
ExternalMediaSelection value,
|
|
$Res Function(ExternalMediaSelection) _then,
|
|
) = _$ExternalMediaSelectionCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
List<AssetDocument> selected,
|
|
MediaImportResult? result,
|
|
bool failed,
|
|
});
|
|
|
|
$MediaImportResultCopyWith<$Res>? get result;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ExternalMediaSelectionCopyWithImpl<$Res>
|
|
implements $ExternalMediaSelectionCopyWith<$Res> {
|
|
_$ExternalMediaSelectionCopyWithImpl(this._self, this._then);
|
|
|
|
final ExternalMediaSelection _self;
|
|
final $Res Function(ExternalMediaSelection) _then;
|
|
|
|
/// Create a copy of ExternalMediaSelection
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? selected = null,
|
|
Object? result = freezed,
|
|
Object? failed = null,
|
|
}) {
|
|
return _then(
|
|
ExternalMediaSelection(
|
|
selected: null == selected
|
|
? _self.selected
|
|
: selected // ignore: cast_nullable_to_non_nullable
|
|
as List<AssetDocument>,
|
|
result: freezed == result
|
|
? _self.result
|
|
: result // ignore: cast_nullable_to_non_nullable
|
|
as MediaImportResult?,
|
|
failed: null == failed
|
|
? _self.failed
|
|
: failed // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of ExternalMediaSelection
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$MediaImportResultCopyWith<$Res>? get result {
|
|
if (_self.result == null) {
|
|
return null;
|
|
}
|
|
|
|
return $MediaImportResultCopyWith<$Res>(_self.result!, (value) {
|
|
return _then(_self.copyWith(result: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
/// Adds pattern-matching-related methods to [ExternalMediaSelection].
|
|
extension ExternalMediaSelectionPatterns on ExternalMediaSelection {
|
|
/// 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(_ExternalMediaSelection value)? $default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ExternalMediaSelection() 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(_ExternalMediaSelection value) $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ExternalMediaSelection():
|
|
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(_ExternalMediaSelection value)? $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ExternalMediaSelection() 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<AssetDocument> selected,
|
|
MediaImportResult? result,
|
|
bool failed,
|
|
)?
|
|
$default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ExternalMediaSelection() when $default != null:
|
|
return $default(_that.selected, _that.result, _that.failed);
|
|
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<AssetDocument> selected,
|
|
MediaImportResult? result,
|
|
bool failed,
|
|
)
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ExternalMediaSelection():
|
|
return $default(_that.selected, _that.result, _that.failed);
|
|
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<AssetDocument> selected,
|
|
MediaImportResult? result,
|
|
bool failed,
|
|
)?
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ExternalMediaSelection() when $default != null:
|
|
return $default(_that.selected, _that.result, _that.failed);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _ExternalMediaSelection implements ExternalMediaSelection {
|
|
const _ExternalMediaSelection({
|
|
required List<AssetDocument> selected,
|
|
this.result,
|
|
this.failed = false,
|
|
}) : _selected = selected;
|
|
|
|
final List<AssetDocument> _selected;
|
|
@override
|
|
List<AssetDocument> get selected {
|
|
if (_selected is EqualUnmodifiableListView) return _selected;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_selected);
|
|
}
|
|
|
|
@override
|
|
final MediaImportResult? result;
|
|
@override
|
|
@JsonKey()
|
|
final bool failed;
|
|
|
|
/// Create a copy of ExternalMediaSelection
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ExternalMediaSelectionCopyWith<_ExternalMediaSelection> get copyWith =>
|
|
__$ExternalMediaSelectionCopyWithImpl<_ExternalMediaSelection>(
|
|
this,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _ExternalMediaSelection &&
|
|
const DeepCollectionEquality().equals(other.selected, _selected) &&
|
|
(identical(other.result, result) || other.result == result) &&
|
|
(identical(other.failed, failed) || other.failed == failed));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(
|
|
runtimeType,
|
|
const DeepCollectionEquality().hash(_selected),
|
|
result,
|
|
failed,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ExternalMediaSelection(selected: $selected, result: $result, failed: $failed)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ExternalMediaSelectionCopyWith<$Res>
|
|
implements $ExternalMediaSelectionCopyWith<$Res> {
|
|
factory _$ExternalMediaSelectionCopyWith(
|
|
_ExternalMediaSelection value,
|
|
$Res Function(_ExternalMediaSelection) _then,
|
|
) = __$ExternalMediaSelectionCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
List<AssetDocument> selected,
|
|
MediaImportResult? result,
|
|
bool failed,
|
|
});
|
|
|
|
@override
|
|
$MediaImportResultCopyWith<$Res>? get result;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$ExternalMediaSelectionCopyWithImpl<$Res>
|
|
implements _$ExternalMediaSelectionCopyWith<$Res> {
|
|
__$ExternalMediaSelectionCopyWithImpl(this._self, this._then);
|
|
|
|
final _ExternalMediaSelection _self;
|
|
final $Res Function(_ExternalMediaSelection) _then;
|
|
|
|
/// Create a copy of ExternalMediaSelection
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({
|
|
Object? selected = null,
|
|
Object? result = freezed,
|
|
Object? failed = null,
|
|
}) {
|
|
return _then(
|
|
_ExternalMediaSelection(
|
|
selected: null == selected
|
|
? _self._selected
|
|
: selected // ignore: cast_nullable_to_non_nullable
|
|
as List<AssetDocument>,
|
|
result: freezed == result
|
|
? _self.result
|
|
: result // ignore: cast_nullable_to_non_nullable
|
|
as MediaImportResult?,
|
|
failed: null == failed
|
|
? _self.failed
|
|
: failed // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of ExternalMediaSelection
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$MediaImportResultCopyWith<$Res>? get result {
|
|
if (_self.result == null) {
|
|
return null;
|
|
}
|
|
|
|
return $MediaImportResultCopyWith<$Res>(_self.result!, (value) {
|
|
return _then(_self.copyWith(result: value));
|
|
});
|
|
}
|
|
}
|