// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// 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 '../../../presentation/app/concierge_cubit.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ConciergeState {
Map<int, DataState> get products; String get roomNumber;
/// Create a copy of ConciergeState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ConciergeStateCopyWith<ConciergeState> get copyWith => _$ConciergeStateCopyWithImpl<ConciergeState>(this as ConciergeState, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ConciergeState&&const DeepCollectionEquality().equals(other.products, products)&&(identical(other.roomNumber, roomNumber) || other.roomNumber == roomNumber));
}
@override
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(products),roomNumber);
@override
String toString() {
return 'ConciergeState(products: $products, roomNumber: $roomNumber)';
}
}
/// @nodoc
abstract mixin class $ConciergeStateCopyWith<$Res> {
factory $ConciergeStateCopyWith(ConciergeState value, $Res Function(ConciergeState) _then) = _$ConciergeStateCopyWithImpl;
@useResult
$Res call({
Map<int, DataState> products, String roomNumber
});
}
/// @nodoc
class _$ConciergeStateCopyWithImpl<$Res>
implements $ConciergeStateCopyWith<$Res> {
_$ConciergeStateCopyWithImpl(this._self, this._then);
final ConciergeState _self;
final $Res Function(ConciergeState) _then;
/// Create a copy of ConciergeState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? products = null,Object? roomNumber = null,}) {
return _then(_self.copyWith(
products: null == products ? _self.products : products // ignore: cast_nullable_to_non_nullable
as Map<int, DataState>,roomNumber: null == roomNumber ? _self.roomNumber : roomNumber // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [ConciergeState].
extension ConciergeStatePatterns on ConciergeState {
/// 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( _ConciergeState value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ConciergeState() 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( _ConciergeState value) $default,){
final _that = this;
switch (_that) {
case _ConciergeState():
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( _ConciergeState value)? $default,){
final _that = this;
switch (_that) {
case _ConciergeState() 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( Map<int, DataState> products, String roomNumber)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ConciergeState() when $default != null:
return $default(_that.products,_that.roomNumber);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( Map<int, DataState> products, String roomNumber) $default,) {final _that = this;
switch (_that) {
case _ConciergeState():
return $default(_that.products,_that.roomNumber);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( Map<int, DataState> products, String roomNumber)? $default,) {final _that = this;
switch (_that) {
case _ConciergeState() when $default != null:
return $default(_that.products,_that.roomNumber);case _:
return null;
}
}
}
/// @nodoc
class _ConciergeState implements ConciergeState {
const _ConciergeState({final Map<int, DataState> products = const {}, this.roomNumber = ""}): _products = products;
final Map<int, DataState> _products;
@override@JsonKey() Map<int, DataState> get products {
if (_products is EqualUnmodifiableMapView) return _products;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(_products);
}
@override@JsonKey() final String roomNumber;
/// Create a copy of ConciergeState
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ConciergeStateCopyWith<_ConciergeState> get copyWith => __$ConciergeStateCopyWithImpl<_ConciergeState>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ConciergeState&&const DeepCollectionEquality().equals(other._products, _products)&&(identical(other.roomNumber, roomNumber) || other.roomNumber == roomNumber));
}
@override
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_products),roomNumber);
@override
String toString() {
return 'ConciergeState(products: $products, roomNumber: $roomNumber)';
}
}
/// @nodoc
abstract mixin class _$ConciergeStateCopyWith<$Res> implements $ConciergeStateCopyWith<$Res> {
factory _$ConciergeStateCopyWith(_ConciergeState value, $Res Function(_ConciergeState) _then) = __$ConciergeStateCopyWithImpl;
@override @useResult
$Res call({
Map<int, DataState> products, String roomNumber
});
}
/// @nodoc
class __$ConciergeStateCopyWithImpl<$Res>
implements _$ConciergeStateCopyWith<$Res> {
__$ConciergeStateCopyWithImpl(this._self, this._then);
final _ConciergeState _self;
final $Res Function(_ConciergeState) _then;
/// Create a copy of ConciergeState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? products = null,Object? roomNumber = null,}) {
return _then(_ConciergeState(
products: null == products ? _self._products : products // ignore: cast_nullable_to_non_nullable
as Map<int, DataState>,roomNumber: null == roomNumber ? _self.roomNumber : roomNumber // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
// dart format on