// 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 'project_locator.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND T _$identity(T value) => value; /// @nodoc mixin _$ProjectLocation { RecentProject get project; /// Create a copy of ProjectLocation /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ProjectLocationCopyWith get copyWith => _$ProjectLocationCopyWithImpl( this as ProjectLocation, _$identity, ); @override bool operator ==(Object other) { final _this = this as ProjectLocation; return identical(this, other) || (other.runtimeType == runtimeType && other is ProjectLocation && (identical(other.project, _this.project) || other.project == _this.project)); } @override int get hashCode { final _this = this as ProjectLocation; return Object.hash(runtimeType, _this.project); } @override String toString() { final _this = this as ProjectLocation; return 'ProjectLocation(project: ${_this.project})'; } } /// @nodoc abstract mixin class $ProjectLocationCopyWith<$Res> { factory $ProjectLocationCopyWith( ProjectLocation value, $Res Function(ProjectLocation) _then, ) = _$ProjectLocationCopyWithImpl; @useResult $Res call({RecentProject project}); $RecentProjectCopyWith<$Res> get project; } /// @nodoc class _$ProjectLocationCopyWithImpl<$Res> implements $ProjectLocationCopyWith<$Res> { _$ProjectLocationCopyWithImpl(this._self, this._then); final ProjectLocation _self; final $Res Function(ProjectLocation) _then; /// Create a copy of ProjectLocation /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? project = null}) { return _then( ProjectLocation( null == project ? _self.project : project // ignore: cast_nullable_to_non_nullable as RecentProject, ), ); } /// Create a copy of ProjectLocation /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $RecentProjectCopyWith<$Res> get project { return $RecentProjectCopyWith<$Res>(_self.project, (value) { return _then(_self.copyWith(project: value)); }); } } /// Adds pattern-matching-related methods to [ProjectLocation]. extension ProjectLocationPatterns on ProjectLocation { /// 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(_ProjectLocation value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _ProjectLocation() 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 Function(_ProjectLocation value) $default, ) { final _that = this; switch (_that) { case _ProjectLocation(): 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? Function(_ProjectLocation value)? $default, ) { final _that = this; switch (_that) { case _ProjectLocation() 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 Function(RecentProject project)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _ProjectLocation() when $default != null: return $default(_that.project); 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 Function(RecentProject project) $default, ) { final _that = this; switch (_that) { case _ProjectLocation(): return $default(_that.project); 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? Function(RecentProject project)? $default, ) { final _that = this; switch (_that) { case _ProjectLocation() when $default != null: return $default(_that.project); case _: return null; } } } /// @nodoc class _ProjectLocation extends ProjectLocation { const _ProjectLocation(this.project) : super._(); @override final RecentProject project; /// Create a copy of ProjectLocation /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ProjectLocationCopyWith<_ProjectLocation> get copyWith => __$ProjectLocationCopyWithImpl<_ProjectLocation>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _ProjectLocation && (identical(other.project, project) || other.project == project)); } @override int get hashCode { return Object.hash(runtimeType, project); } @override String toString() { return 'ProjectLocation(project: $project)'; } } /// @nodoc abstract mixin class _$ProjectLocationCopyWith<$Res> implements $ProjectLocationCopyWith<$Res> { factory _$ProjectLocationCopyWith( _ProjectLocation value, $Res Function(_ProjectLocation) _then, ) = __$ProjectLocationCopyWithImpl; @override @useResult $Res call({RecentProject project}); @override $RecentProjectCopyWith<$Res> get project; } /// @nodoc class __$ProjectLocationCopyWithImpl<$Res> implements _$ProjectLocationCopyWith<$Res> { __$ProjectLocationCopyWithImpl(this._self, this._then); final _ProjectLocation _self; final $Res Function(_ProjectLocation) _then; /// Create a copy of ProjectLocation /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? project = null}) { return _then( _ProjectLocation( null == project ? _self.project : project // ignore: cast_nullable_to_non_nullable as RecentProject, ), ); } /// Create a copy of ProjectLocation /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $RecentProjectCopyWith<$Res> get project { return $RecentProjectCopyWith<$Res>(_self.project, (value) { return _then(_self.copyWith(project: value)); }); } }