Files
eatvio_app/lib/features/registration/models/location_model.freezed.dart
2024-08-02 11:52:10 +03:00

171 lines
5.9 KiB
Dart

// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// 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 'location_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
LocationModel _$LocationModelFromJson(Map<String, dynamic> json) {
return _LocationModel.fromJson(json);
}
/// @nodoc
mixin _$LocationModel {
List<String> get locations => throw _privateConstructorUsedError;
@JsonKey(name: 'response_body')
String get responseBody => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$LocationModelCopyWith<LocationModel> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $LocationModelCopyWith<$Res> {
factory $LocationModelCopyWith(LocationModel value, $Res Function(LocationModel) then) = _$LocationModelCopyWithImpl<$Res, LocationModel>;
@useResult
$Res call({List<String> locations, @JsonKey(name: 'response_body') String responseBody});
}
/// @nodoc
class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel> implements $LocationModelCopyWith<$Res> {
_$LocationModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? locations = null,
Object? responseBody = null,
}) {
return _then(_value.copyWith(
locations: null == locations
? _value.locations
: locations // ignore: cast_nullable_to_non_nullable
as List<String>,
responseBody: null == responseBody
? _value.responseBody
: responseBody // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}
/// @nodoc
abstract class _$$LocationModelImplCopyWith<$Res> implements $LocationModelCopyWith<$Res> {
factory _$$LocationModelImplCopyWith(_$LocationModelImpl value, $Res Function(_$LocationModelImpl) then) = __$$LocationModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({List<String> locations, @JsonKey(name: 'response_body') String responseBody});
}
/// @nodoc
class __$$LocationModelImplCopyWithImpl<$Res> extends _$LocationModelCopyWithImpl<$Res, _$LocationModelImpl> implements _$$LocationModelImplCopyWith<$Res> {
__$$LocationModelImplCopyWithImpl(_$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then) : super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? locations = null,
Object? responseBody = null,
}) {
return _then(_$LocationModelImpl(
locations: null == locations
? _value._locations
: locations // ignore: cast_nullable_to_non_nullable
as List<String>,
responseBody: null == responseBody
? _value.responseBody
: responseBody // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
@JsonSerializable()
class _$LocationModelImpl implements _LocationModel {
const _$LocationModelImpl({required final List<String> locations, @JsonKey(name: 'response_body') required this.responseBody}) : _locations = locations;
factory _$LocationModelImpl.fromJson(Map<String, dynamic> json) => _$$LocationModelImplFromJson(json);
final List<String> _locations;
@override
List<String> get locations {
if (_locations is EqualUnmodifiableListView) return _locations;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_locations);
}
@override
@JsonKey(name: 'response_body')
final String responseBody;
@override
String toString() {
return 'LocationModel(locations: $locations, responseBody: $responseBody)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$LocationModelImpl &&
const DeepCollectionEquality().equals(other._locations, _locations) &&
(identical(other.responseBody, responseBody) || other.responseBody == responseBody));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_locations), responseBody);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith => __$$LocationModelImplCopyWithImpl<_$LocationModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$LocationModelImplToJson(
this,
);
}
}
abstract class _LocationModel implements LocationModel {
const factory _LocationModel({required final List<String> locations, @JsonKey(name: 'response_body') required final String responseBody}) =
_$LocationModelImpl;
factory _LocationModel.fromJson(Map<String, dynamic> json) = _$LocationModelImpl.fromJson;
@override
List<String> get locations;
@override
@JsonKey(name: 'response_body')
String get responseBody;
@override
@JsonKey(ignore: true)
_$$LocationModelImplCopyWith<_$LocationModelImpl> get copyWith => throw _privateConstructorUsedError;
}