Files
cutdex/lib/features/assistant/composer_suggestions.freezed.dart
lingjhf 27e77fff39 feat: initial Cutdex application
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.
2026-10-05 23:36:23 +08:00

1448 lines
39 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_suggestions.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ComposerOption {
String get trigger;
String get title;
String get subtitle;
IconData get icon;
ComposerOptionGroup? get group;
/// Create a copy of ComposerOption
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ComposerOptionCopyWith<ComposerOption> get copyWith =>
_$ComposerOptionCopyWithImpl<ComposerOption>(
this as ComposerOption,
_$identity,
);
@override
bool operator ==(Object other) {
final _this = this as ComposerOption;
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ComposerOption &&
(identical(other.trigger, _this.trigger) ||
other.trigger == _this.trigger) &&
(identical(other.title, _this.title) ||
other.title == _this.title) &&
(identical(other.subtitle, _this.subtitle) ||
other.subtitle == _this.subtitle) &&
(identical(other.icon, _this.icon) || other.icon == _this.icon) &&
(identical(other.group, _this.group) ||
other.group == _this.group));
}
@override
int get hashCode {
final _this = this as ComposerOption;
return Object.hash(
runtimeType,
_this.trigger,
_this.title,
_this.subtitle,
_this.icon,
_this.group,
);
}
@override
String toString() {
final _this = this as ComposerOption;
return 'ComposerOption(trigger: ${_this.trigger}, title: ${_this.title}, subtitle: ${_this.subtitle}, icon: ${_this.icon}, group: ${_this.group})';
}
}
/// @nodoc
abstract mixin class $ComposerOptionCopyWith<$Res> {
factory $ComposerOptionCopyWith(
ComposerOption value,
$Res Function(ComposerOption) _then,
) = _$ComposerOptionCopyWithImpl;
@useResult
$Res call({
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
});
}
/// @nodoc
class _$ComposerOptionCopyWithImpl<$Res>
implements $ComposerOptionCopyWith<$Res> {
_$ComposerOptionCopyWithImpl(this._self, this._then);
final ComposerOption _self;
final $Res Function(ComposerOption) _then;
/// Create a copy of ComposerOption
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? trigger = null,
Object? title = null,
Object? subtitle = null,
Object? icon = null,
Object? group = freezed,
}) {
return _then(
_self.copyWith(
trigger: null == trigger
? _self.trigger
: trigger // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _self.title
: title // ignore: cast_nullable_to_non_nullable
as String,
subtitle: null == subtitle
? _self.subtitle
: subtitle // ignore: cast_nullable_to_non_nullable
as String,
icon: null == icon
? _self.icon
: icon // ignore: cast_nullable_to_non_nullable
as IconData,
group: freezed == group
? _self.group
: group // ignore: cast_nullable_to_non_nullable
as ComposerOptionGroup?,
),
);
}
}
/// Adds pattern-matching-related methods to [ComposerOption].
extension ComposerOptionPatterns on ComposerOption {
/// 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(ComposerReferenceOption value)? reference,
TResult Function(ComposerTextOption value)? text,
TResult Function(ComposerInvokeOption value)? invoke,
TResult Function(ComposerPickerOption value)? openPicker,
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case ComposerReferenceOption() when reference != null:
return reference(_that);
case ComposerTextOption() when text != null:
return text(_that);
case ComposerInvokeOption() when invoke != null:
return invoke(_that);
case ComposerPickerOption() when openPicker != null:
return openPicker(_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(ComposerReferenceOption value) reference,
required TResult Function(ComposerTextOption value) text,
required TResult Function(ComposerInvokeOption value) invoke,
required TResult Function(ComposerPickerOption value) openPicker,
}) {
final _that = this;
switch (_that) {
case ComposerReferenceOption():
return reference(_that);
case ComposerTextOption():
return text(_that);
case ComposerInvokeOption():
return invoke(_that);
case ComposerPickerOption():
return openPicker(_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(ComposerReferenceOption value)? reference,
TResult? Function(ComposerTextOption value)? text,
TResult? Function(ComposerInvokeOption value)? invoke,
TResult? Function(ComposerPickerOption value)? openPicker,
}) {
final _that = this;
switch (_that) {
case ComposerReferenceOption() when reference != null:
return reference(_that);
case ComposerTextOption() when text != null:
return text(_that);
case ComposerInvokeOption() when invoke != null:
return invoke(_that);
case ComposerPickerOption() when openPicker != null:
return openPicker(_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 trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
ComposerReference reference,
)?
reference,
TResult Function(
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
String text,
)?
text,
TResult Function(
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
VoidCallback onInvoke,
)?
invoke,
TResult Function(
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
VoidCallback onInvoke,
)?
openPicker,
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case ComposerReferenceOption() when reference != null:
return reference(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.reference,
);
case ComposerTextOption() when text != null:
return text(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.text,
);
case ComposerInvokeOption() when invoke != null:
return invoke(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.onInvoke,
);
case ComposerPickerOption() when openPicker != null:
return openPicker(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.onInvoke,
);
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 trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
ComposerReference reference,
)
reference,
required TResult Function(
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
String text,
)
text,
required TResult Function(
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
VoidCallback onInvoke,
)
invoke,
required TResult Function(
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
VoidCallback onInvoke,
)
openPicker,
}) {
final _that = this;
switch (_that) {
case ComposerReferenceOption():
return reference(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.reference,
);
case ComposerTextOption():
return text(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.text,
);
case ComposerInvokeOption():
return invoke(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.onInvoke,
);
case ComposerPickerOption():
return openPicker(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.onInvoke,
);
}
}
/// 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 trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
ComposerReference reference,
)?
reference,
TResult? Function(
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
String text,
)?
text,
TResult? Function(
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
VoidCallback onInvoke,
)?
invoke,
TResult? Function(
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
VoidCallback onInvoke,
)?
openPicker,
}) {
final _that = this;
switch (_that) {
case ComposerReferenceOption() when reference != null:
return reference(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.reference,
);
case ComposerTextOption() when text != null:
return text(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.text,
);
case ComposerInvokeOption() when invoke != null:
return invoke(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.onInvoke,
);
case ComposerPickerOption() when openPicker != null:
return openPicker(
_that.trigger,
_that.title,
_that.subtitle,
_that.icon,
_that.group,
_that.onInvoke,
);
case _:
return null;
}
}
}
/// @nodoc
class ComposerReferenceOption implements ComposerOption {
const ComposerReferenceOption({
required this.trigger,
required this.title,
required this.subtitle,
required this.icon,
this.group,
required this.reference,
});
@override
final String trigger;
@override
final String title;
@override
final String subtitle;
@override
final IconData icon;
@override
final ComposerOptionGroup? group;
final ComposerReference reference;
/// Create a copy of ComposerOption
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ComposerReferenceOptionCopyWith<ComposerReferenceOption> get copyWith =>
_$ComposerReferenceOptionCopyWithImpl<ComposerReferenceOption>(
this,
_$identity,
);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ComposerReferenceOption &&
(identical(other.trigger, trigger) || other.trigger == trigger) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.subtitle, subtitle) ||
other.subtitle == subtitle) &&
(identical(other.icon, icon) || other.icon == icon) &&
(identical(other.group, group) || other.group == group) &&
(identical(other.reference, reference) ||
other.reference == reference));
}
@override
int get hashCode {
return Object.hash(
runtimeType,
trigger,
title,
subtitle,
icon,
group,
reference,
);
}
@override
String toString() {
return 'ComposerOption.reference(trigger: $trigger, title: $title, subtitle: $subtitle, icon: $icon, group: $group, reference: $reference)';
}
}
/// @nodoc
abstract mixin class $ComposerReferenceOptionCopyWith<$Res>
implements $ComposerOptionCopyWith<$Res> {
factory $ComposerReferenceOptionCopyWith(
ComposerReferenceOption value,
$Res Function(ComposerReferenceOption) _then,
) = _$ComposerReferenceOptionCopyWithImpl;
@override
@useResult
$Res call({
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
ComposerReference reference,
});
$ComposerReferenceCopyWith<$Res> get reference;
}
/// @nodoc
class _$ComposerReferenceOptionCopyWithImpl<$Res>
implements $ComposerReferenceOptionCopyWith<$Res> {
_$ComposerReferenceOptionCopyWithImpl(this._self, this._then);
final ComposerReferenceOption _self;
final $Res Function(ComposerReferenceOption) _then;
/// Create a copy of ComposerOption
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? trigger = null,
Object? title = null,
Object? subtitle = null,
Object? icon = null,
Object? group = freezed,
Object? reference = null,
}) {
return _then(
ComposerReferenceOption(
trigger: null == trigger
? _self.trigger
: trigger // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _self.title
: title // ignore: cast_nullable_to_non_nullable
as String,
subtitle: null == subtitle
? _self.subtitle
: subtitle // ignore: cast_nullable_to_non_nullable
as String,
icon: null == icon
? _self.icon
: icon // ignore: cast_nullable_to_non_nullable
as IconData,
group: freezed == group
? _self.group
: group // ignore: cast_nullable_to_non_nullable
as ComposerOptionGroup?,
reference: null == reference
? _self.reference
: reference // ignore: cast_nullable_to_non_nullable
as ComposerReference,
),
);
}
/// Create a copy of ComposerOption
/// 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));
});
}
}
/// @nodoc
class ComposerTextOption implements ComposerOption {
const ComposerTextOption({
required this.trigger,
required this.title,
required this.subtitle,
required this.icon,
this.group,
required this.text,
});
@override
final String trigger;
@override
final String title;
@override
final String subtitle;
@override
final IconData icon;
@override
final ComposerOptionGroup? group;
final String text;
/// Create a copy of ComposerOption
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ComposerTextOptionCopyWith<ComposerTextOption> get copyWith =>
_$ComposerTextOptionCopyWithImpl<ComposerTextOption>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ComposerTextOption &&
(identical(other.trigger, trigger) || other.trigger == trigger) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.subtitle, subtitle) ||
other.subtitle == subtitle) &&
(identical(other.icon, icon) || other.icon == icon) &&
(identical(other.group, group) || other.group == group) &&
(identical(other.text, text) || other.text == text));
}
@override
int get hashCode {
return Object.hash(
runtimeType,
trigger,
title,
subtitle,
icon,
group,
text,
);
}
@override
String toString() {
return 'ComposerOption.text(trigger: $trigger, title: $title, subtitle: $subtitle, icon: $icon, group: $group, text: $text)';
}
}
/// @nodoc
abstract mixin class $ComposerTextOptionCopyWith<$Res>
implements $ComposerOptionCopyWith<$Res> {
factory $ComposerTextOptionCopyWith(
ComposerTextOption value,
$Res Function(ComposerTextOption) _then,
) = _$ComposerTextOptionCopyWithImpl;
@override
@useResult
$Res call({
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
String text,
});
}
/// @nodoc
class _$ComposerTextOptionCopyWithImpl<$Res>
implements $ComposerTextOptionCopyWith<$Res> {
_$ComposerTextOptionCopyWithImpl(this._self, this._then);
final ComposerTextOption _self;
final $Res Function(ComposerTextOption) _then;
/// Create a copy of ComposerOption
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? trigger = null,
Object? title = null,
Object? subtitle = null,
Object? icon = null,
Object? group = freezed,
Object? text = null,
}) {
return _then(
ComposerTextOption(
trigger: null == trigger
? _self.trigger
: trigger // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _self.title
: title // ignore: cast_nullable_to_non_nullable
as String,
subtitle: null == subtitle
? _self.subtitle
: subtitle // ignore: cast_nullable_to_non_nullable
as String,
icon: null == icon
? _self.icon
: icon // ignore: cast_nullable_to_non_nullable
as IconData,
group: freezed == group
? _self.group
: group // ignore: cast_nullable_to_non_nullable
as ComposerOptionGroup?,
text: null == text
? _self.text
: text // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// @nodoc
class ComposerInvokeOption implements ComposerOption {
const ComposerInvokeOption({
required this.trigger,
required this.title,
required this.subtitle,
required this.icon,
this.group,
required this.onInvoke,
});
@override
final String trigger;
@override
final String title;
@override
final String subtitle;
@override
final IconData icon;
@override
final ComposerOptionGroup? group;
final VoidCallback onInvoke;
/// Create a copy of ComposerOption
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ComposerInvokeOptionCopyWith<ComposerInvokeOption> get copyWith =>
_$ComposerInvokeOptionCopyWithImpl<ComposerInvokeOption>(
this,
_$identity,
);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ComposerInvokeOption &&
(identical(other.trigger, trigger) || other.trigger == trigger) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.subtitle, subtitle) ||
other.subtitle == subtitle) &&
(identical(other.icon, icon) || other.icon == icon) &&
(identical(other.group, group) || other.group == group) &&
(identical(other.onInvoke, onInvoke) ||
other.onInvoke == onInvoke));
}
@override
int get hashCode {
return Object.hash(
runtimeType,
trigger,
title,
subtitle,
icon,
group,
onInvoke,
);
}
@override
String toString() {
return 'ComposerOption.invoke(trigger: $trigger, title: $title, subtitle: $subtitle, icon: $icon, group: $group, onInvoke: $onInvoke)';
}
}
/// @nodoc
abstract mixin class $ComposerInvokeOptionCopyWith<$Res>
implements $ComposerOptionCopyWith<$Res> {
factory $ComposerInvokeOptionCopyWith(
ComposerInvokeOption value,
$Res Function(ComposerInvokeOption) _then,
) = _$ComposerInvokeOptionCopyWithImpl;
@override
@useResult
$Res call({
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
VoidCallback onInvoke,
});
}
/// @nodoc
class _$ComposerInvokeOptionCopyWithImpl<$Res>
implements $ComposerInvokeOptionCopyWith<$Res> {
_$ComposerInvokeOptionCopyWithImpl(this._self, this._then);
final ComposerInvokeOption _self;
final $Res Function(ComposerInvokeOption) _then;
/// Create a copy of ComposerOption
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? trigger = null,
Object? title = null,
Object? subtitle = null,
Object? icon = null,
Object? group = freezed,
Object? onInvoke = null,
}) {
return _then(
ComposerInvokeOption(
trigger: null == trigger
? _self.trigger
: trigger // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _self.title
: title // ignore: cast_nullable_to_non_nullable
as String,
subtitle: null == subtitle
? _self.subtitle
: subtitle // ignore: cast_nullable_to_non_nullable
as String,
icon: null == icon
? _self.icon
: icon // ignore: cast_nullable_to_non_nullable
as IconData,
group: freezed == group
? _self.group
: group // ignore: cast_nullable_to_non_nullable
as ComposerOptionGroup?,
onInvoke: null == onInvoke
? _self.onInvoke
: onInvoke // ignore: cast_nullable_to_non_nullable
as VoidCallback,
),
);
}
}
/// @nodoc
class ComposerPickerOption implements ComposerOption {
const ComposerPickerOption({
required this.trigger,
required this.title,
required this.subtitle,
required this.icon,
this.group,
required this.onInvoke,
});
@override
final String trigger;
@override
final String title;
@override
final String subtitle;
@override
final IconData icon;
@override
final ComposerOptionGroup? group;
final VoidCallback onInvoke;
/// Create a copy of ComposerOption
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ComposerPickerOptionCopyWith<ComposerPickerOption> get copyWith =>
_$ComposerPickerOptionCopyWithImpl<ComposerPickerOption>(
this,
_$identity,
);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ComposerPickerOption &&
(identical(other.trigger, trigger) || other.trigger == trigger) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.subtitle, subtitle) ||
other.subtitle == subtitle) &&
(identical(other.icon, icon) || other.icon == icon) &&
(identical(other.group, group) || other.group == group) &&
(identical(other.onInvoke, onInvoke) ||
other.onInvoke == onInvoke));
}
@override
int get hashCode {
return Object.hash(
runtimeType,
trigger,
title,
subtitle,
icon,
group,
onInvoke,
);
}
@override
String toString() {
return 'ComposerOption.openPicker(trigger: $trigger, title: $title, subtitle: $subtitle, icon: $icon, group: $group, onInvoke: $onInvoke)';
}
}
/// @nodoc
abstract mixin class $ComposerPickerOptionCopyWith<$Res>
implements $ComposerOptionCopyWith<$Res> {
factory $ComposerPickerOptionCopyWith(
ComposerPickerOption value,
$Res Function(ComposerPickerOption) _then,
) = _$ComposerPickerOptionCopyWithImpl;
@override
@useResult
$Res call({
String trigger,
String title,
String subtitle,
IconData icon,
ComposerOptionGroup? group,
VoidCallback onInvoke,
});
}
/// @nodoc
class _$ComposerPickerOptionCopyWithImpl<$Res>
implements $ComposerPickerOptionCopyWith<$Res> {
_$ComposerPickerOptionCopyWithImpl(this._self, this._then);
final ComposerPickerOption _self;
final $Res Function(ComposerPickerOption) _then;
/// Create a copy of ComposerOption
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? trigger = null,
Object? title = null,
Object? subtitle = null,
Object? icon = null,
Object? group = freezed,
Object? onInvoke = null,
}) {
return _then(
ComposerPickerOption(
trigger: null == trigger
? _self.trigger
: trigger // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _self.title
: title // ignore: cast_nullable_to_non_nullable
as String,
subtitle: null == subtitle
? _self.subtitle
: subtitle // ignore: cast_nullable_to_non_nullable
as String,
icon: null == icon
? _self.icon
: icon // ignore: cast_nullable_to_non_nullable
as IconData,
group: freezed == group
? _self.group
: group // ignore: cast_nullable_to_non_nullable
as ComposerOptionGroup?,
onInvoke: null == onInvoke
? _self.onInvoke
: onInvoke // ignore: cast_nullable_to_non_nullable
as VoidCallback,
),
);
}
}
/// @nodoc
mixin _$ComposerTriggerQuery {
String get trigger;
int get start;
int get end;
String get query;
/// Create a copy of ComposerTriggerQuery
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ComposerTriggerQueryCopyWith<ComposerTriggerQuery> get copyWith =>
_$ComposerTriggerQueryCopyWithImpl<ComposerTriggerQuery>(
this as ComposerTriggerQuery,
_$identity,
);
@override
bool operator ==(Object other) {
final _this = this as ComposerTriggerQuery;
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ComposerTriggerQuery &&
(identical(other.trigger, _this.trigger) ||
other.trigger == _this.trigger) &&
(identical(other.start, _this.start) ||
other.start == _this.start) &&
(identical(other.end, _this.end) || other.end == _this.end) &&
(identical(other.query, _this.query) ||
other.query == _this.query));
}
@override
int get hashCode {
final _this = this as ComposerTriggerQuery;
return Object.hash(
runtimeType,
_this.trigger,
_this.start,
_this.end,
_this.query,
);
}
@override
String toString() {
final _this = this as ComposerTriggerQuery;
return 'ComposerTriggerQuery(trigger: ${_this.trigger}, start: ${_this.start}, end: ${_this.end}, query: ${_this.query})';
}
}
/// @nodoc
abstract mixin class $ComposerTriggerQueryCopyWith<$Res> {
factory $ComposerTriggerQueryCopyWith(
ComposerTriggerQuery value,
$Res Function(ComposerTriggerQuery) _then,
) = _$ComposerTriggerQueryCopyWithImpl;
@useResult
$Res call({String trigger, int start, int end, String query});
}
/// @nodoc
class _$ComposerTriggerQueryCopyWithImpl<$Res>
implements $ComposerTriggerQueryCopyWith<$Res> {
_$ComposerTriggerQueryCopyWithImpl(this._self, this._then);
final ComposerTriggerQuery _self;
final $Res Function(ComposerTriggerQuery) _then;
/// Create a copy of ComposerTriggerQuery
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? trigger = null,
Object? start = null,
Object? end = null,
Object? query = null,
}) {
return _then(
ComposerTriggerQuery(
trigger: null == trigger
? _self.trigger
: trigger // ignore: cast_nullable_to_non_nullable
as String,
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,
query: null == query
? _self.query
: query // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// Adds pattern-matching-related methods to [ComposerTriggerQuery].
extension ComposerTriggerQueryPatterns on ComposerTriggerQuery {
/// 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(_ComposerTriggerQuery value)? $default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ComposerTriggerQuery() 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(_ComposerTriggerQuery value) $default,
) {
final _that = this;
switch (_that) {
case _ComposerTriggerQuery():
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(_ComposerTriggerQuery value)? $default,
) {
final _that = this;
switch (_that) {
case _ComposerTriggerQuery() 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 trigger, int start, int end, String query)?
$default, {
required TResult orElse(),
}) {
final _that = this;
switch (_that) {
case _ComposerTriggerQuery() when $default != null:
return $default(_that.trigger, _that.start, _that.end, _that.query);
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 trigger, int start, int end, String query) $default,
) {
final _that = this;
switch (_that) {
case _ComposerTriggerQuery():
return $default(_that.trigger, _that.start, _that.end, _that.query);
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 trigger, int start, int end, String query)?
$default,
) {
final _that = this;
switch (_that) {
case _ComposerTriggerQuery() when $default != null:
return $default(_that.trigger, _that.start, _that.end, _that.query);
case _:
return null;
}
}
}
/// @nodoc
class _ComposerTriggerQuery implements ComposerTriggerQuery {
const _ComposerTriggerQuery({
required this.trigger,
required this.start,
required this.end,
required this.query,
});
@override
final String trigger;
@override
final int start;
@override
final int end;
@override
final String query;
/// Create a copy of ComposerTriggerQuery
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ComposerTriggerQueryCopyWith<_ComposerTriggerQuery> get copyWith =>
__$ComposerTriggerQueryCopyWithImpl<_ComposerTriggerQuery>(
this,
_$identity,
);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _ComposerTriggerQuery &&
(identical(other.trigger, trigger) || other.trigger == trigger) &&
(identical(other.start, start) || other.start == start) &&
(identical(other.end, end) || other.end == end) &&
(identical(other.query, query) || other.query == query));
}
@override
int get hashCode {
return Object.hash(runtimeType, trigger, start, end, query);
}
@override
String toString() {
return 'ComposerTriggerQuery(trigger: $trigger, start: $start, end: $end, query: $query)';
}
}
/// @nodoc
abstract mixin class _$ComposerTriggerQueryCopyWith<$Res>
implements $ComposerTriggerQueryCopyWith<$Res> {
factory _$ComposerTriggerQueryCopyWith(
_ComposerTriggerQuery value,
$Res Function(_ComposerTriggerQuery) _then,
) = __$ComposerTriggerQueryCopyWithImpl;
@override
@useResult
$Res call({String trigger, int start, int end, String query});
}
/// @nodoc
class __$ComposerTriggerQueryCopyWithImpl<$Res>
implements _$ComposerTriggerQueryCopyWith<$Res> {
__$ComposerTriggerQueryCopyWithImpl(this._self, this._then);
final _ComposerTriggerQuery _self;
final $Res Function(_ComposerTriggerQuery) _then;
/// Create a copy of ComposerTriggerQuery
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? trigger = null,
Object? start = null,
Object? end = null,
Object? query = null,
}) {
return _then(
_ComposerTriggerQuery(
trigger: null == trigger
? _self.trigger
: trigger // ignore: cast_nullable_to_non_nullable
as String,
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,
query: null == query
? _self.query
: query // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}