From 4b7ff135d4130408cdb92b473b1d90fce7c91b71 Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Sat, 21 Jun 2025 17:02:24 +0330 Subject: [PATCH] feat : sale out of Province --- .../create_steward_free_bar.freezed.dart | 169 ++++++++++++++++++ .../create_steward_free_bar.g.dart | 33 ++++ .../iran_province_city_model.freezed.dart | 151 ++++++++++++++++ .../iran_province_city_model.g.dart | 18 ++ .../pagination_model.freezed.dart | 165 +++++++++++++++++ .../pagination_model/pagination_model.g.dart | 27 +++ 6 files changed, 563 insertions(+) create mode 100644 packages/chicken/lib/data/models/request/create_steward_free_bar/create_steward_free_bar.freezed.dart create mode 100644 packages/chicken/lib/data/models/request/create_steward_free_bar/create_steward_free_bar.g.dart create mode 100644 packages/chicken/lib/data/models/response/iran_province_city/iran_province_city_model.freezed.dart create mode 100644 packages/chicken/lib/data/models/response/iran_province_city/iran_province_city_model.g.dart create mode 100644 packages/chicken/lib/data/models/response/pagination_model/pagination_model.freezed.dart create mode 100644 packages/chicken/lib/data/models/response/pagination_model/pagination_model.g.dart diff --git a/packages/chicken/lib/data/models/request/create_steward_free_bar/create_steward_free_bar.freezed.dart b/packages/chicken/lib/data/models/request/create_steward_free_bar/create_steward_free_bar.freezed.dart new file mode 100644 index 0000000..c584671 --- /dev/null +++ b/packages/chicken/lib/data/models/request/create_steward_free_bar/create_steward_free_bar.freezed.dart @@ -0,0 +1,169 @@ +// dart format width=80 +// 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 'create_steward_free_bar.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$CreateStewardFreeBar { + + String? get productKey; String? get killHouseName; String? get killHouseMobile; String? get province; String? get city; int? get weightOfCarcasses; String? get date; String? get barImage; +/// Create a copy of CreateStewardFreeBar +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$CreateStewardFreeBarCopyWith get copyWith => _$CreateStewardFreeBarCopyWithImpl(this as CreateStewardFreeBar, _$identity); + + /// Serializes this CreateStewardFreeBar to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,productKey,killHouseName,killHouseMobile,province,city,weightOfCarcasses,date,barImage); + +@override +String toString() { + return 'CreateStewardFreeBar(productKey: $productKey, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, date: $date, barImage: $barImage)'; +} + + +} + +/// @nodoc +abstract mixin class $CreateStewardFreeBarCopyWith<$Res> { + factory $CreateStewardFreeBarCopyWith(CreateStewardFreeBar value, $Res Function(CreateStewardFreeBar) _then) = _$CreateStewardFreeBarCopyWithImpl; +@useResult +$Res call({ + String? productKey, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, String? date, String? barImage +}); + + + + +} +/// @nodoc +class _$CreateStewardFreeBarCopyWithImpl<$Res> + implements $CreateStewardFreeBarCopyWith<$Res> { + _$CreateStewardFreeBarCopyWithImpl(this._self, this._then); + + final CreateStewardFreeBar _self; + final $Res Function(CreateStewardFreeBar) _then; + +/// Create a copy of CreateStewardFreeBar +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? productKey = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,}) { + return _then(_self.copyWith( +productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable +as String?,killHouseName: freezed == killHouseName ? _self.killHouseName : killHouseName // ignore: cast_nullable_to_non_nullable +as String?,killHouseMobile: freezed == killHouseMobile ? _self.killHouseMobile : killHouseMobile // ignore: cast_nullable_to_non_nullable +as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable +as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as String?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable +as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable +as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// @nodoc +@JsonSerializable() + +class _CreateStewardFreeBar implements CreateStewardFreeBar { + const _CreateStewardFreeBar({this.productKey, this.killHouseName, this.killHouseMobile, this.province, this.city, this.weightOfCarcasses, this.date, this.barImage}); + factory _CreateStewardFreeBar.fromJson(Map json) => _$CreateStewardFreeBarFromJson(json); + +@override final String? productKey; +@override final String? killHouseName; +@override final String? killHouseMobile; +@override final String? province; +@override final String? city; +@override final int? weightOfCarcasses; +@override final String? date; +@override final String? barImage; + +/// Create a copy of CreateStewardFreeBar +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$CreateStewardFreeBarCopyWith<_CreateStewardFreeBar> get copyWith => __$CreateStewardFreeBarCopyWithImpl<_CreateStewardFreeBar>(this, _$identity); + +@override +Map toJson() { + return _$CreateStewardFreeBarToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,productKey,killHouseName,killHouseMobile,province,city,weightOfCarcasses,date,barImage); + +@override +String toString() { + return 'CreateStewardFreeBar(productKey: $productKey, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, date: $date, barImage: $barImage)'; +} + + +} + +/// @nodoc +abstract mixin class _$CreateStewardFreeBarCopyWith<$Res> implements $CreateStewardFreeBarCopyWith<$Res> { + factory _$CreateStewardFreeBarCopyWith(_CreateStewardFreeBar value, $Res Function(_CreateStewardFreeBar) _then) = __$CreateStewardFreeBarCopyWithImpl; +@override @useResult +$Res call({ + String? productKey, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, String? date, String? barImage +}); + + + + +} +/// @nodoc +class __$CreateStewardFreeBarCopyWithImpl<$Res> + implements _$CreateStewardFreeBarCopyWith<$Res> { + __$CreateStewardFreeBarCopyWithImpl(this._self, this._then); + + final _CreateStewardFreeBar _self; + final $Res Function(_CreateStewardFreeBar) _then; + +/// Create a copy of CreateStewardFreeBar +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? productKey = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,}) { + return _then(_CreateStewardFreeBar( +productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable +as String?,killHouseName: freezed == killHouseName ? _self.killHouseName : killHouseName // ignore: cast_nullable_to_non_nullable +as String?,killHouseMobile: freezed == killHouseMobile ? _self.killHouseMobile : killHouseMobile // ignore: cast_nullable_to_non_nullable +as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable +as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as String?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable +as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable +as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + +} + +// dart format on diff --git a/packages/chicken/lib/data/models/request/create_steward_free_bar/create_steward_free_bar.g.dart b/packages/chicken/lib/data/models/request/create_steward_free_bar/create_steward_free_bar.g.dart new file mode 100644 index 0000000..50b4a74 --- /dev/null +++ b/packages/chicken/lib/data/models/request/create_steward_free_bar/create_steward_free_bar.g.dart @@ -0,0 +1,33 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'create_steward_free_bar.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_CreateStewardFreeBar _$CreateStewardFreeBarFromJson( + Map json, +) => _CreateStewardFreeBar( + productKey: json['product_key'] as String?, + killHouseName: json['kill_house_name'] as String?, + killHouseMobile: json['kill_house_mobile'] as String?, + province: json['province'] as String?, + city: json['city'] as String?, + weightOfCarcasses: (json['weight_of_carcasses'] as num?)?.toInt(), + date: json['date'] as String?, + barImage: json['bar_image'] as String?, +); + +Map _$CreateStewardFreeBarToJson( + _CreateStewardFreeBar instance, +) => { + 'product_key': instance.productKey, + 'kill_house_name': instance.killHouseName, + 'kill_house_mobile': instance.killHouseMobile, + 'province': instance.province, + 'city': instance.city, + 'weight_of_carcasses': instance.weightOfCarcasses, + 'date': instance.date, + 'bar_image': instance.barImage, +}; diff --git a/packages/chicken/lib/data/models/response/iran_province_city/iran_province_city_model.freezed.dart b/packages/chicken/lib/data/models/response/iran_province_city/iran_province_city_model.freezed.dart new file mode 100644 index 0000000..d99f6ea --- /dev/null +++ b/packages/chicken/lib/data/models/response/iran_province_city/iran_province_city_model.freezed.dart @@ -0,0 +1,151 @@ +// dart format width=80 +// 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 'iran_province_city_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$IranProvinceCityModel { + + int? get id; String? get name; +/// Create a copy of IranProvinceCityModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$IranProvinceCityModelCopyWith get copyWith => _$IranProvinceCityModelCopyWithImpl(this as IranProvinceCityModel, _$identity); + + /// Serializes this IranProvinceCityModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is IranProvinceCityModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name); + +@override +String toString() { + return 'IranProvinceCityModel(id: $id, name: $name)'; +} + + +} + +/// @nodoc +abstract mixin class $IranProvinceCityModelCopyWith<$Res> { + factory $IranProvinceCityModelCopyWith(IranProvinceCityModel value, $Res Function(IranProvinceCityModel) _then) = _$IranProvinceCityModelCopyWithImpl; +@useResult +$Res call({ + int? id, String? name +}); + + + + +} +/// @nodoc +class _$IranProvinceCityModelCopyWithImpl<$Res> + implements $IranProvinceCityModelCopyWith<$Res> { + _$IranProvinceCityModelCopyWithImpl(this._self, this._then); + + final IranProvinceCityModel _self; + final $Res Function(IranProvinceCityModel) _then; + +/// Create a copy of IranProvinceCityModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? name = freezed,}) { + return _then(_self.copyWith( +id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// @nodoc +@JsonSerializable() + +class _IranProvinceCityModel implements IranProvinceCityModel { + const _IranProvinceCityModel({this.id, this.name}); + factory _IranProvinceCityModel.fromJson(Map json) => _$IranProvinceCityModelFromJson(json); + +@override final int? id; +@override final String? name; + +/// Create a copy of IranProvinceCityModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$IranProvinceCityModelCopyWith<_IranProvinceCityModel> get copyWith => __$IranProvinceCityModelCopyWithImpl<_IranProvinceCityModel>(this, _$identity); + +@override +Map toJson() { + return _$IranProvinceCityModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _IranProvinceCityModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,name); + +@override +String toString() { + return 'IranProvinceCityModel(id: $id, name: $name)'; +} + + +} + +/// @nodoc +abstract mixin class _$IranProvinceCityModelCopyWith<$Res> implements $IranProvinceCityModelCopyWith<$Res> { + factory _$IranProvinceCityModelCopyWith(_IranProvinceCityModel value, $Res Function(_IranProvinceCityModel) _then) = __$IranProvinceCityModelCopyWithImpl; +@override @useResult +$Res call({ + int? id, String? name +}); + + + + +} +/// @nodoc +class __$IranProvinceCityModelCopyWithImpl<$Res> + implements _$IranProvinceCityModelCopyWith<$Res> { + __$IranProvinceCityModelCopyWithImpl(this._self, this._then); + + final _IranProvinceCityModel _self; + final $Res Function(_IranProvinceCityModel) _then; + +/// Create a copy of IranProvinceCityModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? name = freezed,}) { + return _then(_IranProvinceCityModel( +id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + +} + +// dart format on diff --git a/packages/chicken/lib/data/models/response/iran_province_city/iran_province_city_model.g.dart b/packages/chicken/lib/data/models/response/iran_province_city/iran_province_city_model.g.dart new file mode 100644 index 0000000..89f2c4a --- /dev/null +++ b/packages/chicken/lib/data/models/response/iran_province_city/iran_province_city_model.g.dart @@ -0,0 +1,18 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'iran_province_city_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_IranProvinceCityModel _$IranProvinceCityModelFromJson( + Map json, +) => _IranProvinceCityModel( + id: (json['id'] as num?)?.toInt(), + name: json['name'] as String?, +); + +Map _$IranProvinceCityModelToJson( + _IranProvinceCityModel instance, +) => {'id': instance.id, 'name': instance.name}; diff --git a/packages/chicken/lib/data/models/response/pagination_model/pagination_model.freezed.dart b/packages/chicken/lib/data/models/response/pagination_model/pagination_model.freezed.dart new file mode 100644 index 0000000..cb35b63 --- /dev/null +++ b/packages/chicken/lib/data/models/response/pagination_model/pagination_model.freezed.dart @@ -0,0 +1,165 @@ +// dart format width=80 +// 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 'pagination_model.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$PaginationModel { + + int? get count; String? get next; String? get previous; List? get results; +/// Create a copy of PaginationModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$PaginationModelCopyWith> get copyWith => _$PaginationModelCopyWithImpl>(this as PaginationModel, _$identity); + + /// Serializes this PaginationModel to a JSON map. + Map toJson(Object? Function(T) toJsonT); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is PaginationModel&&(identical(other.count, count) || other.count == count)&&(identical(other.next, next) || other.next == next)&&(identical(other.previous, previous) || other.previous == previous)&&const DeepCollectionEquality().equals(other.results, results)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,count,next,previous,const DeepCollectionEquality().hash(results)); + +@override +String toString() { + return 'PaginationModel<$T>(count: $count, next: $next, previous: $previous, results: $results)'; +} + + +} + +/// @nodoc +abstract mixin class $PaginationModelCopyWith { + factory $PaginationModelCopyWith(PaginationModel value, $Res Function(PaginationModel) _then) = _$PaginationModelCopyWithImpl; +@useResult +$Res call({ + int? count, String? next, String? previous, List? results +}); + + + + +} +/// @nodoc +class _$PaginationModelCopyWithImpl + implements $PaginationModelCopyWith { + _$PaginationModelCopyWithImpl(this._self, this._then); + + final PaginationModel _self; + final $Res Function(PaginationModel) _then; + +/// Create a copy of PaginationModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? count = freezed,Object? next = freezed,Object? previous = freezed,Object? results = freezed,}) { + return _then(_self.copyWith( +count: freezed == count ? _self.count : count // ignore: cast_nullable_to_non_nullable +as int?,next: freezed == next ? _self.next : next // ignore: cast_nullable_to_non_nullable +as String?,previous: freezed == previous ? _self.previous : previous // ignore: cast_nullable_to_non_nullable +as String?,results: freezed == results ? _self.results : results // ignore: cast_nullable_to_non_nullable +as List?, + )); +} + +} + + +/// @nodoc +@JsonSerializable(genericArgumentFactories: true) + +class _PaginationModel implements PaginationModel { + const _PaginationModel({this.count, this.next, this.previous, final List? results}): _results = results; + factory _PaginationModel.fromJson(Map json,T Function(Object?) fromJsonT) => _$PaginationModelFromJson(json,fromJsonT); + +@override final int? count; +@override final String? next; +@override final String? previous; + final List? _results; +@override List? get results { + final value = _results; + if (value == null) return null; + if (_results is EqualUnmodifiableListView) return _results; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} + + +/// Create a copy of PaginationModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$PaginationModelCopyWith> get copyWith => __$PaginationModelCopyWithImpl>(this, _$identity); + +@override +Map toJson(Object? Function(T) toJsonT) { + return _$PaginationModelToJson(this, toJsonT); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _PaginationModel&&(identical(other.count, count) || other.count == count)&&(identical(other.next, next) || other.next == next)&&(identical(other.previous, previous) || other.previous == previous)&&const DeepCollectionEquality().equals(other._results, _results)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,count,next,previous,const DeepCollectionEquality().hash(_results)); + +@override +String toString() { + return 'PaginationModel<$T>(count: $count, next: $next, previous: $previous, results: $results)'; +} + + +} + +/// @nodoc +abstract mixin class _$PaginationModelCopyWith implements $PaginationModelCopyWith { + factory _$PaginationModelCopyWith(_PaginationModel value, $Res Function(_PaginationModel) _then) = __$PaginationModelCopyWithImpl; +@override @useResult +$Res call({ + int? count, String? next, String? previous, List? results +}); + + + + +} +/// @nodoc +class __$PaginationModelCopyWithImpl + implements _$PaginationModelCopyWith { + __$PaginationModelCopyWithImpl(this._self, this._then); + + final _PaginationModel _self; + final $Res Function(_PaginationModel) _then; + +/// Create a copy of PaginationModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? count = freezed,Object? next = freezed,Object? previous = freezed,Object? results = freezed,}) { + return _then(_PaginationModel( +count: freezed == count ? _self.count : count // ignore: cast_nullable_to_non_nullable +as int?,next: freezed == next ? _self.next : next // ignore: cast_nullable_to_non_nullable +as String?,previous: freezed == previous ? _self.previous : previous // ignore: cast_nullable_to_non_nullable +as String?,results: freezed == results ? _self._results : results // ignore: cast_nullable_to_non_nullable +as List?, + )); +} + + +} + +// dart format on diff --git a/packages/chicken/lib/data/models/response/pagination_model/pagination_model.g.dart b/packages/chicken/lib/data/models/response/pagination_model/pagination_model.g.dart new file mode 100644 index 0000000..bc0f5a6 --- /dev/null +++ b/packages/chicken/lib/data/models/response/pagination_model/pagination_model.g.dart @@ -0,0 +1,27 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'pagination_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_PaginationModel _$PaginationModelFromJson( + Map json, + T Function(Object? json) fromJsonT, +) => _PaginationModel( + count: (json['count'] as num?)?.toInt(), + next: json['next'] as String?, + previous: json['previous'] as String?, + results: (json['results'] as List?)?.map(fromJsonT).toList(), +); + +Map _$PaginationModelToJson( + _PaginationModel instance, + Object? Function(T value) toJsonT, +) => { + 'count': instance.count, + 'next': instance.next, + 'previous': instance.previous, + 'results': instance.results?.map(toJsonT).toList(), +};