feat: enhance kill house - submit request module with submit request functionality, including new models, repository updates, and UI integration

This commit is contained in:
2025-12-01 09:42:26 +03:30
parent b5904d753c
commit 6861e873ba
99 changed files with 5764 additions and 606 deletions

View File

@@ -0,0 +1,26 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'kill_request_response.freezed.dart';
part 'kill_request_response.g.dart';
@freezed
abstract class KillRequestResponse with _$KillRequestResponse {
const factory KillRequestResponse({
int? killCapacity,
String? reciveTime,
String? reciveDate,
bool? lowWeight,
bool? highWeight,
@JsonKey(name: "Index_weight") double? indexWeight,
String? chickenBreed,
bool? cash,
bool? credit,
bool? smsPayment,
String? killHouseKey,
String? killerKillHouseKey,
String? role,
}) = _KillRequestResponse;
factory KillRequestResponse.fromJson(Map<String, dynamic> json) =>
_$KillRequestResponseFromJson(json);
}

View File

@@ -0,0 +1,313 @@
// 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 'kill_request_response.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$KillRequestResponse {
int? get killCapacity; String? get reciveTime; String? get reciveDate; bool? get lowWeight; bool? get highWeight;@JsonKey(name: "Index_weight") double? get indexWeight; String? get chickenBreed; bool? get cash; bool? get credit; bool? get smsPayment; String? get killHouseKey; String? get killerKillHouseKey; String? get role;
/// Create a copy of KillRequestResponse
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$KillRequestResponseCopyWith<KillRequestResponse> get copyWith => _$KillRequestResponseCopyWithImpl<KillRequestResponse>(this as KillRequestResponse, _$identity);
/// Serializes this KillRequestResponse to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillRequestResponse&&(identical(other.killCapacity, killCapacity) || other.killCapacity == killCapacity)&&(identical(other.reciveTime, reciveTime) || other.reciveTime == reciveTime)&&(identical(other.reciveDate, reciveDate) || other.reciveDate == reciveDate)&&(identical(other.lowWeight, lowWeight) || other.lowWeight == lowWeight)&&(identical(other.highWeight, highWeight) || other.highWeight == highWeight)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.chickenBreed, chickenBreed) || other.chickenBreed == chickenBreed)&&(identical(other.cash, cash) || other.cash == cash)&&(identical(other.credit, credit) || other.credit == credit)&&(identical(other.smsPayment, smsPayment) || other.smsPayment == smsPayment)&&(identical(other.killHouseKey, killHouseKey) || other.killHouseKey == killHouseKey)&&(identical(other.killerKillHouseKey, killerKillHouseKey) || other.killerKillHouseKey == killerKillHouseKey)&&(identical(other.role, role) || other.role == role));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,killCapacity,reciveTime,reciveDate,lowWeight,highWeight,indexWeight,chickenBreed,cash,credit,smsPayment,killHouseKey,killerKillHouseKey,role);
@override
String toString() {
return 'KillRequestResponse(killCapacity: $killCapacity, reciveTime: $reciveTime, reciveDate: $reciveDate, lowWeight: $lowWeight, highWeight: $highWeight, indexWeight: $indexWeight, chickenBreed: $chickenBreed, cash: $cash, credit: $credit, smsPayment: $smsPayment, killHouseKey: $killHouseKey, killerKillHouseKey: $killerKillHouseKey, role: $role)';
}
}
/// @nodoc
abstract mixin class $KillRequestResponseCopyWith<$Res> {
factory $KillRequestResponseCopyWith(KillRequestResponse value, $Res Function(KillRequestResponse) _then) = _$KillRequestResponseCopyWithImpl;
@useResult
$Res call({
int? killCapacity, String? reciveTime, String? reciveDate, bool? lowWeight, bool? highWeight,@JsonKey(name: "Index_weight") double? indexWeight, String? chickenBreed, bool? cash, bool? credit, bool? smsPayment, String? killHouseKey, String? killerKillHouseKey, String? role
});
}
/// @nodoc
class _$KillRequestResponseCopyWithImpl<$Res>
implements $KillRequestResponseCopyWith<$Res> {
_$KillRequestResponseCopyWithImpl(this._self, this._then);
final KillRequestResponse _self;
final $Res Function(KillRequestResponse) _then;
/// Create a copy of KillRequestResponse
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? killCapacity = freezed,Object? reciveTime = freezed,Object? reciveDate = freezed,Object? lowWeight = freezed,Object? highWeight = freezed,Object? indexWeight = freezed,Object? chickenBreed = freezed,Object? cash = freezed,Object? credit = freezed,Object? smsPayment = freezed,Object? killHouseKey = freezed,Object? killerKillHouseKey = freezed,Object? role = freezed,}) {
return _then(_self.copyWith(
killCapacity: freezed == killCapacity ? _self.killCapacity : killCapacity // ignore: cast_nullable_to_non_nullable
as int?,reciveTime: freezed == reciveTime ? _self.reciveTime : reciveTime // ignore: cast_nullable_to_non_nullable
as String?,reciveDate: freezed == reciveDate ? _self.reciveDate : reciveDate // ignore: cast_nullable_to_non_nullable
as String?,lowWeight: freezed == lowWeight ? _self.lowWeight : lowWeight // ignore: cast_nullable_to_non_nullable
as bool?,highWeight: freezed == highWeight ? _self.highWeight : highWeight // ignore: cast_nullable_to_non_nullable
as bool?,indexWeight: freezed == indexWeight ? _self.indexWeight : indexWeight // ignore: cast_nullable_to_non_nullable
as double?,chickenBreed: freezed == chickenBreed ? _self.chickenBreed : chickenBreed // ignore: cast_nullable_to_non_nullable
as String?,cash: freezed == cash ? _self.cash : cash // ignore: cast_nullable_to_non_nullable
as bool?,credit: freezed == credit ? _self.credit : credit // ignore: cast_nullable_to_non_nullable
as bool?,smsPayment: freezed == smsPayment ? _self.smsPayment : smsPayment // ignore: cast_nullable_to_non_nullable
as bool?,killHouseKey: freezed == killHouseKey ? _self.killHouseKey : killHouseKey // ignore: cast_nullable_to_non_nullable
as String?,killerKillHouseKey: freezed == killerKillHouseKey ? _self.killerKillHouseKey : killerKillHouseKey // ignore: cast_nullable_to_non_nullable
as String?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [KillRequestResponse].
extension KillRequestResponsePatterns on KillRequestResponse {
/// 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( _KillRequestResponse value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _KillRequestResponse() 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( _KillRequestResponse value) $default,){
final _that = this;
switch (_that) {
case _KillRequestResponse():
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( _KillRequestResponse value)? $default,){
final _that = this;
switch (_that) {
case _KillRequestResponse() 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( int? killCapacity, String? reciveTime, String? reciveDate, bool? lowWeight, bool? highWeight, @JsonKey(name: "Index_weight") double? indexWeight, String? chickenBreed, bool? cash, bool? credit, bool? smsPayment, String? killHouseKey, String? killerKillHouseKey, String? role)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _KillRequestResponse() when $default != null:
return $default(_that.killCapacity,_that.reciveTime,_that.reciveDate,_that.lowWeight,_that.highWeight,_that.indexWeight,_that.chickenBreed,_that.cash,_that.credit,_that.smsPayment,_that.killHouseKey,_that.killerKillHouseKey,_that.role);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( int? killCapacity, String? reciveTime, String? reciveDate, bool? lowWeight, bool? highWeight, @JsonKey(name: "Index_weight") double? indexWeight, String? chickenBreed, bool? cash, bool? credit, bool? smsPayment, String? killHouseKey, String? killerKillHouseKey, String? role) $default,) {final _that = this;
switch (_that) {
case _KillRequestResponse():
return $default(_that.killCapacity,_that.reciveTime,_that.reciveDate,_that.lowWeight,_that.highWeight,_that.indexWeight,_that.chickenBreed,_that.cash,_that.credit,_that.smsPayment,_that.killHouseKey,_that.killerKillHouseKey,_that.role);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( int? killCapacity, String? reciveTime, String? reciveDate, bool? lowWeight, bool? highWeight, @JsonKey(name: "Index_weight") double? indexWeight, String? chickenBreed, bool? cash, bool? credit, bool? smsPayment, String? killHouseKey, String? killerKillHouseKey, String? role)? $default,) {final _that = this;
switch (_that) {
case _KillRequestResponse() when $default != null:
return $default(_that.killCapacity,_that.reciveTime,_that.reciveDate,_that.lowWeight,_that.highWeight,_that.indexWeight,_that.chickenBreed,_that.cash,_that.credit,_that.smsPayment,_that.killHouseKey,_that.killerKillHouseKey,_that.role);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _KillRequestResponse implements KillRequestResponse {
const _KillRequestResponse({this.killCapacity, this.reciveTime, this.reciveDate, this.lowWeight, this.highWeight, @JsonKey(name: "Index_weight") this.indexWeight, this.chickenBreed, this.cash, this.credit, this.smsPayment, this.killHouseKey, this.killerKillHouseKey, this.role});
factory _KillRequestResponse.fromJson(Map<String, dynamic> json) => _$KillRequestResponseFromJson(json);
@override final int? killCapacity;
@override final String? reciveTime;
@override final String? reciveDate;
@override final bool? lowWeight;
@override final bool? highWeight;
@override@JsonKey(name: "Index_weight") final double? indexWeight;
@override final String? chickenBreed;
@override final bool? cash;
@override final bool? credit;
@override final bool? smsPayment;
@override final String? killHouseKey;
@override final String? killerKillHouseKey;
@override final String? role;
/// Create a copy of KillRequestResponse
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$KillRequestResponseCopyWith<_KillRequestResponse> get copyWith => __$KillRequestResponseCopyWithImpl<_KillRequestResponse>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$KillRequestResponseToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillRequestResponse&&(identical(other.killCapacity, killCapacity) || other.killCapacity == killCapacity)&&(identical(other.reciveTime, reciveTime) || other.reciveTime == reciveTime)&&(identical(other.reciveDate, reciveDate) || other.reciveDate == reciveDate)&&(identical(other.lowWeight, lowWeight) || other.lowWeight == lowWeight)&&(identical(other.highWeight, highWeight) || other.highWeight == highWeight)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.chickenBreed, chickenBreed) || other.chickenBreed == chickenBreed)&&(identical(other.cash, cash) || other.cash == cash)&&(identical(other.credit, credit) || other.credit == credit)&&(identical(other.smsPayment, smsPayment) || other.smsPayment == smsPayment)&&(identical(other.killHouseKey, killHouseKey) || other.killHouseKey == killHouseKey)&&(identical(other.killerKillHouseKey, killerKillHouseKey) || other.killerKillHouseKey == killerKillHouseKey)&&(identical(other.role, role) || other.role == role));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,killCapacity,reciveTime,reciveDate,lowWeight,highWeight,indexWeight,chickenBreed,cash,credit,smsPayment,killHouseKey,killerKillHouseKey,role);
@override
String toString() {
return 'KillRequestResponse(killCapacity: $killCapacity, reciveTime: $reciveTime, reciveDate: $reciveDate, lowWeight: $lowWeight, highWeight: $highWeight, indexWeight: $indexWeight, chickenBreed: $chickenBreed, cash: $cash, credit: $credit, smsPayment: $smsPayment, killHouseKey: $killHouseKey, killerKillHouseKey: $killerKillHouseKey, role: $role)';
}
}
/// @nodoc
abstract mixin class _$KillRequestResponseCopyWith<$Res> implements $KillRequestResponseCopyWith<$Res> {
factory _$KillRequestResponseCopyWith(_KillRequestResponse value, $Res Function(_KillRequestResponse) _then) = __$KillRequestResponseCopyWithImpl;
@override @useResult
$Res call({
int? killCapacity, String? reciveTime, String? reciveDate, bool? lowWeight, bool? highWeight,@JsonKey(name: "Index_weight") double? indexWeight, String? chickenBreed, bool? cash, bool? credit, bool? smsPayment, String? killHouseKey, String? killerKillHouseKey, String? role
});
}
/// @nodoc
class __$KillRequestResponseCopyWithImpl<$Res>
implements _$KillRequestResponseCopyWith<$Res> {
__$KillRequestResponseCopyWithImpl(this._self, this._then);
final _KillRequestResponse _self;
final $Res Function(_KillRequestResponse) _then;
/// Create a copy of KillRequestResponse
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? killCapacity = freezed,Object? reciveTime = freezed,Object? reciveDate = freezed,Object? lowWeight = freezed,Object? highWeight = freezed,Object? indexWeight = freezed,Object? chickenBreed = freezed,Object? cash = freezed,Object? credit = freezed,Object? smsPayment = freezed,Object? killHouseKey = freezed,Object? killerKillHouseKey = freezed,Object? role = freezed,}) {
return _then(_KillRequestResponse(
killCapacity: freezed == killCapacity ? _self.killCapacity : killCapacity // ignore: cast_nullable_to_non_nullable
as int?,reciveTime: freezed == reciveTime ? _self.reciveTime : reciveTime // ignore: cast_nullable_to_non_nullable
as String?,reciveDate: freezed == reciveDate ? _self.reciveDate : reciveDate // ignore: cast_nullable_to_non_nullable
as String?,lowWeight: freezed == lowWeight ? _self.lowWeight : lowWeight // ignore: cast_nullable_to_non_nullable
as bool?,highWeight: freezed == highWeight ? _self.highWeight : highWeight // ignore: cast_nullable_to_non_nullable
as bool?,indexWeight: freezed == indexWeight ? _self.indexWeight : indexWeight // ignore: cast_nullable_to_non_nullable
as double?,chickenBreed: freezed == chickenBreed ? _self.chickenBreed : chickenBreed // ignore: cast_nullable_to_non_nullable
as String?,cash: freezed == cash ? _self.cash : cash // ignore: cast_nullable_to_non_nullable
as bool?,credit: freezed == credit ? _self.credit : credit // ignore: cast_nullable_to_non_nullable
as bool?,smsPayment: freezed == smsPayment ? _self.smsPayment : smsPayment // ignore: cast_nullable_to_non_nullable
as bool?,killHouseKey: freezed == killHouseKey ? _self.killHouseKey : killHouseKey // ignore: cast_nullable_to_non_nullable
as String?,killerKillHouseKey: freezed == killerKillHouseKey ? _self.killerKillHouseKey : killerKillHouseKey // ignore: cast_nullable_to_non_nullable
as String?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,42 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'kill_request_response.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_KillRequestResponse _$KillRequestResponseFromJson(Map<String, dynamic> json) =>
_KillRequestResponse(
killCapacity: (json['kill_capacity'] as num?)?.toInt(),
reciveTime: json['recive_time'] as String?,
reciveDate: json['recive_date'] as String?,
lowWeight: json['low_weight'] as bool?,
highWeight: json['high_weight'] as bool?,
indexWeight: (json['Index_weight'] as num?)?.toDouble(),
chickenBreed: json['chicken_breed'] as String?,
cash: json['cash'] as bool?,
credit: json['credit'] as bool?,
smsPayment: json['sms_payment'] as bool?,
killHouseKey: json['kill_house_key'] as String?,
killerKillHouseKey: json['killer_kill_house_key'] as String?,
role: json['role'] as String?,
);
Map<String, dynamic> _$KillRequestResponseToJson(
_KillRequestResponse instance,
) => <String, dynamic>{
'kill_capacity': instance.killCapacity,
'recive_time': instance.reciveTime,
'recive_date': instance.reciveDate,
'low_weight': instance.lowWeight,
'high_weight': instance.highWeight,
'Index_weight': instance.indexWeight,
'chicken_breed': instance.chickenBreed,
'cash': instance.cash,
'credit': instance.credit,
'sms_payment': instance.smsPayment,
'kill_house_key': instance.killHouseKey,
'killer_kill_house_key': instance.killerKillHouseKey,
'role': instance.role,
};

View File

@@ -0,0 +1,12 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'chicken_commission_prices.freezed.dart';
part 'chicken_commission_prices.g.dart';
@freezed
abstract class ChickenCommissionPrices with _$ChickenCommissionPrices {
const factory ChickenCommissionPrices({double? chickenAveragePrice}) = _ChickenCommissionPrices;
factory ChickenCommissionPrices.fromJson(Map<String, dynamic> json) =>
_$ChickenCommissionPricesFromJson(json);
}

View File

@@ -0,0 +1,277 @@
// 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 'chicken_commission_prices.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ChickenCommissionPrices {
double? get chickenAveragePrice;
/// Create a copy of ChickenCommissionPrices
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ChickenCommissionPricesCopyWith<ChickenCommissionPrices> get copyWith => _$ChickenCommissionPricesCopyWithImpl<ChickenCommissionPrices>(this as ChickenCommissionPrices, _$identity);
/// Serializes this ChickenCommissionPrices to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChickenCommissionPrices&&(identical(other.chickenAveragePrice, chickenAveragePrice) || other.chickenAveragePrice == chickenAveragePrice));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,chickenAveragePrice);
@override
String toString() {
return 'ChickenCommissionPrices(chickenAveragePrice: $chickenAveragePrice)';
}
}
/// @nodoc
abstract mixin class $ChickenCommissionPricesCopyWith<$Res> {
factory $ChickenCommissionPricesCopyWith(ChickenCommissionPrices value, $Res Function(ChickenCommissionPrices) _then) = _$ChickenCommissionPricesCopyWithImpl;
@useResult
$Res call({
double? chickenAveragePrice
});
}
/// @nodoc
class _$ChickenCommissionPricesCopyWithImpl<$Res>
implements $ChickenCommissionPricesCopyWith<$Res> {
_$ChickenCommissionPricesCopyWithImpl(this._self, this._then);
final ChickenCommissionPrices _self;
final $Res Function(ChickenCommissionPrices) _then;
/// Create a copy of ChickenCommissionPrices
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? chickenAveragePrice = freezed,}) {
return _then(_self.copyWith(
chickenAveragePrice: freezed == chickenAveragePrice ? _self.chickenAveragePrice : chickenAveragePrice // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
/// Adds pattern-matching-related methods to [ChickenCommissionPrices].
extension ChickenCommissionPricesPatterns on ChickenCommissionPrices {
/// 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( _ChickenCommissionPrices value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ChickenCommissionPrices() 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( _ChickenCommissionPrices value) $default,){
final _that = this;
switch (_that) {
case _ChickenCommissionPrices():
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( _ChickenCommissionPrices value)? $default,){
final _that = this;
switch (_that) {
case _ChickenCommissionPrices() 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( double? chickenAveragePrice)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ChickenCommissionPrices() when $default != null:
return $default(_that.chickenAveragePrice);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( double? chickenAveragePrice) $default,) {final _that = this;
switch (_that) {
case _ChickenCommissionPrices():
return $default(_that.chickenAveragePrice);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( double? chickenAveragePrice)? $default,) {final _that = this;
switch (_that) {
case _ChickenCommissionPrices() when $default != null:
return $default(_that.chickenAveragePrice);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _ChickenCommissionPrices implements ChickenCommissionPrices {
const _ChickenCommissionPrices({this.chickenAveragePrice});
factory _ChickenCommissionPrices.fromJson(Map<String, dynamic> json) => _$ChickenCommissionPricesFromJson(json);
@override final double? chickenAveragePrice;
/// Create a copy of ChickenCommissionPrices
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ChickenCommissionPricesCopyWith<_ChickenCommissionPrices> get copyWith => __$ChickenCommissionPricesCopyWithImpl<_ChickenCommissionPrices>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ChickenCommissionPricesToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChickenCommissionPrices&&(identical(other.chickenAveragePrice, chickenAveragePrice) || other.chickenAveragePrice == chickenAveragePrice));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,chickenAveragePrice);
@override
String toString() {
return 'ChickenCommissionPrices(chickenAveragePrice: $chickenAveragePrice)';
}
}
/// @nodoc
abstract mixin class _$ChickenCommissionPricesCopyWith<$Res> implements $ChickenCommissionPricesCopyWith<$Res> {
factory _$ChickenCommissionPricesCopyWith(_ChickenCommissionPrices value, $Res Function(_ChickenCommissionPrices) _then) = __$ChickenCommissionPricesCopyWithImpl;
@override @useResult
$Res call({
double? chickenAveragePrice
});
}
/// @nodoc
class __$ChickenCommissionPricesCopyWithImpl<$Res>
implements _$ChickenCommissionPricesCopyWith<$Res> {
__$ChickenCommissionPricesCopyWithImpl(this._self, this._then);
final _ChickenCommissionPrices _self;
final $Res Function(_ChickenCommissionPrices) _then;
/// Create a copy of ChickenCommissionPrices
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? chickenAveragePrice = freezed,}) {
return _then(_ChickenCommissionPrices(
chickenAveragePrice: freezed == chickenAveragePrice ? _self.chickenAveragePrice : chickenAveragePrice // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
// dart format on

View File

@@ -0,0 +1,17 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'chicken_commission_prices.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_ChickenCommissionPrices _$ChickenCommissionPricesFromJson(
Map<String, dynamic> json,
) => _ChickenCommissionPrices(
chickenAveragePrice: (json['chicken_average_price'] as num?)?.toDouble(),
);
Map<String, dynamic> _$ChickenCommissionPricesToJson(
_ChickenCommissionPrices instance,
) => <String, dynamic>{'chicken_average_price': instance.chickenAveragePrice};

View File

@@ -0,0 +1,12 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'kill_house_response.freezed.dart';
part 'kill_house_response.g.dart';
@freezed
abstract class KillHouseResponse with _$KillHouseResponse {
const factory KillHouseResponse({String? name, String? key}) = _KillHouseResponse;
factory KillHouseResponse.fromJson(Map<String, dynamic> json) =>
_$KillHouseResponseFromJson(json);
}

View File

@@ -0,0 +1,280 @@
// 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 'kill_house_response.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$KillHouseResponse {
String? get name; String? get key;
/// Create a copy of KillHouseResponse
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$KillHouseResponseCopyWith<KillHouseResponse> get copyWith => _$KillHouseResponseCopyWithImpl<KillHouseResponse>(this as KillHouseResponse, _$identity);
/// Serializes this KillHouseResponse to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHouseResponse&&(identical(other.name, name) || other.name == name)&&(identical(other.key, key) || other.key == key));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,name,key);
@override
String toString() {
return 'KillHouseResponse(name: $name, key: $key)';
}
}
/// @nodoc
abstract mixin class $KillHouseResponseCopyWith<$Res> {
factory $KillHouseResponseCopyWith(KillHouseResponse value, $Res Function(KillHouseResponse) _then) = _$KillHouseResponseCopyWithImpl;
@useResult
$Res call({
String? name, String? key
});
}
/// @nodoc
class _$KillHouseResponseCopyWithImpl<$Res>
implements $KillHouseResponseCopyWith<$Res> {
_$KillHouseResponseCopyWithImpl(this._self, this._then);
final KillHouseResponse _self;
final $Res Function(KillHouseResponse) _then;
/// Create a copy of KillHouseResponse
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? name = freezed,Object? key = freezed,}) {
return _then(_self.copyWith(
name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [KillHouseResponse].
extension KillHouseResponsePatterns on KillHouseResponse {
/// 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( _KillHouseResponse value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _KillHouseResponse() 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( _KillHouseResponse value) $default,){
final _that = this;
switch (_that) {
case _KillHouseResponse():
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( _KillHouseResponse value)? $default,){
final _that = this;
switch (_that) {
case _KillHouseResponse() 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( String? name, String? key)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _KillHouseResponse() when $default != null:
return $default(_that.name,_that.key);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( String? name, String? key) $default,) {final _that = this;
switch (_that) {
case _KillHouseResponse():
return $default(_that.name,_that.key);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( String? name, String? key)? $default,) {final _that = this;
switch (_that) {
case _KillHouseResponse() when $default != null:
return $default(_that.name,_that.key);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _KillHouseResponse implements KillHouseResponse {
const _KillHouseResponse({this.name, this.key});
factory _KillHouseResponse.fromJson(Map<String, dynamic> json) => _$KillHouseResponseFromJson(json);
@override final String? name;
@override final String? key;
/// Create a copy of KillHouseResponse
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$KillHouseResponseCopyWith<_KillHouseResponse> get copyWith => __$KillHouseResponseCopyWithImpl<_KillHouseResponse>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$KillHouseResponseToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHouseResponse&&(identical(other.name, name) || other.name == name)&&(identical(other.key, key) || other.key == key));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,name,key);
@override
String toString() {
return 'KillHouseResponse(name: $name, key: $key)';
}
}
/// @nodoc
abstract mixin class _$KillHouseResponseCopyWith<$Res> implements $KillHouseResponseCopyWith<$Res> {
factory _$KillHouseResponseCopyWith(_KillHouseResponse value, $Res Function(_KillHouseResponse) _then) = __$KillHouseResponseCopyWithImpl;
@override @useResult
$Res call({
String? name, String? key
});
}
/// @nodoc
class __$KillHouseResponseCopyWithImpl<$Res>
implements _$KillHouseResponseCopyWith<$Res> {
__$KillHouseResponseCopyWithImpl(this._self, this._then);
final _KillHouseResponse _self;
final $Res Function(_KillHouseResponse) _then;
/// Create a copy of KillHouseResponse
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? name = freezed,Object? key = freezed,}) {
return _then(_KillHouseResponse(
name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,16 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'kill_house_response.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_KillHouseResponse _$KillHouseResponseFromJson(Map<String, dynamic> json) =>
_KillHouseResponse(
name: json['name'] as String?,
key: json['key'] as String?,
);
Map<String, dynamic> _$KillHouseResponseToJson(_KillHouseResponse instance) =>
<String, dynamic>{'name': instance.name, 'key': instance.key};

View File

@@ -0,0 +1,125 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'kill_request_list.freezed.dart';
part 'kill_request_list.g.dart';
@freezed
abstract class KillRequestList with _$KillRequestList {
const factory KillRequestList({
int? id,
KillHouseResponse? killHouse,
KillHouseVetResponse? killHouseVet,
int? numberOfAllocated,
String? key,
String? createDate,
String? modifyDate,
bool? trash,
int? killCapacity,
int? previousKillCapacity,
int? remainQuantityForPoultry,
int? remainQuantity,
String? reciveTime,
String? reciveDate,
String? state,
String? provinceState,
BuyTypeResponse? buyType,
WeightTypeResponse? weightType,
String? chickenBreed,
double? indexWeight,
bool? smsPayment,
RegistrarResponse? registrar,
}) = _KillRequestList;
factory KillRequestList.fromJson(Map<String, dynamic> json) => _$KillRequestListFromJson(json);
}
///////////////////////////////////////////////////
/// SUB MODELS
///////////////////////////////////////////////////
@freezed
abstract class KillHouseResponse with _$KillHouseResponse {
const factory KillHouseResponse({
KillHouseOperator? killHouseOperator,
String? name,
bool? killer,
String? key,
}) = _KillHouseResponse;
factory KillHouseResponse.fromJson(Map<String, dynamic> json) =>
_$KillHouseResponseFromJson(json);
}
@freezed
abstract class KillHouseOperator with _$KillHouseOperator {
const factory KillHouseOperator({UserResponse? user}) = _KillHouseOperator;
factory KillHouseOperator.fromJson(Map<String, dynamic> json) =>
_$KillHouseOperatorFromJson(json);
}
@freezed
abstract class UserResponse with _$UserResponse {
const factory UserResponse({
String? fullname,
String? firstName,
String? lastName,
String? mobile,
String? key,
CityResponse? city,
}) = _UserResponse;
factory UserResponse.fromJson(Map<String, dynamic> json) => _$UserResponseFromJson(json);
}
@freezed
abstract class CityResponse with _$CityResponse {
const factory CityResponse({int? id, String? name, String? provinceName}) = _CityResponse;
factory CityResponse.fromJson(Map<String, dynamic> json) => _$CityResponseFromJson(json);
}
@freezed
abstract class KillHouseVetResponse with _$KillHouseVetResponse {
const factory KillHouseVetResponse({
int? id,
VetResponse? vet,
KillHouseResponse? killHouse,
String? key,
bool? trash,
}) = _KillHouseVetResponse;
factory KillHouseVetResponse.fromJson(Map<String, dynamic> json) =>
_$KillHouseVetResponseFromJson(json);
}
@freezed
abstract class VetResponse with _$VetResponse {
const factory VetResponse({UserResponse? user}) = _VetResponse;
factory VetResponse.fromJson(Map<String, dynamic> json) => _$VetResponseFromJson(json);
}
@freezed
abstract class BuyTypeResponse with _$BuyTypeResponse {
const factory BuyTypeResponse({bool? cash, bool? credit}) = _BuyTypeResponse;
factory BuyTypeResponse.fromJson(Map<String, dynamic> json) => _$BuyTypeResponseFromJson(json);
}
@freezed
abstract class WeightTypeResponse with _$WeightTypeResponse {
const factory WeightTypeResponse({bool? lowWeight, bool? highWeight}) = _WeightTypeResponse;
factory WeightTypeResponse.fromJson(Map<String, dynamic> json) =>
_$WeightTypeResponseFromJson(json);
}
@freezed
abstract class RegistrarResponse with _$RegistrarResponse {
const factory RegistrarResponse({String? date, String? role, String? fullName}) =
_RegistrarResponse;
factory RegistrarResponse.fromJson(Map<String, dynamic> json) =>
_$RegistrarResponseFromJson(json);
}

View File

@@ -0,0 +1,209 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'kill_request_list.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_KillRequestList _$KillRequestListFromJson(
Map<String, dynamic> json,
) => _KillRequestList(
id: (json['id'] as num?)?.toInt(),
killHouse: json['kill_house'] == null
? null
: KillHouseResponse.fromJson(json['kill_house'] as Map<String, dynamic>),
killHouseVet: json['kill_house_vet'] == null
? null
: KillHouseVetResponse.fromJson(
json['kill_house_vet'] as Map<String, dynamic>,
),
numberOfAllocated: (json['number_of_allocated'] as num?)?.toInt(),
key: json['key'] as String?,
createDate: json['create_date'] as String?,
modifyDate: json['modify_date'] as String?,
trash: json['trash'] as bool?,
killCapacity: (json['kill_capacity'] as num?)?.toInt(),
previousKillCapacity: (json['previous_kill_capacity'] as num?)?.toInt(),
remainQuantityForPoultry: (json['remain_quantity_for_poultry'] as num?)
?.toInt(),
remainQuantity: (json['remain_quantity'] as num?)?.toInt(),
reciveTime: json['recive_time'] as String?,
reciveDate: json['recive_date'] as String?,
state: json['state'] as String?,
provinceState: json['province_state'] as String?,
buyType: json['buy_type'] == null
? null
: BuyTypeResponse.fromJson(json['buy_type'] as Map<String, dynamic>),
weightType: json['weight_type'] == null
? null
: WeightTypeResponse.fromJson(
json['weight_type'] as Map<String, dynamic>,
),
chickenBreed: json['chicken_breed'] as String?,
indexWeight: (json['index_weight'] as num?)?.toDouble(),
smsPayment: json['sms_payment'] as bool?,
registrar: json['registrar'] == null
? null
: RegistrarResponse.fromJson(json['registrar'] as Map<String, dynamic>),
);
Map<String, dynamic> _$KillRequestListToJson(_KillRequestList instance) =>
<String, dynamic>{
'id': instance.id,
'kill_house': instance.killHouse,
'kill_house_vet': instance.killHouseVet,
'number_of_allocated': instance.numberOfAllocated,
'key': instance.key,
'create_date': instance.createDate,
'modify_date': instance.modifyDate,
'trash': instance.trash,
'kill_capacity': instance.killCapacity,
'previous_kill_capacity': instance.previousKillCapacity,
'remain_quantity_for_poultry': instance.remainQuantityForPoultry,
'remain_quantity': instance.remainQuantity,
'recive_time': instance.reciveTime,
'recive_date': instance.reciveDate,
'state': instance.state,
'province_state': instance.provinceState,
'buy_type': instance.buyType,
'weight_type': instance.weightType,
'chicken_breed': instance.chickenBreed,
'index_weight': instance.indexWeight,
'sms_payment': instance.smsPayment,
'registrar': instance.registrar,
};
_KillHouseResponse _$KillHouseResponseFromJson(Map<String, dynamic> json) =>
_KillHouseResponse(
killHouseOperator: json['kill_house_operator'] == null
? null
: KillHouseOperator.fromJson(
json['kill_house_operator'] as Map<String, dynamic>,
),
name: json['name'] as String?,
killer: json['killer'] as bool?,
key: json['key'] as String?,
);
Map<String, dynamic> _$KillHouseResponseToJson(_KillHouseResponse instance) =>
<String, dynamic>{
'kill_house_operator': instance.killHouseOperator,
'name': instance.name,
'killer': instance.killer,
'key': instance.key,
};
_KillHouseOperator _$KillHouseOperatorFromJson(Map<String, dynamic> json) =>
_KillHouseOperator(
user: json['user'] == null
? null
: UserResponse.fromJson(json['user'] as Map<String, dynamic>),
);
Map<String, dynamic> _$KillHouseOperatorToJson(_KillHouseOperator instance) =>
<String, dynamic>{'user': instance.user};
_UserResponse _$UserResponseFromJson(Map<String, dynamic> json) =>
_UserResponse(
fullname: json['fullname'] as String?,
firstName: json['first_name'] as String?,
lastName: json['last_name'] as String?,
mobile: json['mobile'] as String?,
key: json['key'] as String?,
city: json['city'] == null
? null
: CityResponse.fromJson(json['city'] as Map<String, dynamic>),
);
Map<String, dynamic> _$UserResponseToJson(_UserResponse instance) =>
<String, dynamic>{
'fullname': instance.fullname,
'first_name': instance.firstName,
'last_name': instance.lastName,
'mobile': instance.mobile,
'key': instance.key,
'city': instance.city,
};
_CityResponse _$CityResponseFromJson(Map<String, dynamic> json) =>
_CityResponse(
id: (json['id'] as num?)?.toInt(),
name: json['name'] as String?,
provinceName: json['province_name'] as String?,
);
Map<String, dynamic> _$CityResponseToJson(_CityResponse instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
'province_name': instance.provinceName,
};
_KillHouseVetResponse _$KillHouseVetResponseFromJson(
Map<String, dynamic> json,
) => _KillHouseVetResponse(
id: (json['id'] as num?)?.toInt(),
vet: json['vet'] == null
? null
: VetResponse.fromJson(json['vet'] as Map<String, dynamic>),
killHouse: json['kill_house'] == null
? null
: KillHouseResponse.fromJson(json['kill_house'] as Map<String, dynamic>),
key: json['key'] as String?,
trash: json['trash'] as bool?,
);
Map<String, dynamic> _$KillHouseVetResponseToJson(
_KillHouseVetResponse instance,
) => <String, dynamic>{
'id': instance.id,
'vet': instance.vet,
'kill_house': instance.killHouse,
'key': instance.key,
'trash': instance.trash,
};
_VetResponse _$VetResponseFromJson(Map<String, dynamic> json) => _VetResponse(
user: json['user'] == null
? null
: UserResponse.fromJson(json['user'] as Map<String, dynamic>),
);
Map<String, dynamic> _$VetResponseToJson(_VetResponse instance) =>
<String, dynamic>{'user': instance.user};
_BuyTypeResponse _$BuyTypeResponseFromJson(Map<String, dynamic> json) =>
_BuyTypeResponse(
cash: json['cash'] as bool?,
credit: json['credit'] as bool?,
);
Map<String, dynamic> _$BuyTypeResponseToJson(_BuyTypeResponse instance) =>
<String, dynamic>{'cash': instance.cash, 'credit': instance.credit};
_WeightTypeResponse _$WeightTypeResponseFromJson(Map<String, dynamic> json) =>
_WeightTypeResponse(
lowWeight: json['low_weight'] as bool?,
highWeight: json['high_weight'] as bool?,
);
Map<String, dynamic> _$WeightTypeResponseToJson(_WeightTypeResponse instance) =>
<String, dynamic>{
'low_weight': instance.lowWeight,
'high_weight': instance.highWeight,
};
_RegistrarResponse _$RegistrarResponseFromJson(Map<String, dynamic> json) =>
_RegistrarResponse(
date: json['date'] as String?,
role: json['role'] as String?,
fullName: json['full_name'] as String?,
);
Map<String, dynamic> _$RegistrarResponseToJson(_RegistrarResponse instance) =>
<String, dynamic>{
'date': instance.date,
'role': instance.role,
'full_name': instance.fullName,
};

View File

@@ -1,5 +1,4 @@
import 'package:rasadyar_core/core.dart';
import 'package:rasadyar_core/utils/utils.dart';
part 'widely_used_local_model.g.dart';