Updated freezed codes

This commit is contained in:
Ashita Prasad
2024-12-19 21:56:10 +05:30
parent 53b72af547
commit 9baac42cb1
2 changed files with 34 additions and 8 deletions

View File

@ -30,8 +30,12 @@ mixin _$HttpRequestModel {
String? get body => throw _privateConstructorUsedError; String? get body => throw _privateConstructorUsedError;
List<FormDataModel>? get formData => throw _privateConstructorUsedError; List<FormDataModel>? get formData => throw _privateConstructorUsedError;
/// Serializes this HttpRequestModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of HttpRequestModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$HttpRequestModelCopyWith<HttpRequestModel> get copyWith => $HttpRequestModelCopyWith<HttpRequestModel> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@ -64,6 +68,8 @@ class _$HttpRequestModelCopyWithImpl<$Res, $Val extends HttpRequestModel>
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of HttpRequestModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@ -146,6 +152,8 @@ class __$$HttpRequestModelImplCopyWithImpl<$Res>
$Res Function(_$HttpRequestModelImpl) _then) $Res Function(_$HttpRequestModelImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of HttpRequestModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@ -311,7 +319,7 @@ class _$HttpRequestModelImpl extends _HttpRequestModel {
const DeepCollectionEquality().equals(other._formData, _formData)); const DeepCollectionEquality().equals(other._formData, _formData));
} }
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash( int get hashCode => Object.hash(
runtimeType, runtimeType,
@ -325,7 +333,9 @@ class _$HttpRequestModelImpl extends _HttpRequestModel {
body, body,
const DeepCollectionEquality().hash(_formData)); const DeepCollectionEquality().hash(_formData));
@JsonKey(ignore: true) /// Create a copy of HttpRequestModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$HttpRequestModelImplCopyWith<_$HttpRequestModelImpl> get copyWith => _$$HttpRequestModelImplCopyWith<_$HttpRequestModelImpl> get copyWith =>
@ -374,8 +384,11 @@ abstract class _HttpRequestModel extends HttpRequestModel {
String? get body; String? get body;
@override @override
List<FormDataModel>? get formData; List<FormDataModel>? get formData;
/// Create a copy of HttpRequestModel
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$HttpRequestModelImplCopyWith<_$HttpRequestModelImpl> get copyWith => _$$HttpRequestModelImplCopyWith<_$HttpRequestModelImpl> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }

View File

@ -30,8 +30,12 @@ mixin _$HttpResponseModel {
@DurationConverter() @DurationConverter()
Duration? get time => throw _privateConstructorUsedError; Duration? get time => throw _privateConstructorUsedError;
/// Serializes this HttpResponseModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of HttpResponseModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$HttpResponseModelCopyWith<HttpResponseModel> get copyWith => $HttpResponseModelCopyWith<HttpResponseModel> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }
@ -62,6 +66,8 @@ class _$HttpResponseModelCopyWithImpl<$Res, $Val extends HttpResponseModel>
// ignore: unused_field // ignore: unused_field
final $Res Function($Val) _then; final $Res Function($Val) _then;
/// Create a copy of HttpResponseModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@ -132,6 +138,8 @@ class __$$HttpResponseModelImplCopyWithImpl<$Res>
$Res Function(_$HttpResponseModelImpl) _then) $Res Function(_$HttpResponseModelImpl) _then)
: super(_value, _then); : super(_value, _then);
/// Create a copy of HttpResponseModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
@override @override
$Res call({ $Res call({
@ -250,7 +258,7 @@ class _$HttpResponseModelImpl extends _HttpResponseModel {
(identical(other.time, time) || other.time == time)); (identical(other.time, time) || other.time == time));
} }
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
@override @override
int get hashCode => Object.hash( int get hashCode => Object.hash(
runtimeType, runtimeType,
@ -262,7 +270,9 @@ class _$HttpResponseModelImpl extends _HttpResponseModel {
const DeepCollectionEquality().hash(bodyBytes), const DeepCollectionEquality().hash(bodyBytes),
time); time);
@JsonKey(ignore: true) /// Create a copy of HttpResponseModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$HttpResponseModelImplCopyWith<_$HttpResponseModelImpl> get copyWith => _$$HttpResponseModelImplCopyWith<_$HttpResponseModelImpl> get copyWith =>
@ -307,8 +317,11 @@ abstract class _HttpResponseModel extends HttpResponseModel {
@override @override
@DurationConverter() @DurationConverter()
Duration? get time; Duration? get time;
/// Create a copy of HttpResponseModel
/// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(ignore: true) @JsonKey(includeFromJson: false, includeToJson: false)
_$$HttpResponseModelImplCopyWith<_$HttpResponseModelImpl> get copyWith => _$$HttpResponseModelImplCopyWith<_$HttpResponseModelImpl> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
} }