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.
1556 lines
41 KiB
Dart
1556 lines
41 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 'composer_document.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$ComposerReference {
|
|
ComposerReferenceKind get kind;
|
|
String get projectId;
|
|
String get id;
|
|
String get label;
|
|
|
|
/// Create a copy of ComposerReference
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ComposerReferenceCopyWith<ComposerReference> get copyWith =>
|
|
_$ComposerReferenceCopyWithImpl<ComposerReference>(
|
|
this as ComposerReference,
|
|
_$identity,
|
|
);
|
|
|
|
/// Serializes this ComposerReference to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as ComposerReference;
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is ComposerReference &&
|
|
(identical(other.kind, _this.kind) || other.kind == _this.kind) &&
|
|
(identical(other.projectId, _this.projectId) ||
|
|
other.projectId == _this.projectId) &&
|
|
(identical(other.id, _this.id) || other.id == _this.id) &&
|
|
(identical(other.label, _this.label) ||
|
|
other.label == _this.label));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as ComposerReference;
|
|
return Object.hash(
|
|
runtimeType,
|
|
_this.kind,
|
|
_this.projectId,
|
|
_this.id,
|
|
_this.label,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
final _this = this as ComposerReference;
|
|
return 'ComposerReference(kind: ${_this.kind}, projectId: ${_this.projectId}, id: ${_this.id}, label: ${_this.label})';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ComposerReferenceCopyWith<$Res> {
|
|
factory $ComposerReferenceCopyWith(
|
|
ComposerReference value,
|
|
$Res Function(ComposerReference) _then,
|
|
) = _$ComposerReferenceCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
ComposerReferenceKind kind,
|
|
String projectId,
|
|
String id,
|
|
String label,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ComposerReferenceCopyWithImpl<$Res>
|
|
implements $ComposerReferenceCopyWith<$Res> {
|
|
_$ComposerReferenceCopyWithImpl(this._self, this._then);
|
|
|
|
final ComposerReference _self;
|
|
final $Res Function(ComposerReference) _then;
|
|
|
|
/// Create a copy of ComposerReference
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? kind = null,
|
|
Object? projectId = null,
|
|
Object? id = null,
|
|
Object? label = null,
|
|
}) {
|
|
return _then(
|
|
ComposerReference(
|
|
kind: null == kind
|
|
? _self.kind
|
|
: kind // ignore: cast_nullable_to_non_nullable
|
|
as ComposerReferenceKind,
|
|
projectId: null == projectId
|
|
? _self.projectId
|
|
: projectId // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
id: null == id
|
|
? _self.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
label: null == label
|
|
? _self.label
|
|
: label // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// Adds pattern-matching-related methods to [ComposerReference].
|
|
extension ComposerReferencePatterns on ComposerReference {
|
|
/// 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(_ComposerReference value)? $default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerReference() 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(_ComposerReference value) $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerReference():
|
|
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(_ComposerReference value)? $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerReference() 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(
|
|
ComposerReferenceKind kind,
|
|
String projectId,
|
|
String id,
|
|
String label,
|
|
)?
|
|
$default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerReference() when $default != null:
|
|
return $default(_that.kind, _that.projectId, _that.id, _that.label);
|
|
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(
|
|
ComposerReferenceKind kind,
|
|
String projectId,
|
|
String id,
|
|
String label,
|
|
)
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerReference():
|
|
return $default(_that.kind, _that.projectId, _that.id, _that.label);
|
|
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(
|
|
ComposerReferenceKind kind,
|
|
String projectId,
|
|
String id,
|
|
String label,
|
|
)?
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerReference() when $default != null:
|
|
return $default(_that.kind, _that.projectId, _that.id, _that.label);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _ComposerReference extends ComposerReference {
|
|
const _ComposerReference({
|
|
required this.kind,
|
|
required this.projectId,
|
|
required this.id,
|
|
required this.label,
|
|
}) : super._();
|
|
factory _ComposerReference.fromJson(Map<String, dynamic> json) =>
|
|
_$ComposerReferenceFromJson(json);
|
|
|
|
@override
|
|
final ComposerReferenceKind kind;
|
|
@override
|
|
final String projectId;
|
|
@override
|
|
final String id;
|
|
@override
|
|
final String label;
|
|
|
|
/// Create a copy of ComposerReference
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ComposerReferenceCopyWith<_ComposerReference> get copyWith =>
|
|
__$ComposerReferenceCopyWithImpl<_ComposerReference>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$ComposerReferenceToJson(this);
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _ComposerReference &&
|
|
(identical(other.kind, kind) || other.kind == kind) &&
|
|
(identical(other.projectId, projectId) ||
|
|
other.projectId == projectId) &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.label, label) || other.label == label));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType, kind, projectId, id, label);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ComposerReference(kind: $kind, projectId: $projectId, id: $id, label: $label)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ComposerReferenceCopyWith<$Res>
|
|
implements $ComposerReferenceCopyWith<$Res> {
|
|
factory _$ComposerReferenceCopyWith(
|
|
_ComposerReference value,
|
|
$Res Function(_ComposerReference) _then,
|
|
) = __$ComposerReferenceCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
ComposerReferenceKind kind,
|
|
String projectId,
|
|
String id,
|
|
String label,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$ComposerReferenceCopyWithImpl<$Res>
|
|
implements _$ComposerReferenceCopyWith<$Res> {
|
|
__$ComposerReferenceCopyWithImpl(this._self, this._then);
|
|
|
|
final _ComposerReference _self;
|
|
final $Res Function(_ComposerReference) _then;
|
|
|
|
/// Create a copy of ComposerReference
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({
|
|
Object? kind = null,
|
|
Object? projectId = null,
|
|
Object? id = null,
|
|
Object? label = null,
|
|
}) {
|
|
return _then(
|
|
_ComposerReference(
|
|
kind: null == kind
|
|
? _self.kind
|
|
: kind // ignore: cast_nullable_to_non_nullable
|
|
as ComposerReferenceKind,
|
|
projectId: null == projectId
|
|
? _self.projectId
|
|
: projectId // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
id: null == id
|
|
? _self.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
label: null == label
|
|
? _self.label
|
|
: label // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$ComposerMark {
|
|
int get start;
|
|
int get end;
|
|
ComposerReference get reference;
|
|
bool get valid;
|
|
|
|
/// Create a copy of ComposerMark
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ComposerMarkCopyWith<ComposerMark> get copyWith =>
|
|
_$ComposerMarkCopyWithImpl<ComposerMark>(
|
|
this as ComposerMark,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as ComposerMark;
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is ComposerMark &&
|
|
(identical(other.start, _this.start) ||
|
|
other.start == _this.start) &&
|
|
(identical(other.end, _this.end) || other.end == _this.end) &&
|
|
(identical(other.reference, _this.reference) ||
|
|
other.reference == _this.reference) &&
|
|
(identical(other.valid, _this.valid) ||
|
|
other.valid == _this.valid));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as ComposerMark;
|
|
return Object.hash(
|
|
runtimeType,
|
|
_this.start,
|
|
_this.end,
|
|
_this.reference,
|
|
_this.valid,
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
final _this = this as ComposerMark;
|
|
return 'ComposerMark(start: ${_this.start}, end: ${_this.end}, reference: ${_this.reference}, valid: ${_this.valid})';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ComposerMarkCopyWith<$Res> {
|
|
factory $ComposerMarkCopyWith(
|
|
ComposerMark value,
|
|
$Res Function(ComposerMark) _then,
|
|
) = _$ComposerMarkCopyWithImpl;
|
|
@useResult
|
|
$Res call({int start, int end, ComposerReference reference, bool valid});
|
|
|
|
$ComposerReferenceCopyWith<$Res> get reference;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ComposerMarkCopyWithImpl<$Res> implements $ComposerMarkCopyWith<$Res> {
|
|
_$ComposerMarkCopyWithImpl(this._self, this._then);
|
|
|
|
final ComposerMark _self;
|
|
final $Res Function(ComposerMark) _then;
|
|
|
|
/// Create a copy of ComposerMark
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? start = null,
|
|
Object? end = null,
|
|
Object? reference = null,
|
|
Object? valid = null,
|
|
}) {
|
|
return _then(
|
|
ComposerMark(
|
|
start: null == start
|
|
? _self.start
|
|
: start // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
end: null == end
|
|
? _self.end
|
|
: end // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
reference: null == reference
|
|
? _self.reference
|
|
: reference // ignore: cast_nullable_to_non_nullable
|
|
as ComposerReference,
|
|
valid: null == valid
|
|
? _self.valid
|
|
: valid // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of ComposerMark
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$ComposerReferenceCopyWith<$Res> get reference {
|
|
return $ComposerReferenceCopyWith<$Res>(_self.reference, (value) {
|
|
return _then(_self.copyWith(reference: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
/// Adds pattern-matching-related methods to [ComposerMark].
|
|
extension ComposerMarkPatterns on ComposerMark {
|
|
/// 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(_ComposerMark value)? $default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerMark() 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(_ComposerMark value) $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerMark():
|
|
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(_ComposerMark value)? $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerMark() 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 start,
|
|
int end,
|
|
ComposerReference reference,
|
|
bool valid,
|
|
)?
|
|
$default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerMark() when $default != null:
|
|
return $default(_that.start, _that.end, _that.reference, _that.valid);
|
|
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 start,
|
|
int end,
|
|
ComposerReference reference,
|
|
bool valid,
|
|
)
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerMark():
|
|
return $default(_that.start, _that.end, _that.reference, _that.valid);
|
|
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 start,
|
|
int end,
|
|
ComposerReference reference,
|
|
bool valid,
|
|
)?
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerMark() when $default != null:
|
|
return $default(_that.start, _that.end, _that.reference, _that.valid);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _ComposerMark extends ComposerMark {
|
|
const _ComposerMark({
|
|
required this.start,
|
|
required this.end,
|
|
required this.reference,
|
|
this.valid = true,
|
|
}) : super._();
|
|
|
|
@override
|
|
final int start;
|
|
@override
|
|
final int end;
|
|
@override
|
|
final ComposerReference reference;
|
|
@override
|
|
@JsonKey()
|
|
final bool valid;
|
|
|
|
/// Create a copy of ComposerMark
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ComposerMarkCopyWith<_ComposerMark> get copyWith =>
|
|
__$ComposerMarkCopyWithImpl<_ComposerMark>(this, _$identity);
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _ComposerMark &&
|
|
(identical(other.start, start) || other.start == start) &&
|
|
(identical(other.end, end) || other.end == end) &&
|
|
(identical(other.reference, reference) ||
|
|
other.reference == reference) &&
|
|
(identical(other.valid, valid) || other.valid == valid));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType, start, end, reference, valid);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ComposerMark(start: $start, end: $end, reference: $reference, valid: $valid)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ComposerMarkCopyWith<$Res>
|
|
implements $ComposerMarkCopyWith<$Res> {
|
|
factory _$ComposerMarkCopyWith(
|
|
_ComposerMark value,
|
|
$Res Function(_ComposerMark) _then,
|
|
) = __$ComposerMarkCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call({int start, int end, ComposerReference reference, bool valid});
|
|
|
|
@override
|
|
$ComposerReferenceCopyWith<$Res> get reference;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$ComposerMarkCopyWithImpl<$Res>
|
|
implements _$ComposerMarkCopyWith<$Res> {
|
|
__$ComposerMarkCopyWithImpl(this._self, this._then);
|
|
|
|
final _ComposerMark _self;
|
|
final $Res Function(_ComposerMark) _then;
|
|
|
|
/// Create a copy of ComposerMark
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({
|
|
Object? start = null,
|
|
Object? end = null,
|
|
Object? reference = null,
|
|
Object? valid = null,
|
|
}) {
|
|
return _then(
|
|
_ComposerMark(
|
|
start: null == start
|
|
? _self.start
|
|
: start // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
end: null == end
|
|
? _self.end
|
|
: end // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
reference: null == reference
|
|
? _self.reference
|
|
: reference // ignore: cast_nullable_to_non_nullable
|
|
as ComposerReference,
|
|
valid: null == valid
|
|
? _self.valid
|
|
: valid // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of ComposerMark
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$ComposerReferenceCopyWith<$Res> get reference {
|
|
return $ComposerReferenceCopyWith<$Res>(_self.reference, (value) {
|
|
return _then(_self.copyWith(reference: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
ComposerSegment _$ComposerSegmentFromJson(Map<String, dynamic> json) {
|
|
switch (json['runtimeType']) {
|
|
case 'text':
|
|
return ComposerText.fromJson(json);
|
|
case 'reference':
|
|
return ComposerReferenceSegment.fromJson(json);
|
|
|
|
default:
|
|
throw CheckedFromJsonException(
|
|
json,
|
|
'runtimeType',
|
|
'ComposerSegment',
|
|
'Invalid union type "${json['runtimeType']}"!',
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$ComposerSegment {
|
|
Object get value;
|
|
|
|
/// Serializes this ComposerSegment to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as ComposerSegment;
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is ComposerSegment &&
|
|
const DeepCollectionEquality().equals(other.value, _this.value));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as ComposerSegment;
|
|
return Object.hash(
|
|
runtimeType,
|
|
const DeepCollectionEquality().hash(_this.value),
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
final _this = this as ComposerSegment;
|
|
return 'ComposerSegment(value: ${_this.value})';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
class $ComposerSegmentCopyWith<$Res> {
|
|
$ComposerSegmentCopyWith(
|
|
ComposerSegment _,
|
|
$Res Function(ComposerSegment) __,
|
|
);
|
|
}
|
|
|
|
/// Adds pattern-matching-related methods to [ComposerSegment].
|
|
extension ComposerSegmentPatterns on ComposerSegment {
|
|
/// 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(ComposerText value)? text,
|
|
TResult Function(ComposerReferenceSegment value)? reference,
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case ComposerText() when text != null:
|
|
return text(_that);
|
|
case ComposerReferenceSegment() when reference != null:
|
|
return reference(_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(ComposerText value) text,
|
|
required TResult Function(ComposerReferenceSegment value) reference,
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case ComposerText():
|
|
return text(_that);
|
|
case ComposerReferenceSegment():
|
|
return reference(_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(ComposerText value)? text,
|
|
TResult? Function(ComposerReferenceSegment value)? reference,
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case ComposerText() when text != null:
|
|
return text(_that);
|
|
case ComposerReferenceSegment() when reference != null:
|
|
return reference(_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 value)? text,
|
|
TResult Function(ComposerReference value)? reference,
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case ComposerText() when text != null:
|
|
return text(_that.value);
|
|
case ComposerReferenceSegment() when reference != null:
|
|
return reference(_that.value);
|
|
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(String value) text,
|
|
required TResult Function(ComposerReference value) reference,
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case ComposerText():
|
|
return text(_that.value);
|
|
case ComposerReferenceSegment():
|
|
return reference(_that.value);
|
|
}
|
|
}
|
|
|
|
/// 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 value)? text,
|
|
TResult? Function(ComposerReference value)? reference,
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case ComposerText() when text != null:
|
|
return text(_that.value);
|
|
case ComposerReferenceSegment() when reference != null:
|
|
return reference(_that.value);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class ComposerText extends ComposerSegment {
|
|
const ComposerText(this.value, {String? $type})
|
|
: $type = $type ?? 'text',
|
|
super._();
|
|
factory ComposerText.fromJson(Map<String, dynamic> json) =>
|
|
_$ComposerTextFromJson(json);
|
|
|
|
@override
|
|
final String value;
|
|
|
|
@JsonKey(name: 'runtimeType')
|
|
final String $type;
|
|
|
|
/// Create a copy of ComposerSegment
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ComposerTextCopyWith<ComposerText> get copyWith =>
|
|
_$ComposerTextCopyWithImpl<ComposerText>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$ComposerTextToJson(this);
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is ComposerText &&
|
|
(identical(other.value, value) || other.value == value));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType, value);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ComposerSegment.text(value: $value)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ComposerTextCopyWith<$Res>
|
|
implements $ComposerSegmentCopyWith<$Res> {
|
|
factory $ComposerTextCopyWith(
|
|
ComposerText value,
|
|
$Res Function(ComposerText) _then,
|
|
) = _$ComposerTextCopyWithImpl;
|
|
@useResult
|
|
$Res call({String value});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ComposerTextCopyWithImpl<$Res> implements $ComposerTextCopyWith<$Res> {
|
|
_$ComposerTextCopyWithImpl(this._self, this._then);
|
|
|
|
final ComposerText _self;
|
|
final $Res Function(ComposerText) _then;
|
|
|
|
/// Create a copy of ComposerSegment
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({Object? value = null}) {
|
|
return _then(
|
|
ComposerText(
|
|
null == value
|
|
? _self.value
|
|
: value // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class ComposerReferenceSegment extends ComposerSegment {
|
|
const ComposerReferenceSegment(this.value, {String? $type})
|
|
: $type = $type ?? 'reference',
|
|
super._();
|
|
factory ComposerReferenceSegment.fromJson(Map<String, dynamic> json) =>
|
|
_$ComposerReferenceSegmentFromJson(json);
|
|
|
|
@override
|
|
final ComposerReference value;
|
|
|
|
@JsonKey(name: 'runtimeType')
|
|
final String $type;
|
|
|
|
/// Create a copy of ComposerSegment
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ComposerReferenceSegmentCopyWith<ComposerReferenceSegment> get copyWith =>
|
|
_$ComposerReferenceSegmentCopyWithImpl<ComposerReferenceSegment>(
|
|
this,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$ComposerReferenceSegmentToJson(this);
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is ComposerReferenceSegment &&
|
|
(identical(other.value, value) || other.value == value));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(runtimeType, value);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ComposerSegment.reference(value: $value)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ComposerReferenceSegmentCopyWith<$Res>
|
|
implements $ComposerSegmentCopyWith<$Res> {
|
|
factory $ComposerReferenceSegmentCopyWith(
|
|
ComposerReferenceSegment value,
|
|
$Res Function(ComposerReferenceSegment) _then,
|
|
) = _$ComposerReferenceSegmentCopyWithImpl;
|
|
@useResult
|
|
$Res call({ComposerReference value});
|
|
|
|
$ComposerReferenceCopyWith<$Res> get value;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ComposerReferenceSegmentCopyWithImpl<$Res>
|
|
implements $ComposerReferenceSegmentCopyWith<$Res> {
|
|
_$ComposerReferenceSegmentCopyWithImpl(this._self, this._then);
|
|
|
|
final ComposerReferenceSegment _self;
|
|
final $Res Function(ComposerReferenceSegment) _then;
|
|
|
|
/// Create a copy of ComposerSegment
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({Object? value = null}) {
|
|
return _then(
|
|
ComposerReferenceSegment(
|
|
null == value
|
|
? _self.value
|
|
: value // ignore: cast_nullable_to_non_nullable
|
|
as ComposerReference,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of ComposerSegment
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$ComposerReferenceCopyWith<$Res> get value {
|
|
return $ComposerReferenceCopyWith<$Res>(_self.value, (value) {
|
|
return _then(_self.copyWith(value: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$ComposerSnapshot {
|
|
TextEditingValue get value;
|
|
List<ComposerMark> get marks;
|
|
|
|
/// Create a copy of _ComposerSnapshot
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ComposerSnapshotCopyWith<_ComposerSnapshot> get copyWith =>
|
|
__$ComposerSnapshotCopyWithImpl<_ComposerSnapshot>(
|
|
this as _ComposerSnapshot,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
final _this = this as _ComposerSnapshot;
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _ComposerSnapshot &&
|
|
(identical(other.value, _this.value) ||
|
|
other.value == _this.value) &&
|
|
const DeepCollectionEquality().equals(other.marks, _this.marks));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
final _this = this as _ComposerSnapshot;
|
|
return Object.hash(
|
|
runtimeType,
|
|
_this.value,
|
|
const DeepCollectionEquality().hash(_this.marks),
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
final _this = this as _ComposerSnapshot;
|
|
return '_ComposerSnapshot(value: ${_this.value}, marks: ${_this.marks})';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ComposerSnapshotCopyWith<$Res> {
|
|
factory _$ComposerSnapshotCopyWith(
|
|
_ComposerSnapshot value,
|
|
$Res Function(_ComposerSnapshot) _then,
|
|
) = __$ComposerSnapshotCopyWithImpl;
|
|
@useResult
|
|
$Res call({TextEditingValue value, List<ComposerMark> marks});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$ComposerSnapshotCopyWithImpl<$Res>
|
|
implements _$ComposerSnapshotCopyWith<$Res> {
|
|
__$ComposerSnapshotCopyWithImpl(this._self, this._then);
|
|
|
|
final _ComposerSnapshot _self;
|
|
final $Res Function(_ComposerSnapshot) _then;
|
|
|
|
/// Create a copy of _ComposerSnapshot
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({Object? value = null, Object? marks = null}) {
|
|
return _then(
|
|
_ComposerSnapshot(
|
|
null == value
|
|
? _self.value
|
|
: value // ignore: cast_nullable_to_non_nullable
|
|
as TextEditingValue,
|
|
null == marks
|
|
? _self.marks
|
|
: marks // ignore: cast_nullable_to_non_nullable
|
|
as List<ComposerMark>,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// Adds pattern-matching-related methods to [_ComposerSnapshot].
|
|
extension _ComposerSnapshotPatterns on _ComposerSnapshot {
|
|
/// 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(_ComposerHistorySnapshot value)? $default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerHistorySnapshot() 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(_ComposerHistorySnapshot value) $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerHistorySnapshot():
|
|
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(_ComposerHistorySnapshot value)? $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerHistorySnapshot() 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(TextEditingValue value, List<ComposerMark> marks)?
|
|
$default, {
|
|
required TResult orElse(),
|
|
}) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerHistorySnapshot() when $default != null:
|
|
return $default(_that.value, _that.marks);
|
|
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(TextEditingValue value, List<ComposerMark> marks) $default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerHistorySnapshot():
|
|
return $default(_that.value, _that.marks);
|
|
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(TextEditingValue value, List<ComposerMark> marks)?
|
|
$default,
|
|
) {
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _ComposerHistorySnapshot() when $default != null:
|
|
return $default(_that.value, _that.marks);
|
|
case _:
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _ComposerHistorySnapshot implements _ComposerSnapshot {
|
|
const _ComposerHistorySnapshot(this.value, List<ComposerMark> marks)
|
|
: _marks = marks;
|
|
|
|
@override
|
|
final TextEditingValue value;
|
|
final List<ComposerMark> _marks;
|
|
@override
|
|
List<ComposerMark> get marks {
|
|
if (_marks is EqualUnmodifiableListView) return _marks;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_marks);
|
|
}
|
|
|
|
/// Create a copy of _ComposerSnapshot
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ComposerHistorySnapshotCopyWith<_ComposerHistorySnapshot> get copyWith =>
|
|
__$ComposerHistorySnapshotCopyWithImpl<_ComposerHistorySnapshot>(
|
|
this,
|
|
_$identity,
|
|
);
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _ComposerHistorySnapshot &&
|
|
(identical(other.value, value) || other.value == value) &&
|
|
const DeepCollectionEquality().equals(other.marks, _marks));
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
return Object.hash(
|
|
runtimeType,
|
|
value,
|
|
const DeepCollectionEquality().hash(_marks),
|
|
);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return '_ComposerSnapshot(value: $value, marks: $marks)';
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ComposerHistorySnapshotCopyWith<$Res>
|
|
implements _$ComposerSnapshotCopyWith<$Res> {
|
|
factory _$ComposerHistorySnapshotCopyWith(
|
|
_ComposerHistorySnapshot value,
|
|
$Res Function(_ComposerHistorySnapshot) _then,
|
|
) = __$ComposerHistorySnapshotCopyWithImpl;
|
|
@override
|
|
@useResult
|
|
$Res call({TextEditingValue value, List<ComposerMark> marks});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$ComposerHistorySnapshotCopyWithImpl<$Res>
|
|
implements _$ComposerHistorySnapshotCopyWith<$Res> {
|
|
__$ComposerHistorySnapshotCopyWithImpl(this._self, this._then);
|
|
|
|
final _ComposerHistorySnapshot _self;
|
|
final $Res Function(_ComposerHistorySnapshot) _then;
|
|
|
|
/// Create a copy of _ComposerSnapshot
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$Res call({Object? value = null, Object? marks = null}) {
|
|
return _then(
|
|
_ComposerHistorySnapshot(
|
|
null == value
|
|
? _self.value
|
|
: value // ignore: cast_nullable_to_non_nullable
|
|
as TextEditingValue,
|
|
null == marks
|
|
? _self._marks
|
|
: marks // ignore: cast_nullable_to_non_nullable
|
|
as List<ComposerMark>,
|
|
),
|
|
);
|
|
}
|
|
}
|