// 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_suggestion_surface.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND T _$identity(T value) => value; /// @nodoc mixin _$SuggestionRow { @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _SuggestionRow); } @override int get hashCode => runtimeType.hashCode; @override String toString() { return '_SuggestionRow()'; } } /// @nodoc class _$SuggestionRowCopyWith<$Res> { _$SuggestionRowCopyWith(_SuggestionRow _, $Res Function(_SuggestionRow) __); } /// Adds pattern-matching-related methods to [_SuggestionRow]. extension _SuggestionRowPatterns on _SuggestionRow { /// 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 Function(_SuggestionHeader value)? header, TResult Function(_SuggestionOption value)? option, required TResult orElse(), }) { final _that = this; switch (_that) { case _SuggestionHeader() when header != null: return header(_that); case _SuggestionOption() when option != null: return option(_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({ required TResult Function(_SuggestionHeader value) header, required TResult Function(_SuggestionOption value) option, }) { final _that = this; switch (_that) { case _SuggestionHeader(): return header(_that); case _SuggestionOption(): return option(_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? Function(_SuggestionHeader value)? header, TResult? Function(_SuggestionOption value)? option, }) { final _that = this; switch (_that) { case _SuggestionHeader() when header != null: return header(_that); case _SuggestionOption() when option != null: return option(_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 Function(ComposerOptionGroup group, double height)? header, TResult Function(ComposerOption option, int optionIndex)? option, required TResult orElse(), }) { final _that = this; switch (_that) { case _SuggestionHeader() when header != null: return header(_that.group, _that.height); case _SuggestionOption() when option != null: return option(_that.option, _that.optionIndex); 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({ required TResult Function(ComposerOptionGroup group, double height) header, required TResult Function(ComposerOption option, int optionIndex) option, }) { final _that = this; switch (_that) { case _SuggestionHeader(): return header(_that.group, _that.height); case _SuggestionOption(): return option(_that.option, _that.optionIndex); } } /// 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? Function(ComposerOptionGroup group, double height)? header, TResult? Function(ComposerOption option, int optionIndex)? option, }) { final _that = this; switch (_that) { case _SuggestionHeader() when header != null: return header(_that.group, _that.height); case _SuggestionOption() when option != null: return option(_that.option, _that.optionIndex); case _: return null; } } } /// @nodoc class _SuggestionHeader extends _SuggestionRow { const _SuggestionHeader(this.group, this.height) : super._(); final ComposerOptionGroup group; final double height; /// Create a copy of _SuggestionRow /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SuggestionHeaderCopyWith<_SuggestionHeader> get copyWith => __$SuggestionHeaderCopyWithImpl<_SuggestionHeader>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _SuggestionHeader && (identical(other.group, group) || other.group == group) && (identical(other.height, height) || other.height == height)); } @override int get hashCode { return Object.hash(runtimeType, group, height); } @override String toString() { return '_SuggestionRow.header(group: $group, height: $height)'; } } /// @nodoc abstract mixin class _$SuggestionHeaderCopyWith<$Res> implements _$SuggestionRowCopyWith<$Res> { factory _$SuggestionHeaderCopyWith( _SuggestionHeader value, $Res Function(_SuggestionHeader) _then, ) = __$SuggestionHeaderCopyWithImpl; @useResult $Res call({ComposerOptionGroup group, double height}); } /// @nodoc class __$SuggestionHeaderCopyWithImpl<$Res> implements _$SuggestionHeaderCopyWith<$Res> { __$SuggestionHeaderCopyWithImpl(this._self, this._then); final _SuggestionHeader _self; final $Res Function(_SuggestionHeader) _then; /// Create a copy of _SuggestionRow /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') $Res call({Object? group = null, Object? height = null}) { return _then( _SuggestionHeader( null == group ? _self.group : group // ignore: cast_nullable_to_non_nullable as ComposerOptionGroup, null == height ? _self.height : height // ignore: cast_nullable_to_non_nullable as double, ), ); } } /// @nodoc class _SuggestionOption extends _SuggestionRow { const _SuggestionOption(this.option, this.optionIndex) : super._(); final ComposerOption option; final int optionIndex; /// Create a copy of _SuggestionRow /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$SuggestionOptionCopyWith<_SuggestionOption> get copyWith => __$SuggestionOptionCopyWithImpl<_SuggestionOption>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _SuggestionOption && (identical(other.option, option) || other.option == option) && (identical(other.optionIndex, optionIndex) || other.optionIndex == optionIndex)); } @override int get hashCode { return Object.hash(runtimeType, option, optionIndex); } @override String toString() { return '_SuggestionRow.option(option: $option, optionIndex: $optionIndex)'; } } /// @nodoc abstract mixin class _$SuggestionOptionCopyWith<$Res> implements _$SuggestionRowCopyWith<$Res> { factory _$SuggestionOptionCopyWith( _SuggestionOption value, $Res Function(_SuggestionOption) _then, ) = __$SuggestionOptionCopyWithImpl; @useResult $Res call({ComposerOption option, int optionIndex}); $ComposerOptionCopyWith<$Res> get option; } /// @nodoc class __$SuggestionOptionCopyWithImpl<$Res> implements _$SuggestionOptionCopyWith<$Res> { __$SuggestionOptionCopyWithImpl(this._self, this._then); final _SuggestionOption _self; final $Res Function(_SuggestionOption) _then; /// Create a copy of _SuggestionRow /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') $Res call({Object? option = null, Object? optionIndex = null}) { return _then( _SuggestionOption( null == option ? _self.option : option // ignore: cast_nullable_to_non_nullable as ComposerOption, null == optionIndex ? _self.optionIndex : optionIndex // ignore: cast_nullable_to_non_nullable as int, ), ); } /// Create a copy of _SuggestionRow /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $ComposerOptionCopyWith<$Res> get option { return $ComposerOptionCopyWith<$Res>(_self.option, (value) { return _then(_self.copyWith(option: value)); }); } }