diff --git a/android/local.properties b/android/local.properties index e077d9b..d5cbd61 100644 --- a/android/local.properties +++ b/android/local.properties @@ -1,5 +1,5 @@ sdk.dir=C:/Users/Housh11/AppData/Local/Android/Sdk flutter.sdk=C:\\src\\flutter -flutter.buildMode=release -flutter.versionName=1.3.20 -flutter.versionCode=17 \ No newline at end of file +flutter.buildMode=debug +flutter.versionName=1.3.21 +flutter.versionCode=18 \ No newline at end of file diff --git a/packages/chicken/lib/data/data_source/remote/chicken/chicken_remote.dart b/packages/chicken/lib/data/data_source/remote/chicken/chicken_remote.dart index d9f9260..df60d46 100644 --- a/packages/chicken/lib/data/data_source/remote/chicken/chicken_remote.dart +++ b/packages/chicken/lib/data/data_source/remote/chicken/chicken_remote.dart @@ -104,9 +104,9 @@ abstract class ChickenRemoteDatasource { required CreateStewardFreeBar body, }); - Future deleteStewardPurchasesOutSideOfTheProvince({ + Future editStewardPurchasesOutSideOfTheProvince({ required String token, - required String stewardFreeBarKey, + Map? queryParameters, }); Future?> getOutProvinceCarcassesBuyer({ diff --git a/packages/chicken/lib/data/data_source/remote/chicken/chicken_remote_imp.dart b/packages/chicken/lib/data/data_source/remote/chicken/chicken_remote_imp.dart index 3a2d7e3..6eee9e6 100644 --- a/packages/chicken/lib/data/data_source/remote/chicken/chicken_remote_imp.dart +++ b/packages/chicken/lib/data/data_source/remote/chicken/chicken_remote_imp.dart @@ -318,15 +318,16 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource { ); } + //todo fix this @override - Future deleteStewardPurchasesOutSideOfTheProvince({ + Future editStewardPurchasesOutSideOfTheProvince({ required String token, - required String stewardFreeBarKey, + Map? queryParameters, }) async { await _httpClient.delete( '/steward_free_bar/0/', headers: {'Authorization': 'Bearer $token'}, - queryParameters: {'key': stewardFreeBarKey}, + queryParameters: queryParameters ); } diff --git a/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.dart b/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.dart index a775928..e311e78 100644 --- a/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.dart +++ b/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.dart @@ -8,7 +8,7 @@ abstract class WaitingArrivalModel with _$WaitingArrivalModel { factory WaitingArrivalModel({ int? id, ProductModel? product, - dynamic killHouse, + KillHouseModel? killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, @@ -56,12 +56,10 @@ abstract class WaitingArrivalModel with _$WaitingArrivalModel { bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, - dynamic createdBy, - dynamic modifiedBy, - dynamic wareHouse, - dynamic stewardWareHouse, - dynamic car, - dynamic dispenser, + bool? warehouse, + bool? stewardWarehouse, + String? quota, + }) = _WaitingArrivalModel; factory WaitingArrivalModel.fromJson(Map json) => @@ -70,22 +68,99 @@ abstract class WaitingArrivalModel with _$WaitingArrivalModel { @freezed abstract class ProductModel with _$ProductModel { - factory ProductModel({String? name, double? weightAverage}) = _ProductModel; + factory ProductModel({ + String? name, + double? weightAverage, + }) = _ProductModel; - factory ProductModel.fromJson(Map json) => _$ProductModelFromJson(json); + factory ProductModel.fromJson(Map json) => + _$ProductModelFromJson(json); } +/// ======================= +/// KILL HOUSE SECTION +/// ======================= +@freezed +abstract class KillHouseModel with _$KillHouseModel { + factory KillHouseModel({ + String? key, + String? name, + bool? killer, + KillHouseOperatorModel? killHouseOperator, + }) = _KillHouseModel; + + factory KillHouseModel.fromJson(Map json) => + _$KillHouseModelFromJson(json); +} + +@freezed +abstract class KillHouseOperatorModel with _$KillHouseOperatorModel { + factory KillHouseOperatorModel({ + KillHouseUserModel? user, + }) = _KillHouseOperatorModel; + + factory KillHouseOperatorModel.fromJson(Map json) => + _$KillHouseOperatorModelFromJson(json); +} + +@freezed +abstract class KillHouseUserModel with _$KillHouseUserModel { + factory KillHouseUserModel({ + String? fullname, + String? firstName, + String? lastName, + int? baseOrder, + String? mobile, + String? nationalId, + String? nationalCode, + String? key, + CityDetailModel? city, + String? unitName, + String? unitNationalId, + String? unitRegistrationNumber, + String? unitEconomicalNumber, + String? unitProvince, + String? unitCity, + String? unitPostalCode, + String? unitAddress, + }) = _KillHouseUserModel; + + factory KillHouseUserModel.fromJson(Map json) => + _$KillHouseUserModelFromJson(json); +} + +@freezed +abstract class CityDetailModel with _$CityDetailModel { + factory CityDetailModel({ + int? id, + String? key, + String? createDate, + String? modifyDate, + bool? trash, + int? provinceIdForeignKey, + int? cityIdKey, + String? name, + double? productPrice, + bool? provinceCenter, + int? cityNumber, + String? cityName, + int? provinceNumber, + String? provinceName, + }) = _CityDetailModel; + + factory CityDetailModel.fromJson(Map json) => + _$CityDetailModelFromJson(json); +} + +/// ======================= +/// TO STEWARD SECTION +/// ======================= @freezed abstract class StewardModel with _$StewardModel { factory StewardModel({ int? id, StewardUserModel? user, AddressModel? address, - dynamic guildAreaActivity, - dynamic guildTypeActivity, - List? killHouse, - List? stewardKillHouse, - List? stewards, GetPosStatusModel? getPosStatus, String? key, String? createDate, @@ -111,11 +186,10 @@ abstract class StewardModel with _$StewardModel { bool? stewardLimitationAllocation, bool? license, int? wallet, - List? cars, - List? userLevel, }) = _StewardModel; - factory StewardModel.fromJson(Map json) => _$StewardModelFromJson(json); + factory StewardModel.fromJson(Map json) => + _$StewardModelFromJson(json); } @freezed @@ -129,7 +203,8 @@ abstract class StewardUserModel with _$StewardUserModel { String? city, }) = _StewardUserModel; - factory StewardUserModel.fromJson(Map json) => _$StewardUserModelFromJson(json); + factory StewardUserModel.fromJson(Map json) => + _$StewardUserModelFromJson(json); } @freezed @@ -141,27 +216,39 @@ abstract class AddressModel with _$AddressModel { String? postalCode, }) = _AddressModel; - factory AddressModel.fromJson(Map json) => _$AddressModelFromJson(json); + factory AddressModel.fromJson(Map json) => + _$AddressModelFromJson(json); } @freezed abstract class ProvinceModel with _$ProvinceModel { - factory ProvinceModel({String? key, String? name}) = _ProvinceModel; + factory ProvinceModel({ + String? key, + String? name, + }) = _ProvinceModel; - factory ProvinceModel.fromJson(Map json) => _$ProvinceModelFromJson(json); + factory ProvinceModel.fromJson(Map json) => + _$ProvinceModelFromJson(json); } @freezed abstract class CityModel with _$CityModel { - factory CityModel({String? key, String? name}) = _CityModel; + factory CityModel({ + String? key, + String? name, + }) = _CityModel; - factory CityModel.fromJson(Map json) => _$CityModelFromJson(json); + factory CityModel.fromJson(Map json) => + _$CityModelFromJson(json); } @freezed abstract class GetPosStatusModel with _$GetPosStatusModel { - factory GetPosStatusModel({int? lenActiveSessions, bool? hasPons, bool? hasActivePons}) = - _GetPosStatusModel; + factory GetPosStatusModel({ + int? lenActiveSessions, + bool? hasPons, + bool? hasActivePons, + }) = _GetPosStatusModel; factory GetPosStatusModel.fromJson(Map json) => _$GetPosStatusModelFromJson(json); diff --git a/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.freezed.dart b/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.freezed.dart index 1cbd066..56939b0 100644 --- a/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.freezed.dart +++ b/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.freezed.dart @@ -15,7 +15,7 @@ T _$identity(T value) => value; /// @nodoc mixin _$WaitingArrivalModel { - int? get id; ProductModel? get product; dynamic get killHouse; dynamic get toKillHouse; StewardModel? get steward; StewardModel? get toSteward; dynamic get guilds; dynamic get toGuilds; dynamic get toColdHouse; int? get indexWeight; int? get dateTimestamp; int? get newState; int? get newReceiverState; int? get newAllocationState; String? get key; String? get createDate; String? get modifyDate; bool? get trash; int? get numberOfCarcasses; int? get realNumberOfCarcasses; int? get receiverRealNumberOfCarcasses; double? get weightOfCarcasses; double? get realWeightOfCarcasses; double? get receiverRealWeightOfCarcasses; double? get weightLossOfCarcasses; bool? get finalRegistration; String? get sellType; String? get productName; String? get sellerType; String? get type; String? get saleType; String? get allocationType; bool? get systemRegistrationCode; int? get registrationCode; int? get amount; int? get totalAmount; int? get totalAmountPaid; int? get totalAmountRemain; dynamic get loggedRegistrationCode; String? get state; String? get receiverState; String? get allocationState; String? get date; dynamic get role; dynamic get stewardTempKey; bool? get approvedPriceStatus; bool? get calculateStatus; bool? get temporaryTrash; bool? get temporaryDeleted; bool? get overhead; dynamic get createdBy; dynamic get modifiedBy; dynamic get wareHouse; dynamic get stewardWareHouse; dynamic get car; dynamic get dispenser; + int? get id; ProductModel? get product; KillHouseModel? get killHouse; dynamic get toKillHouse; StewardModel? get steward; StewardModel? get toSteward; dynamic get guilds; dynamic get toGuilds; dynamic get toColdHouse; int? get indexWeight; int? get dateTimestamp; int? get newState; int? get newReceiverState; int? get newAllocationState; String? get key; String? get createDate; String? get modifyDate; bool? get trash; int? get numberOfCarcasses; int? get realNumberOfCarcasses; int? get receiverRealNumberOfCarcasses; double? get weightOfCarcasses; double? get realWeightOfCarcasses; double? get receiverRealWeightOfCarcasses; double? get weightLossOfCarcasses; bool? get finalRegistration; String? get sellType; String? get productName; String? get sellerType; String? get type; String? get saleType; String? get allocationType; bool? get systemRegistrationCode; int? get registrationCode; int? get amount; int? get totalAmount; int? get totalAmountPaid; int? get totalAmountRemain; dynamic get loggedRegistrationCode; String? get state; String? get receiverState; String? get allocationState; String? get date; dynamic get role; dynamic get stewardTempKey; bool? get approvedPriceStatus; bool? get calculateStatus; bool? get temporaryTrash; bool? get temporaryDeleted; bool? get overhead; bool? get warehouse; bool? get stewardWarehouse; String? get quota; /// Create a copy of WaitingArrivalModel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -28,16 +28,16 @@ $WaitingArrivalModelCopyWith get copyWith => _$WaitingArriv @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is WaitingArrivalModel&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&const DeepCollectionEquality().equals(other.killHouse, killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.toSteward, toSteward) || other.toSteward == toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&const DeepCollectionEquality().equals(other.toGuilds, toGuilds)&&const DeepCollectionEquality().equals(other.toColdHouse, toColdHouse)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.dateTimestamp, dateTimestamp) || other.dateTimestamp == dateTimestamp)&&(identical(other.newState, newState) || other.newState == newState)&&(identical(other.newReceiverState, newReceiverState) || other.newReceiverState == newReceiverState)&&(identical(other.newAllocationState, newAllocationState) || other.newAllocationState == newAllocationState)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.realNumberOfCarcasses, realNumberOfCarcasses) || other.realNumberOfCarcasses == realNumberOfCarcasses)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.realWeightOfCarcasses, realWeightOfCarcasses) || other.realWeightOfCarcasses == realWeightOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses)&&(identical(other.finalRegistration, finalRegistration) || other.finalRegistration == finalRegistration)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.productName, productName) || other.productName == productName)&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.type, type) || other.type == type)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.systemRegistrationCode, systemRegistrationCode) || other.systemRegistrationCode == systemRegistrationCode)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.totalAmountPaid, totalAmountPaid) || other.totalAmountPaid == totalAmountPaid)&&(identical(other.totalAmountRemain, totalAmountRemain) || other.totalAmountRemain == totalAmountRemain)&&const DeepCollectionEquality().equals(other.loggedRegistrationCode, loggedRegistrationCode)&&(identical(other.state, state) || other.state == state)&&(identical(other.receiverState, receiverState) || other.receiverState == receiverState)&&(identical(other.allocationState, allocationState) || other.allocationState == allocationState)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.role, role)&&const DeepCollectionEquality().equals(other.stewardTempKey, stewardTempKey)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.overhead, overhead) || other.overhead == overhead)&&const DeepCollectionEquality().equals(other.createdBy, createdBy)&&const DeepCollectionEquality().equals(other.modifiedBy, modifiedBy)&&const DeepCollectionEquality().equals(other.wareHouse, wareHouse)&&const DeepCollectionEquality().equals(other.stewardWareHouse, stewardWareHouse)&&const DeepCollectionEquality().equals(other.car, car)&&const DeepCollectionEquality().equals(other.dispenser, dispenser)); + return identical(this, other) || (other.runtimeType == runtimeType&&other is WaitingArrivalModel&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&(identical(other.killHouse, killHouse) || other.killHouse == killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.toSteward, toSteward) || other.toSteward == toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&const DeepCollectionEquality().equals(other.toGuilds, toGuilds)&&const DeepCollectionEquality().equals(other.toColdHouse, toColdHouse)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.dateTimestamp, dateTimestamp) || other.dateTimestamp == dateTimestamp)&&(identical(other.newState, newState) || other.newState == newState)&&(identical(other.newReceiverState, newReceiverState) || other.newReceiverState == newReceiverState)&&(identical(other.newAllocationState, newAllocationState) || other.newAllocationState == newAllocationState)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.realNumberOfCarcasses, realNumberOfCarcasses) || other.realNumberOfCarcasses == realNumberOfCarcasses)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.realWeightOfCarcasses, realWeightOfCarcasses) || other.realWeightOfCarcasses == realWeightOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses)&&(identical(other.finalRegistration, finalRegistration) || other.finalRegistration == finalRegistration)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.productName, productName) || other.productName == productName)&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.type, type) || other.type == type)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.systemRegistrationCode, systemRegistrationCode) || other.systemRegistrationCode == systemRegistrationCode)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.totalAmountPaid, totalAmountPaid) || other.totalAmountPaid == totalAmountPaid)&&(identical(other.totalAmountRemain, totalAmountRemain) || other.totalAmountRemain == totalAmountRemain)&&const DeepCollectionEquality().equals(other.loggedRegistrationCode, loggedRegistrationCode)&&(identical(other.state, state) || other.state == state)&&(identical(other.receiverState, receiverState) || other.receiverState == receiverState)&&(identical(other.allocationState, allocationState) || other.allocationState == allocationState)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.role, role)&&const DeepCollectionEquality().equals(other.stewardTempKey, stewardTempKey)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.overhead, overhead) || other.overhead == overhead)&&(identical(other.warehouse, warehouse) || other.warehouse == warehouse)&&(identical(other.stewardWarehouse, stewardWarehouse) || other.stewardWarehouse == stewardWarehouse)&&(identical(other.quota, quota) || other.quota == quota)); } @JsonKey(includeFromJson: false, includeToJson: false) @override -int get hashCode => Object.hashAll([runtimeType,id,product,const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(toKillHouse),steward,toSteward,const DeepCollectionEquality().hash(guilds),const DeepCollectionEquality().hash(toGuilds),const DeepCollectionEquality().hash(toColdHouse),indexWeight,dateTimestamp,newState,newReceiverState,newAllocationState,key,createDate,modifyDate,trash,numberOfCarcasses,realNumberOfCarcasses,receiverRealNumberOfCarcasses,weightOfCarcasses,realWeightOfCarcasses,receiverRealWeightOfCarcasses,weightLossOfCarcasses,finalRegistration,sellType,productName,sellerType,type,saleType,allocationType,systemRegistrationCode,registrationCode,amount,totalAmount,totalAmountPaid,totalAmountRemain,const DeepCollectionEquality().hash(loggedRegistrationCode),state,receiverState,allocationState,date,const DeepCollectionEquality().hash(role),const DeepCollectionEquality().hash(stewardTempKey),approvedPriceStatus,calculateStatus,temporaryTrash,temporaryDeleted,overhead,const DeepCollectionEquality().hash(createdBy),const DeepCollectionEquality().hash(modifiedBy),const DeepCollectionEquality().hash(wareHouse),const DeepCollectionEquality().hash(stewardWareHouse),const DeepCollectionEquality().hash(car),const DeepCollectionEquality().hash(dispenser)]); +int get hashCode => Object.hashAll([runtimeType,id,product,killHouse,const DeepCollectionEquality().hash(toKillHouse),steward,toSteward,const DeepCollectionEquality().hash(guilds),const DeepCollectionEquality().hash(toGuilds),const DeepCollectionEquality().hash(toColdHouse),indexWeight,dateTimestamp,newState,newReceiverState,newAllocationState,key,createDate,modifyDate,trash,numberOfCarcasses,realNumberOfCarcasses,receiverRealNumberOfCarcasses,weightOfCarcasses,realWeightOfCarcasses,receiverRealWeightOfCarcasses,weightLossOfCarcasses,finalRegistration,sellType,productName,sellerType,type,saleType,allocationType,systemRegistrationCode,registrationCode,amount,totalAmount,totalAmountPaid,totalAmountRemain,const DeepCollectionEquality().hash(loggedRegistrationCode),state,receiverState,allocationState,date,const DeepCollectionEquality().hash(role),const DeepCollectionEquality().hash(stewardTempKey),approvedPriceStatus,calculateStatus,temporaryTrash,temporaryDeleted,overhead,warehouse,stewardWarehouse,quota]); @override String toString() { - return 'WaitingArrivalModel(id: $id, product: $product, killHouse: $killHouse, toKillHouse: $toKillHouse, steward: $steward, toSteward: $toSteward, guilds: $guilds, toGuilds: $toGuilds, toColdHouse: $toColdHouse, indexWeight: $indexWeight, dateTimestamp: $dateTimestamp, newState: $newState, newReceiverState: $newReceiverState, newAllocationState: $newAllocationState, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, numberOfCarcasses: $numberOfCarcasses, realNumberOfCarcasses: $realNumberOfCarcasses, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, realWeightOfCarcasses: $realWeightOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses, finalRegistration: $finalRegistration, sellType: $sellType, productName: $productName, sellerType: $sellerType, type: $type, saleType: $saleType, allocationType: $allocationType, systemRegistrationCode: $systemRegistrationCode, registrationCode: $registrationCode, amount: $amount, totalAmount: $totalAmount, totalAmountPaid: $totalAmountPaid, totalAmountRemain: $totalAmountRemain, loggedRegistrationCode: $loggedRegistrationCode, state: $state, receiverState: $receiverState, allocationState: $allocationState, date: $date, role: $role, stewardTempKey: $stewardTempKey, approvedPriceStatus: $approvedPriceStatus, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, overhead: $overhead, createdBy: $createdBy, modifiedBy: $modifiedBy, wareHouse: $wareHouse, stewardWareHouse: $stewardWareHouse, car: $car, dispenser: $dispenser)'; + return 'WaitingArrivalModel(id: $id, product: $product, killHouse: $killHouse, toKillHouse: $toKillHouse, steward: $steward, toSteward: $toSteward, guilds: $guilds, toGuilds: $toGuilds, toColdHouse: $toColdHouse, indexWeight: $indexWeight, dateTimestamp: $dateTimestamp, newState: $newState, newReceiverState: $newReceiverState, newAllocationState: $newAllocationState, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, numberOfCarcasses: $numberOfCarcasses, realNumberOfCarcasses: $realNumberOfCarcasses, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, realWeightOfCarcasses: $realWeightOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses, finalRegistration: $finalRegistration, sellType: $sellType, productName: $productName, sellerType: $sellerType, type: $type, saleType: $saleType, allocationType: $allocationType, systemRegistrationCode: $systemRegistrationCode, registrationCode: $registrationCode, amount: $amount, totalAmount: $totalAmount, totalAmountPaid: $totalAmountPaid, totalAmountRemain: $totalAmountRemain, loggedRegistrationCode: $loggedRegistrationCode, state: $state, receiverState: $receiverState, allocationState: $allocationState, date: $date, role: $role, stewardTempKey: $stewardTempKey, approvedPriceStatus: $approvedPriceStatus, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, overhead: $overhead, warehouse: $warehouse, stewardWarehouse: $stewardWarehouse, quota: $quota)'; } @@ -48,11 +48,11 @@ abstract mixin class $WaitingArrivalModelCopyWith<$Res> { factory $WaitingArrivalModelCopyWith(WaitingArrivalModel value, $Res Function(WaitingArrivalModel) _then) = _$WaitingArrivalModelCopyWithImpl; @useResult $Res call({ - int? id, ProductModel? product, dynamic killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, dynamic createdBy, dynamic modifiedBy, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser + int? id, ProductModel? product, KillHouseModel? killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, bool? warehouse, bool? stewardWarehouse, String? quota }); -$ProductModelCopyWith<$Res>? get product;$StewardModelCopyWith<$Res>? get steward;$StewardModelCopyWith<$Res>? get toSteward; +$ProductModelCopyWith<$Res>? get product;$KillHouseModelCopyWith<$Res>? get killHouse;$StewardModelCopyWith<$Res>? get steward;$StewardModelCopyWith<$Res>? get toSteward; } /// @nodoc @@ -65,12 +65,12 @@ class _$WaitingArrivalModelCopyWithImpl<$Res> /// Create a copy of WaitingArrivalModel /// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? product = freezed,Object? killHouse = freezed,Object? toKillHouse = freezed,Object? steward = freezed,Object? toSteward = freezed,Object? guilds = freezed,Object? toGuilds = freezed,Object? toColdHouse = freezed,Object? indexWeight = freezed,Object? dateTimestamp = freezed,Object? newState = freezed,Object? newReceiverState = freezed,Object? newAllocationState = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? numberOfCarcasses = freezed,Object? realNumberOfCarcasses = freezed,Object? receiverRealNumberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? realWeightOfCarcasses = freezed,Object? receiverRealWeightOfCarcasses = freezed,Object? weightLossOfCarcasses = freezed,Object? finalRegistration = freezed,Object? sellType = freezed,Object? productName = freezed,Object? sellerType = freezed,Object? type = freezed,Object? saleType = freezed,Object? allocationType = freezed,Object? systemRegistrationCode = freezed,Object? registrationCode = freezed,Object? amount = freezed,Object? totalAmount = freezed,Object? totalAmountPaid = freezed,Object? totalAmountRemain = freezed,Object? loggedRegistrationCode = freezed,Object? state = freezed,Object? receiverState = freezed,Object? allocationState = freezed,Object? date = freezed,Object? role = freezed,Object? stewardTempKey = freezed,Object? approvedPriceStatus = freezed,Object? calculateStatus = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? overhead = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? wareHouse = freezed,Object? stewardWareHouse = freezed,Object? car = freezed,Object? dispenser = freezed,}) { +@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? product = freezed,Object? killHouse = freezed,Object? toKillHouse = freezed,Object? steward = freezed,Object? toSteward = freezed,Object? guilds = freezed,Object? toGuilds = freezed,Object? toColdHouse = freezed,Object? indexWeight = freezed,Object? dateTimestamp = freezed,Object? newState = freezed,Object? newReceiverState = freezed,Object? newAllocationState = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? numberOfCarcasses = freezed,Object? realNumberOfCarcasses = freezed,Object? receiverRealNumberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? realWeightOfCarcasses = freezed,Object? receiverRealWeightOfCarcasses = freezed,Object? weightLossOfCarcasses = freezed,Object? finalRegistration = freezed,Object? sellType = freezed,Object? productName = freezed,Object? sellerType = freezed,Object? type = freezed,Object? saleType = freezed,Object? allocationType = freezed,Object? systemRegistrationCode = freezed,Object? registrationCode = freezed,Object? amount = freezed,Object? totalAmount = freezed,Object? totalAmountPaid = freezed,Object? totalAmountRemain = freezed,Object? loggedRegistrationCode = freezed,Object? state = freezed,Object? receiverState = freezed,Object? allocationState = freezed,Object? date = freezed,Object? role = freezed,Object? stewardTempKey = freezed,Object? approvedPriceStatus = freezed,Object? calculateStatus = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? overhead = freezed,Object? warehouse = freezed,Object? stewardWarehouse = freezed,Object? quota = freezed,}) { return _then(_self.copyWith( id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as int?,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable as ProductModel?,killHouse: freezed == killHouse ? _self.killHouse : killHouse // ignore: cast_nullable_to_non_nullable -as dynamic,toKillHouse: freezed == toKillHouse ? _self.toKillHouse : toKillHouse // ignore: cast_nullable_to_non_nullable +as KillHouseModel?,toKillHouse: freezed == toKillHouse ? _self.toKillHouse : toKillHouse // ignore: cast_nullable_to_non_nullable as dynamic,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable as StewardModel?,toSteward: freezed == toSteward ? _self.toSteward : toSteward // ignore: cast_nullable_to_non_nullable as StewardModel?,guilds: freezed == guilds ? _self.guilds : guilds // ignore: cast_nullable_to_non_nullable @@ -117,13 +117,10 @@ as bool?,calculateStatus: freezed == calculateStatus ? _self.calculateStatus : c as bool?,temporaryTrash: freezed == temporaryTrash ? _self.temporaryTrash : temporaryTrash // ignore: cast_nullable_to_non_nullable as bool?,temporaryDeleted: freezed == temporaryDeleted ? _self.temporaryDeleted : temporaryDeleted // ignore: cast_nullable_to_non_nullable as bool?,overhead: freezed == overhead ? _self.overhead : overhead // ignore: cast_nullable_to_non_nullable -as bool?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable -as dynamic,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable -as dynamic,wareHouse: freezed == wareHouse ? _self.wareHouse : wareHouse // ignore: cast_nullable_to_non_nullable -as dynamic,stewardWareHouse: freezed == stewardWareHouse ? _self.stewardWareHouse : stewardWareHouse // ignore: cast_nullable_to_non_nullable -as dynamic,car: freezed == car ? _self.car : car // ignore: cast_nullable_to_non_nullable -as dynamic,dispenser: freezed == dispenser ? _self.dispenser : dispenser // ignore: cast_nullable_to_non_nullable -as dynamic, +as bool?,warehouse: freezed == warehouse ? _self.warehouse : warehouse // ignore: cast_nullable_to_non_nullable +as bool?,stewardWarehouse: freezed == stewardWarehouse ? _self.stewardWarehouse : stewardWarehouse // ignore: cast_nullable_to_non_nullable +as bool?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable +as String?, )); } /// Create a copy of WaitingArrivalModel @@ -142,6 +139,18 @@ $ProductModelCopyWith<$Res>? get product { /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') +$KillHouseModelCopyWith<$Res>? get killHouse { + if (_self.killHouse == null) { + return null; + } + + return $KillHouseModelCopyWith<$Res>(_self.killHouse!, (value) { + return _then(_self.copyWith(killHouse: value)); + }); +}/// Create a copy of WaitingArrivalModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') $StewardModelCopyWith<$Res>? get steward { if (_self.steward == null) { return null; @@ -244,10 +253,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( int? id, ProductModel? product, dynamic killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, dynamic createdBy, dynamic modifiedBy, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( int? id, ProductModel? product, KillHouseModel? killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, bool? warehouse, bool? stewardWarehouse, String? quota)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _WaitingArrivalModel() when $default != null: -return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.overhead,_that.createdBy,_that.modifiedBy,_that.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _: +return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.overhead,_that.warehouse,_that.stewardWarehouse,_that.quota);case _: return orElse(); } @@ -265,10 +274,10 @@ return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.s /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( int? id, ProductModel? product, dynamic killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, dynamic createdBy, dynamic modifiedBy, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( int? id, ProductModel? product, KillHouseModel? killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, bool? warehouse, bool? stewardWarehouse, String? quota) $default,) {final _that = this; switch (_that) { case _WaitingArrivalModel(): -return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.overhead,_that.createdBy,_that.modifiedBy,_that.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _: +return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.overhead,_that.warehouse,_that.stewardWarehouse,_that.quota);case _: throw StateError('Unexpected subclass'); } @@ -285,10 +294,10 @@ return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.s /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( int? id, ProductModel? product, dynamic killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, dynamic createdBy, dynamic modifiedBy, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int? id, ProductModel? product, KillHouseModel? killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, bool? warehouse, bool? stewardWarehouse, String? quota)? $default,) {final _that = this; switch (_that) { case _WaitingArrivalModel() when $default != null: -return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.overhead,_that.createdBy,_that.modifiedBy,_that.wareHouse,_that.stewardWareHouse,_that.car,_that.dispenser);case _: +return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.steward,_that.toSteward,_that.guilds,_that.toGuilds,_that.toColdHouse,_that.indexWeight,_that.dateTimestamp,_that.newState,_that.newReceiverState,_that.newAllocationState,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.numberOfCarcasses,_that.realNumberOfCarcasses,_that.receiverRealNumberOfCarcasses,_that.weightOfCarcasses,_that.realWeightOfCarcasses,_that.receiverRealWeightOfCarcasses,_that.weightLossOfCarcasses,_that.finalRegistration,_that.sellType,_that.productName,_that.sellerType,_that.type,_that.saleType,_that.allocationType,_that.systemRegistrationCode,_that.registrationCode,_that.amount,_that.totalAmount,_that.totalAmountPaid,_that.totalAmountRemain,_that.loggedRegistrationCode,_that.state,_that.receiverState,_that.allocationState,_that.date,_that.role,_that.stewardTempKey,_that.approvedPriceStatus,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.overhead,_that.warehouse,_that.stewardWarehouse,_that.quota);case _: return null; } @@ -300,12 +309,12 @@ return $default(_that.id,_that.product,_that.killHouse,_that.toKillHouse,_that.s @JsonSerializable() class _WaitingArrivalModel implements WaitingArrivalModel { - _WaitingArrivalModel({this.id, this.product, this.killHouse, this.toKillHouse, this.steward, this.toSteward, this.guilds, this.toGuilds, this.toColdHouse, this.indexWeight, this.dateTimestamp, this.newState, this.newReceiverState, this.newAllocationState, this.key, this.createDate, this.modifyDate, this.trash, this.numberOfCarcasses, this.realNumberOfCarcasses, this.receiverRealNumberOfCarcasses, this.weightOfCarcasses, this.realWeightOfCarcasses, this.receiverRealWeightOfCarcasses, this.weightLossOfCarcasses, this.finalRegistration, this.sellType, this.productName, this.sellerType, this.type, this.saleType, this.allocationType, this.systemRegistrationCode, this.registrationCode, this.amount, this.totalAmount, this.totalAmountPaid, this.totalAmountRemain, this.loggedRegistrationCode, this.state, this.receiverState, this.allocationState, this.date, this.role, this.stewardTempKey, this.approvedPriceStatus, this.calculateStatus, this.temporaryTrash, this.temporaryDeleted, this.overhead, this.createdBy, this.modifiedBy, this.wareHouse, this.stewardWareHouse, this.car, this.dispenser}); + _WaitingArrivalModel({this.id, this.product, this.killHouse, this.toKillHouse, this.steward, this.toSteward, this.guilds, this.toGuilds, this.toColdHouse, this.indexWeight, this.dateTimestamp, this.newState, this.newReceiverState, this.newAllocationState, this.key, this.createDate, this.modifyDate, this.trash, this.numberOfCarcasses, this.realNumberOfCarcasses, this.receiverRealNumberOfCarcasses, this.weightOfCarcasses, this.realWeightOfCarcasses, this.receiverRealWeightOfCarcasses, this.weightLossOfCarcasses, this.finalRegistration, this.sellType, this.productName, this.sellerType, this.type, this.saleType, this.allocationType, this.systemRegistrationCode, this.registrationCode, this.amount, this.totalAmount, this.totalAmountPaid, this.totalAmountRemain, this.loggedRegistrationCode, this.state, this.receiverState, this.allocationState, this.date, this.role, this.stewardTempKey, this.approvedPriceStatus, this.calculateStatus, this.temporaryTrash, this.temporaryDeleted, this.overhead, this.warehouse, this.stewardWarehouse, this.quota}); factory _WaitingArrivalModel.fromJson(Map json) => _$WaitingArrivalModelFromJson(json); @override final int? id; @override final ProductModel? product; -@override final dynamic killHouse; +@override final KillHouseModel? killHouse; @override final dynamic toKillHouse; @override final StewardModel? steward; @override final StewardModel? toSteward; @@ -353,12 +362,9 @@ class _WaitingArrivalModel implements WaitingArrivalModel { @override final bool? temporaryTrash; @override final bool? temporaryDeleted; @override final bool? overhead; -@override final dynamic createdBy; -@override final dynamic modifiedBy; -@override final dynamic wareHouse; -@override final dynamic stewardWareHouse; -@override final dynamic car; -@override final dynamic dispenser; +@override final bool? warehouse; +@override final bool? stewardWarehouse; +@override final String? quota; /// Create a copy of WaitingArrivalModel /// with the given fields replaced by the non-null parameter values. @@ -373,16 +379,16 @@ Map toJson() { @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _WaitingArrivalModel&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&const DeepCollectionEquality().equals(other.killHouse, killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.toSteward, toSteward) || other.toSteward == toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&const DeepCollectionEquality().equals(other.toGuilds, toGuilds)&&const DeepCollectionEquality().equals(other.toColdHouse, toColdHouse)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.dateTimestamp, dateTimestamp) || other.dateTimestamp == dateTimestamp)&&(identical(other.newState, newState) || other.newState == newState)&&(identical(other.newReceiverState, newReceiverState) || other.newReceiverState == newReceiverState)&&(identical(other.newAllocationState, newAllocationState) || other.newAllocationState == newAllocationState)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.realNumberOfCarcasses, realNumberOfCarcasses) || other.realNumberOfCarcasses == realNumberOfCarcasses)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.realWeightOfCarcasses, realWeightOfCarcasses) || other.realWeightOfCarcasses == realWeightOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses)&&(identical(other.finalRegistration, finalRegistration) || other.finalRegistration == finalRegistration)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.productName, productName) || other.productName == productName)&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.type, type) || other.type == type)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.systemRegistrationCode, systemRegistrationCode) || other.systemRegistrationCode == systemRegistrationCode)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.totalAmountPaid, totalAmountPaid) || other.totalAmountPaid == totalAmountPaid)&&(identical(other.totalAmountRemain, totalAmountRemain) || other.totalAmountRemain == totalAmountRemain)&&const DeepCollectionEquality().equals(other.loggedRegistrationCode, loggedRegistrationCode)&&(identical(other.state, state) || other.state == state)&&(identical(other.receiverState, receiverState) || other.receiverState == receiverState)&&(identical(other.allocationState, allocationState) || other.allocationState == allocationState)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.role, role)&&const DeepCollectionEquality().equals(other.stewardTempKey, stewardTempKey)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.overhead, overhead) || other.overhead == overhead)&&const DeepCollectionEquality().equals(other.createdBy, createdBy)&&const DeepCollectionEquality().equals(other.modifiedBy, modifiedBy)&&const DeepCollectionEquality().equals(other.wareHouse, wareHouse)&&const DeepCollectionEquality().equals(other.stewardWareHouse, stewardWareHouse)&&const DeepCollectionEquality().equals(other.car, car)&&const DeepCollectionEquality().equals(other.dispenser, dispenser)); + return identical(this, other) || (other.runtimeType == runtimeType&&other is _WaitingArrivalModel&&(identical(other.id, id) || other.id == id)&&(identical(other.product, product) || other.product == product)&&(identical(other.killHouse, killHouse) || other.killHouse == killHouse)&&const DeepCollectionEquality().equals(other.toKillHouse, toKillHouse)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.toSteward, toSteward) || other.toSteward == toSteward)&&const DeepCollectionEquality().equals(other.guilds, guilds)&&const DeepCollectionEquality().equals(other.toGuilds, toGuilds)&&const DeepCollectionEquality().equals(other.toColdHouse, toColdHouse)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.dateTimestamp, dateTimestamp) || other.dateTimestamp == dateTimestamp)&&(identical(other.newState, newState) || other.newState == newState)&&(identical(other.newReceiverState, newReceiverState) || other.newReceiverState == newReceiverState)&&(identical(other.newAllocationState, newAllocationState) || other.newAllocationState == newAllocationState)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.realNumberOfCarcasses, realNumberOfCarcasses) || other.realNumberOfCarcasses == realNumberOfCarcasses)&&(identical(other.receiverRealNumberOfCarcasses, receiverRealNumberOfCarcasses) || other.receiverRealNumberOfCarcasses == receiverRealNumberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.realWeightOfCarcasses, realWeightOfCarcasses) || other.realWeightOfCarcasses == realWeightOfCarcasses)&&(identical(other.receiverRealWeightOfCarcasses, receiverRealWeightOfCarcasses) || other.receiverRealWeightOfCarcasses == receiverRealWeightOfCarcasses)&&(identical(other.weightLossOfCarcasses, weightLossOfCarcasses) || other.weightLossOfCarcasses == weightLossOfCarcasses)&&(identical(other.finalRegistration, finalRegistration) || other.finalRegistration == finalRegistration)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.productName, productName) || other.productName == productName)&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.type, type) || other.type == type)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.systemRegistrationCode, systemRegistrationCode) || other.systemRegistrationCode == systemRegistrationCode)&&(identical(other.registrationCode, registrationCode) || other.registrationCode == registrationCode)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.totalAmountPaid, totalAmountPaid) || other.totalAmountPaid == totalAmountPaid)&&(identical(other.totalAmountRemain, totalAmountRemain) || other.totalAmountRemain == totalAmountRemain)&&const DeepCollectionEquality().equals(other.loggedRegistrationCode, loggedRegistrationCode)&&(identical(other.state, state) || other.state == state)&&(identical(other.receiverState, receiverState) || other.receiverState == receiverState)&&(identical(other.allocationState, allocationState) || other.allocationState == allocationState)&&(identical(other.date, date) || other.date == date)&&const DeepCollectionEquality().equals(other.role, role)&&const DeepCollectionEquality().equals(other.stewardTempKey, stewardTempKey)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.overhead, overhead) || other.overhead == overhead)&&(identical(other.warehouse, warehouse) || other.warehouse == warehouse)&&(identical(other.stewardWarehouse, stewardWarehouse) || other.stewardWarehouse == stewardWarehouse)&&(identical(other.quota, quota) || other.quota == quota)); } @JsonKey(includeFromJson: false, includeToJson: false) @override -int get hashCode => Object.hashAll([runtimeType,id,product,const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(toKillHouse),steward,toSteward,const DeepCollectionEquality().hash(guilds),const DeepCollectionEquality().hash(toGuilds),const DeepCollectionEquality().hash(toColdHouse),indexWeight,dateTimestamp,newState,newReceiverState,newAllocationState,key,createDate,modifyDate,trash,numberOfCarcasses,realNumberOfCarcasses,receiverRealNumberOfCarcasses,weightOfCarcasses,realWeightOfCarcasses,receiverRealWeightOfCarcasses,weightLossOfCarcasses,finalRegistration,sellType,productName,sellerType,type,saleType,allocationType,systemRegistrationCode,registrationCode,amount,totalAmount,totalAmountPaid,totalAmountRemain,const DeepCollectionEquality().hash(loggedRegistrationCode),state,receiverState,allocationState,date,const DeepCollectionEquality().hash(role),const DeepCollectionEquality().hash(stewardTempKey),approvedPriceStatus,calculateStatus,temporaryTrash,temporaryDeleted,overhead,const DeepCollectionEquality().hash(createdBy),const DeepCollectionEquality().hash(modifiedBy),const DeepCollectionEquality().hash(wareHouse),const DeepCollectionEquality().hash(stewardWareHouse),const DeepCollectionEquality().hash(car),const DeepCollectionEquality().hash(dispenser)]); +int get hashCode => Object.hashAll([runtimeType,id,product,killHouse,const DeepCollectionEquality().hash(toKillHouse),steward,toSteward,const DeepCollectionEquality().hash(guilds),const DeepCollectionEquality().hash(toGuilds),const DeepCollectionEquality().hash(toColdHouse),indexWeight,dateTimestamp,newState,newReceiverState,newAllocationState,key,createDate,modifyDate,trash,numberOfCarcasses,realNumberOfCarcasses,receiverRealNumberOfCarcasses,weightOfCarcasses,realWeightOfCarcasses,receiverRealWeightOfCarcasses,weightLossOfCarcasses,finalRegistration,sellType,productName,sellerType,type,saleType,allocationType,systemRegistrationCode,registrationCode,amount,totalAmount,totalAmountPaid,totalAmountRemain,const DeepCollectionEquality().hash(loggedRegistrationCode),state,receiverState,allocationState,date,const DeepCollectionEquality().hash(role),const DeepCollectionEquality().hash(stewardTempKey),approvedPriceStatus,calculateStatus,temporaryTrash,temporaryDeleted,overhead,warehouse,stewardWarehouse,quota]); @override String toString() { - return 'WaitingArrivalModel(id: $id, product: $product, killHouse: $killHouse, toKillHouse: $toKillHouse, steward: $steward, toSteward: $toSteward, guilds: $guilds, toGuilds: $toGuilds, toColdHouse: $toColdHouse, indexWeight: $indexWeight, dateTimestamp: $dateTimestamp, newState: $newState, newReceiverState: $newReceiverState, newAllocationState: $newAllocationState, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, numberOfCarcasses: $numberOfCarcasses, realNumberOfCarcasses: $realNumberOfCarcasses, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, realWeightOfCarcasses: $realWeightOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses, finalRegistration: $finalRegistration, sellType: $sellType, productName: $productName, sellerType: $sellerType, type: $type, saleType: $saleType, allocationType: $allocationType, systemRegistrationCode: $systemRegistrationCode, registrationCode: $registrationCode, amount: $amount, totalAmount: $totalAmount, totalAmountPaid: $totalAmountPaid, totalAmountRemain: $totalAmountRemain, loggedRegistrationCode: $loggedRegistrationCode, state: $state, receiverState: $receiverState, allocationState: $allocationState, date: $date, role: $role, stewardTempKey: $stewardTempKey, approvedPriceStatus: $approvedPriceStatus, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, overhead: $overhead, createdBy: $createdBy, modifiedBy: $modifiedBy, wareHouse: $wareHouse, stewardWareHouse: $stewardWareHouse, car: $car, dispenser: $dispenser)'; + return 'WaitingArrivalModel(id: $id, product: $product, killHouse: $killHouse, toKillHouse: $toKillHouse, steward: $steward, toSteward: $toSteward, guilds: $guilds, toGuilds: $toGuilds, toColdHouse: $toColdHouse, indexWeight: $indexWeight, dateTimestamp: $dateTimestamp, newState: $newState, newReceiverState: $newReceiverState, newAllocationState: $newAllocationState, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, numberOfCarcasses: $numberOfCarcasses, realNumberOfCarcasses: $realNumberOfCarcasses, receiverRealNumberOfCarcasses: $receiverRealNumberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, realWeightOfCarcasses: $realWeightOfCarcasses, receiverRealWeightOfCarcasses: $receiverRealWeightOfCarcasses, weightLossOfCarcasses: $weightLossOfCarcasses, finalRegistration: $finalRegistration, sellType: $sellType, productName: $productName, sellerType: $sellerType, type: $type, saleType: $saleType, allocationType: $allocationType, systemRegistrationCode: $systemRegistrationCode, registrationCode: $registrationCode, amount: $amount, totalAmount: $totalAmount, totalAmountPaid: $totalAmountPaid, totalAmountRemain: $totalAmountRemain, loggedRegistrationCode: $loggedRegistrationCode, state: $state, receiverState: $receiverState, allocationState: $allocationState, date: $date, role: $role, stewardTempKey: $stewardTempKey, approvedPriceStatus: $approvedPriceStatus, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, overhead: $overhead, warehouse: $warehouse, stewardWarehouse: $stewardWarehouse, quota: $quota)'; } @@ -393,11 +399,11 @@ abstract mixin class _$WaitingArrivalModelCopyWith<$Res> implements $WaitingArri factory _$WaitingArrivalModelCopyWith(_WaitingArrivalModel value, $Res Function(_WaitingArrivalModel) _then) = __$WaitingArrivalModelCopyWithImpl; @override @useResult $Res call({ - int? id, ProductModel? product, dynamic killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, dynamic createdBy, dynamic modifiedBy, dynamic wareHouse, dynamic stewardWareHouse, dynamic car, dynamic dispenser + int? id, ProductModel? product, KillHouseModel? killHouse, dynamic toKillHouse, StewardModel? steward, StewardModel? toSteward, dynamic guilds, dynamic toGuilds, dynamic toColdHouse, int? indexWeight, int? dateTimestamp, int? newState, int? newReceiverState, int? newAllocationState, String? key, String? createDate, String? modifyDate, bool? trash, int? numberOfCarcasses, int? realNumberOfCarcasses, int? receiverRealNumberOfCarcasses, double? weightOfCarcasses, double? realWeightOfCarcasses, double? receiverRealWeightOfCarcasses, double? weightLossOfCarcasses, bool? finalRegistration, String? sellType, String? productName, String? sellerType, String? type, String? saleType, String? allocationType, bool? systemRegistrationCode, int? registrationCode, int? amount, int? totalAmount, int? totalAmountPaid, int? totalAmountRemain, dynamic loggedRegistrationCode, String? state, String? receiverState, String? allocationState, String? date, dynamic role, dynamic stewardTempKey, bool? approvedPriceStatus, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, bool? overhead, bool? warehouse, bool? stewardWarehouse, String? quota }); -@override $ProductModelCopyWith<$Res>? get product;@override $StewardModelCopyWith<$Res>? get steward;@override $StewardModelCopyWith<$Res>? get toSteward; +@override $ProductModelCopyWith<$Res>? get product;@override $KillHouseModelCopyWith<$Res>? get killHouse;@override $StewardModelCopyWith<$Res>? get steward;@override $StewardModelCopyWith<$Res>? get toSteward; } /// @nodoc @@ -410,12 +416,12 @@ class __$WaitingArrivalModelCopyWithImpl<$Res> /// Create a copy of WaitingArrivalModel /// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? product = freezed,Object? killHouse = freezed,Object? toKillHouse = freezed,Object? steward = freezed,Object? toSteward = freezed,Object? guilds = freezed,Object? toGuilds = freezed,Object? toColdHouse = freezed,Object? indexWeight = freezed,Object? dateTimestamp = freezed,Object? newState = freezed,Object? newReceiverState = freezed,Object? newAllocationState = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? numberOfCarcasses = freezed,Object? realNumberOfCarcasses = freezed,Object? receiverRealNumberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? realWeightOfCarcasses = freezed,Object? receiverRealWeightOfCarcasses = freezed,Object? weightLossOfCarcasses = freezed,Object? finalRegistration = freezed,Object? sellType = freezed,Object? productName = freezed,Object? sellerType = freezed,Object? type = freezed,Object? saleType = freezed,Object? allocationType = freezed,Object? systemRegistrationCode = freezed,Object? registrationCode = freezed,Object? amount = freezed,Object? totalAmount = freezed,Object? totalAmountPaid = freezed,Object? totalAmountRemain = freezed,Object? loggedRegistrationCode = freezed,Object? state = freezed,Object? receiverState = freezed,Object? allocationState = freezed,Object? date = freezed,Object? role = freezed,Object? stewardTempKey = freezed,Object? approvedPriceStatus = freezed,Object? calculateStatus = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? overhead = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? wareHouse = freezed,Object? stewardWareHouse = freezed,Object? car = freezed,Object? dispenser = freezed,}) { +@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? product = freezed,Object? killHouse = freezed,Object? toKillHouse = freezed,Object? steward = freezed,Object? toSteward = freezed,Object? guilds = freezed,Object? toGuilds = freezed,Object? toColdHouse = freezed,Object? indexWeight = freezed,Object? dateTimestamp = freezed,Object? newState = freezed,Object? newReceiverState = freezed,Object? newAllocationState = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? numberOfCarcasses = freezed,Object? realNumberOfCarcasses = freezed,Object? receiverRealNumberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? realWeightOfCarcasses = freezed,Object? receiverRealWeightOfCarcasses = freezed,Object? weightLossOfCarcasses = freezed,Object? finalRegistration = freezed,Object? sellType = freezed,Object? productName = freezed,Object? sellerType = freezed,Object? type = freezed,Object? saleType = freezed,Object? allocationType = freezed,Object? systemRegistrationCode = freezed,Object? registrationCode = freezed,Object? amount = freezed,Object? totalAmount = freezed,Object? totalAmountPaid = freezed,Object? totalAmountRemain = freezed,Object? loggedRegistrationCode = freezed,Object? state = freezed,Object? receiverState = freezed,Object? allocationState = freezed,Object? date = freezed,Object? role = freezed,Object? stewardTempKey = freezed,Object? approvedPriceStatus = freezed,Object? calculateStatus = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? overhead = freezed,Object? warehouse = freezed,Object? stewardWarehouse = freezed,Object? quota = freezed,}) { return _then(_WaitingArrivalModel( id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as int?,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable as ProductModel?,killHouse: freezed == killHouse ? _self.killHouse : killHouse // ignore: cast_nullable_to_non_nullable -as dynamic,toKillHouse: freezed == toKillHouse ? _self.toKillHouse : toKillHouse // ignore: cast_nullable_to_non_nullable +as KillHouseModel?,toKillHouse: freezed == toKillHouse ? _self.toKillHouse : toKillHouse // ignore: cast_nullable_to_non_nullable as dynamic,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable as StewardModel?,toSteward: freezed == toSteward ? _self.toSteward : toSteward // ignore: cast_nullable_to_non_nullable as StewardModel?,guilds: freezed == guilds ? _self.guilds : guilds // ignore: cast_nullable_to_non_nullable @@ -462,13 +468,10 @@ as bool?,calculateStatus: freezed == calculateStatus ? _self.calculateStatus : c as bool?,temporaryTrash: freezed == temporaryTrash ? _self.temporaryTrash : temporaryTrash // ignore: cast_nullable_to_non_nullable as bool?,temporaryDeleted: freezed == temporaryDeleted ? _self.temporaryDeleted : temporaryDeleted // ignore: cast_nullable_to_non_nullable as bool?,overhead: freezed == overhead ? _self.overhead : overhead // ignore: cast_nullable_to_non_nullable -as bool?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable -as dynamic,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable -as dynamic,wareHouse: freezed == wareHouse ? _self.wareHouse : wareHouse // ignore: cast_nullable_to_non_nullable -as dynamic,stewardWareHouse: freezed == stewardWareHouse ? _self.stewardWareHouse : stewardWareHouse // ignore: cast_nullable_to_non_nullable -as dynamic,car: freezed == car ? _self.car : car // ignore: cast_nullable_to_non_nullable -as dynamic,dispenser: freezed == dispenser ? _self.dispenser : dispenser // ignore: cast_nullable_to_non_nullable -as dynamic, +as bool?,warehouse: freezed == warehouse ? _self.warehouse : warehouse // ignore: cast_nullable_to_non_nullable +as bool?,stewardWarehouse: freezed == stewardWarehouse ? _self.stewardWarehouse : stewardWarehouse // ignore: cast_nullable_to_non_nullable +as bool?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable +as String?, )); } @@ -488,6 +491,18 @@ $ProductModelCopyWith<$Res>? get product { /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') +$KillHouseModelCopyWith<$Res>? get killHouse { + if (_self.killHouse == null) { + return null; + } + + return $KillHouseModelCopyWith<$Res>(_self.killHouse!, (value) { + return _then(_self.copyWith(killHouse: value)); + }); +}/// Create a copy of WaitingArrivalModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') $StewardModelCopyWith<$Res>? get steward { if (_self.steward == null) { return null; @@ -778,10 +793,1230 @@ as double?, } +/// @nodoc +mixin _$KillHouseModel { + + String? get key; String? get name; bool? get killer; KillHouseOperatorModel? get killHouseOperator; +/// Create a copy of KillHouseModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$KillHouseModelCopyWith get copyWith => _$KillHouseModelCopyWithImpl(this as KillHouseModel, _$identity); + + /// Serializes this KillHouseModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHouseModel&&(identical(other.key, key) || other.key == key)&&(identical(other.name, name) || other.name == name)&&(identical(other.killer, killer) || other.killer == killer)&&(identical(other.killHouseOperator, killHouseOperator) || other.killHouseOperator == killHouseOperator)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,name,killer,killHouseOperator); + +@override +String toString() { + return 'KillHouseModel(key: $key, name: $name, killer: $killer, killHouseOperator: $killHouseOperator)'; +} + + +} + +/// @nodoc +abstract mixin class $KillHouseModelCopyWith<$Res> { + factory $KillHouseModelCopyWith(KillHouseModel value, $Res Function(KillHouseModel) _then) = _$KillHouseModelCopyWithImpl; +@useResult +$Res call({ + String? key, String? name, bool? killer, KillHouseOperatorModel? killHouseOperator +}); + + +$KillHouseOperatorModelCopyWith<$Res>? get killHouseOperator; + +} +/// @nodoc +class _$KillHouseModelCopyWithImpl<$Res> + implements $KillHouseModelCopyWith<$Res> { + _$KillHouseModelCopyWithImpl(this._self, this._then); + + final KillHouseModel _self; + final $Res Function(KillHouseModel) _then; + +/// Create a copy of KillHouseModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? name = freezed,Object? killer = freezed,Object? killHouseOperator = freezed,}) { + return _then(_self.copyWith( +key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?,killer: freezed == killer ? _self.killer : killer // ignore: cast_nullable_to_non_nullable +as bool?,killHouseOperator: freezed == killHouseOperator ? _self.killHouseOperator : killHouseOperator // ignore: cast_nullable_to_non_nullable +as KillHouseOperatorModel?, + )); +} +/// Create a copy of KillHouseModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$KillHouseOperatorModelCopyWith<$Res>? get killHouseOperator { + if (_self.killHouseOperator == null) { + return null; + } + + return $KillHouseOperatorModelCopyWith<$Res>(_self.killHouseOperator!, (value) { + return _then(_self.copyWith(killHouseOperator: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [KillHouseModel]. +extension KillHouseModelPatterns on KillHouseModel { +/// 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 Function( _KillHouseModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _KillHouseModel() 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 Function( _KillHouseModel value) $default,){ +final _that = this; +switch (_that) { +case _KillHouseModel(): +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? Function( _KillHouseModel value)? $default,){ +final _that = this; +switch (_that) { +case _KillHouseModel() 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 Function( String? key, String? name, bool? killer, KillHouseOperatorModel? killHouseOperator)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _KillHouseModel() when $default != null: +return $default(_that.key,_that.name,_that.killer,_that.killHouseOperator);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 Function( String? key, String? name, bool? killer, KillHouseOperatorModel? killHouseOperator) $default,) {final _that = this; +switch (_that) { +case _KillHouseModel(): +return $default(_that.key,_that.name,_that.killer,_that.killHouseOperator);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? Function( String? key, String? name, bool? killer, KillHouseOperatorModel? killHouseOperator)? $default,) {final _that = this; +switch (_that) { +case _KillHouseModel() when $default != null: +return $default(_that.key,_that.name,_that.killer,_that.killHouseOperator);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _KillHouseModel implements KillHouseModel { + _KillHouseModel({this.key, this.name, this.killer, this.killHouseOperator}); + factory _KillHouseModel.fromJson(Map json) => _$KillHouseModelFromJson(json); + +@override final String? key; +@override final String? name; +@override final bool? killer; +@override final KillHouseOperatorModel? killHouseOperator; + +/// Create a copy of KillHouseModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$KillHouseModelCopyWith<_KillHouseModel> get copyWith => __$KillHouseModelCopyWithImpl<_KillHouseModel>(this, _$identity); + +@override +Map toJson() { + return _$KillHouseModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHouseModel&&(identical(other.key, key) || other.key == key)&&(identical(other.name, name) || other.name == name)&&(identical(other.killer, killer) || other.killer == killer)&&(identical(other.killHouseOperator, killHouseOperator) || other.killHouseOperator == killHouseOperator)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,name,killer,killHouseOperator); + +@override +String toString() { + return 'KillHouseModel(key: $key, name: $name, killer: $killer, killHouseOperator: $killHouseOperator)'; +} + + +} + +/// @nodoc +abstract mixin class _$KillHouseModelCopyWith<$Res> implements $KillHouseModelCopyWith<$Res> { + factory _$KillHouseModelCopyWith(_KillHouseModel value, $Res Function(_KillHouseModel) _then) = __$KillHouseModelCopyWithImpl; +@override @useResult +$Res call({ + String? key, String? name, bool? killer, KillHouseOperatorModel? killHouseOperator +}); + + +@override $KillHouseOperatorModelCopyWith<$Res>? get killHouseOperator; + +} +/// @nodoc +class __$KillHouseModelCopyWithImpl<$Res> + implements _$KillHouseModelCopyWith<$Res> { + __$KillHouseModelCopyWithImpl(this._self, this._then); + + final _KillHouseModel _self; + final $Res Function(_KillHouseModel) _then; + +/// Create a copy of KillHouseModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? name = freezed,Object? killer = freezed,Object? killHouseOperator = freezed,}) { + return _then(_KillHouseModel( +key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?,killer: freezed == killer ? _self.killer : killer // ignore: cast_nullable_to_non_nullable +as bool?,killHouseOperator: freezed == killHouseOperator ? _self.killHouseOperator : killHouseOperator // ignore: cast_nullable_to_non_nullable +as KillHouseOperatorModel?, + )); +} + +/// Create a copy of KillHouseModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$KillHouseOperatorModelCopyWith<$Res>? get killHouseOperator { + if (_self.killHouseOperator == null) { + return null; + } + + return $KillHouseOperatorModelCopyWith<$Res>(_self.killHouseOperator!, (value) { + return _then(_self.copyWith(killHouseOperator: value)); + }); +} +} + + +/// @nodoc +mixin _$KillHouseOperatorModel { + + KillHouseUserModel? get user; +/// Create a copy of KillHouseOperatorModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$KillHouseOperatorModelCopyWith get copyWith => _$KillHouseOperatorModelCopyWithImpl(this as KillHouseOperatorModel, _$identity); + + /// Serializes this KillHouseOperatorModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHouseOperatorModel&&(identical(other.user, user) || other.user == user)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,user); + +@override +String toString() { + return 'KillHouseOperatorModel(user: $user)'; +} + + +} + +/// @nodoc +abstract mixin class $KillHouseOperatorModelCopyWith<$Res> { + factory $KillHouseOperatorModelCopyWith(KillHouseOperatorModel value, $Res Function(KillHouseOperatorModel) _then) = _$KillHouseOperatorModelCopyWithImpl; +@useResult +$Res call({ + KillHouseUserModel? user +}); + + +$KillHouseUserModelCopyWith<$Res>? get user; + +} +/// @nodoc +class _$KillHouseOperatorModelCopyWithImpl<$Res> + implements $KillHouseOperatorModelCopyWith<$Res> { + _$KillHouseOperatorModelCopyWithImpl(this._self, this._then); + + final KillHouseOperatorModel _self; + final $Res Function(KillHouseOperatorModel) _then; + +/// Create a copy of KillHouseOperatorModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? user = freezed,}) { + return _then(_self.copyWith( +user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable +as KillHouseUserModel?, + )); +} +/// Create a copy of KillHouseOperatorModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$KillHouseUserModelCopyWith<$Res>? get user { + if (_self.user == null) { + return null; + } + + return $KillHouseUserModelCopyWith<$Res>(_self.user!, (value) { + return _then(_self.copyWith(user: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [KillHouseOperatorModel]. +extension KillHouseOperatorModelPatterns on KillHouseOperatorModel { +/// 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 Function( _KillHouseOperatorModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _KillHouseOperatorModel() 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 Function( _KillHouseOperatorModel value) $default,){ +final _that = this; +switch (_that) { +case _KillHouseOperatorModel(): +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? Function( _KillHouseOperatorModel value)? $default,){ +final _that = this; +switch (_that) { +case _KillHouseOperatorModel() 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 Function( KillHouseUserModel? user)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _KillHouseOperatorModel() when $default != null: +return $default(_that.user);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 Function( KillHouseUserModel? user) $default,) {final _that = this; +switch (_that) { +case _KillHouseOperatorModel(): +return $default(_that.user);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? Function( KillHouseUserModel? user)? $default,) {final _that = this; +switch (_that) { +case _KillHouseOperatorModel() when $default != null: +return $default(_that.user);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _KillHouseOperatorModel implements KillHouseOperatorModel { + _KillHouseOperatorModel({this.user}); + factory _KillHouseOperatorModel.fromJson(Map json) => _$KillHouseOperatorModelFromJson(json); + +@override final KillHouseUserModel? user; + +/// Create a copy of KillHouseOperatorModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$KillHouseOperatorModelCopyWith<_KillHouseOperatorModel> get copyWith => __$KillHouseOperatorModelCopyWithImpl<_KillHouseOperatorModel>(this, _$identity); + +@override +Map toJson() { + return _$KillHouseOperatorModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHouseOperatorModel&&(identical(other.user, user) || other.user == user)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,user); + +@override +String toString() { + return 'KillHouseOperatorModel(user: $user)'; +} + + +} + +/// @nodoc +abstract mixin class _$KillHouseOperatorModelCopyWith<$Res> implements $KillHouseOperatorModelCopyWith<$Res> { + factory _$KillHouseOperatorModelCopyWith(_KillHouseOperatorModel value, $Res Function(_KillHouseOperatorModel) _then) = __$KillHouseOperatorModelCopyWithImpl; +@override @useResult +$Res call({ + KillHouseUserModel? user +}); + + +@override $KillHouseUserModelCopyWith<$Res>? get user; + +} +/// @nodoc +class __$KillHouseOperatorModelCopyWithImpl<$Res> + implements _$KillHouseOperatorModelCopyWith<$Res> { + __$KillHouseOperatorModelCopyWithImpl(this._self, this._then); + + final _KillHouseOperatorModel _self; + final $Res Function(_KillHouseOperatorModel) _then; + +/// Create a copy of KillHouseOperatorModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? user = freezed,}) { + return _then(_KillHouseOperatorModel( +user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable +as KillHouseUserModel?, + )); +} + +/// Create a copy of KillHouseOperatorModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$KillHouseUserModelCopyWith<$Res>? get user { + if (_self.user == null) { + return null; + } + + return $KillHouseUserModelCopyWith<$Res>(_self.user!, (value) { + return _then(_self.copyWith(user: value)); + }); +} +} + + +/// @nodoc +mixin _$KillHouseUserModel { + + String? get fullname; String? get firstName; String? get lastName; int? get baseOrder; String? get mobile; String? get nationalId; String? get nationalCode; String? get key; CityDetailModel? get city; String? get unitName; String? get unitNationalId; String? get unitRegistrationNumber; String? get unitEconomicalNumber; String? get unitProvince; String? get unitCity; String? get unitPostalCode; String? get unitAddress; +/// Create a copy of KillHouseUserModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$KillHouseUserModelCopyWith get copyWith => _$KillHouseUserModelCopyWithImpl(this as KillHouseUserModel, _$identity); + + /// Serializes this KillHouseUserModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHouseUserModel&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.key, key) || other.key == key)&&(identical(other.city, city) || other.city == city)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.unitNationalId, unitNationalId) || other.unitNationalId == unitNationalId)&&(identical(other.unitRegistrationNumber, unitRegistrationNumber) || other.unitRegistrationNumber == unitRegistrationNumber)&&(identical(other.unitEconomicalNumber, unitEconomicalNumber) || other.unitEconomicalNumber == unitEconomicalNumber)&&(identical(other.unitProvince, unitProvince) || other.unitProvince == unitProvince)&&(identical(other.unitCity, unitCity) || other.unitCity == unitCity)&&(identical(other.unitPostalCode, unitPostalCode) || other.unitPostalCode == unitPostalCode)&&(identical(other.unitAddress, unitAddress) || other.unitAddress == unitAddress)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,fullname,firstName,lastName,baseOrder,mobile,nationalId,nationalCode,key,city,unitName,unitNationalId,unitRegistrationNumber,unitEconomicalNumber,unitProvince,unitCity,unitPostalCode,unitAddress); + +@override +String toString() { + return 'KillHouseUserModel(fullname: $fullname, firstName: $firstName, lastName: $lastName, baseOrder: $baseOrder, mobile: $mobile, nationalId: $nationalId, nationalCode: $nationalCode, key: $key, city: $city, unitName: $unitName, unitNationalId: $unitNationalId, unitRegistrationNumber: $unitRegistrationNumber, unitEconomicalNumber: $unitEconomicalNumber, unitProvince: $unitProvince, unitCity: $unitCity, unitPostalCode: $unitPostalCode, unitAddress: $unitAddress)'; +} + + +} + +/// @nodoc +abstract mixin class $KillHouseUserModelCopyWith<$Res> { + factory $KillHouseUserModelCopyWith(KillHouseUserModel value, $Res Function(KillHouseUserModel) _then) = _$KillHouseUserModelCopyWithImpl; +@useResult +$Res call({ + String? fullname, String? firstName, String? lastName, int? baseOrder, String? mobile, String? nationalId, String? nationalCode, String? key, CityDetailModel? city, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress +}); + + +$CityDetailModelCopyWith<$Res>? get city; + +} +/// @nodoc +class _$KillHouseUserModelCopyWithImpl<$Res> + implements $KillHouseUserModelCopyWith<$Res> { + _$KillHouseUserModelCopyWithImpl(this._self, this._then); + + final KillHouseUserModel _self; + final $Res Function(KillHouseUserModel) _then; + +/// Create a copy of KillHouseUserModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? fullname = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? baseOrder = freezed,Object? mobile = freezed,Object? nationalId = freezed,Object? nationalCode = freezed,Object? key = freezed,Object? city = freezed,Object? unitName = freezed,Object? unitNationalId = freezed,Object? unitRegistrationNumber = freezed,Object? unitEconomicalNumber = freezed,Object? unitProvince = freezed,Object? unitCity = freezed,Object? unitPostalCode = freezed,Object? unitAddress = freezed,}) { + return _then(_self.copyWith( +fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable +as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable +as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable +as String?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable +as int?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable +as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable +as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable +as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as CityDetailModel?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable +as String?,unitNationalId: freezed == unitNationalId ? _self.unitNationalId : unitNationalId // ignore: cast_nullable_to_non_nullable +as String?,unitRegistrationNumber: freezed == unitRegistrationNumber ? _self.unitRegistrationNumber : unitRegistrationNumber // ignore: cast_nullable_to_non_nullable +as String?,unitEconomicalNumber: freezed == unitEconomicalNumber ? _self.unitEconomicalNumber : unitEconomicalNumber // ignore: cast_nullable_to_non_nullable +as String?,unitProvince: freezed == unitProvince ? _self.unitProvince : unitProvince // ignore: cast_nullable_to_non_nullable +as String?,unitCity: freezed == unitCity ? _self.unitCity : unitCity // ignore: cast_nullable_to_non_nullable +as String?,unitPostalCode: freezed == unitPostalCode ? _self.unitPostalCode : unitPostalCode // ignore: cast_nullable_to_non_nullable +as String?,unitAddress: freezed == unitAddress ? _self.unitAddress : unitAddress // ignore: cast_nullable_to_non_nullable +as String?, + )); +} +/// Create a copy of KillHouseUserModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$CityDetailModelCopyWith<$Res>? get city { + if (_self.city == null) { + return null; + } + + return $CityDetailModelCopyWith<$Res>(_self.city!, (value) { + return _then(_self.copyWith(city: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [KillHouseUserModel]. +extension KillHouseUserModelPatterns on KillHouseUserModel { +/// 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 Function( _KillHouseUserModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _KillHouseUserModel() 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 Function( _KillHouseUserModel value) $default,){ +final _that = this; +switch (_that) { +case _KillHouseUserModel(): +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? Function( _KillHouseUserModel value)? $default,){ +final _that = this; +switch (_that) { +case _KillHouseUserModel() 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 Function( String? fullname, String? firstName, String? lastName, int? baseOrder, String? mobile, String? nationalId, String? nationalCode, String? key, CityDetailModel? city, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _KillHouseUserModel() when $default != null: +return $default(_that.fullname,_that.firstName,_that.lastName,_that.baseOrder,_that.mobile,_that.nationalId,_that.nationalCode,_that.key,_that.city,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress);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 Function( String? fullname, String? firstName, String? lastName, int? baseOrder, String? mobile, String? nationalId, String? nationalCode, String? key, CityDetailModel? city, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress) $default,) {final _that = this; +switch (_that) { +case _KillHouseUserModel(): +return $default(_that.fullname,_that.firstName,_that.lastName,_that.baseOrder,_that.mobile,_that.nationalId,_that.nationalCode,_that.key,_that.city,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress);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? Function( String? fullname, String? firstName, String? lastName, int? baseOrder, String? mobile, String? nationalId, String? nationalCode, String? key, CityDetailModel? city, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress)? $default,) {final _that = this; +switch (_that) { +case _KillHouseUserModel() when $default != null: +return $default(_that.fullname,_that.firstName,_that.lastName,_that.baseOrder,_that.mobile,_that.nationalId,_that.nationalCode,_that.key,_that.city,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _KillHouseUserModel implements KillHouseUserModel { + _KillHouseUserModel({this.fullname, this.firstName, this.lastName, this.baseOrder, this.mobile, this.nationalId, this.nationalCode, this.key, this.city, this.unitName, this.unitNationalId, this.unitRegistrationNumber, this.unitEconomicalNumber, this.unitProvince, this.unitCity, this.unitPostalCode, this.unitAddress}); + factory _KillHouseUserModel.fromJson(Map json) => _$KillHouseUserModelFromJson(json); + +@override final String? fullname; +@override final String? firstName; +@override final String? lastName; +@override final int? baseOrder; +@override final String? mobile; +@override final String? nationalId; +@override final String? nationalCode; +@override final String? key; +@override final CityDetailModel? city; +@override final String? unitName; +@override final String? unitNationalId; +@override final String? unitRegistrationNumber; +@override final String? unitEconomicalNumber; +@override final String? unitProvince; +@override final String? unitCity; +@override final String? unitPostalCode; +@override final String? unitAddress; + +/// Create a copy of KillHouseUserModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$KillHouseUserModelCopyWith<_KillHouseUserModel> get copyWith => __$KillHouseUserModelCopyWithImpl<_KillHouseUserModel>(this, _$identity); + +@override +Map toJson() { + return _$KillHouseUserModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHouseUserModel&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.key, key) || other.key == key)&&(identical(other.city, city) || other.city == city)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.unitNationalId, unitNationalId) || other.unitNationalId == unitNationalId)&&(identical(other.unitRegistrationNumber, unitRegistrationNumber) || other.unitRegistrationNumber == unitRegistrationNumber)&&(identical(other.unitEconomicalNumber, unitEconomicalNumber) || other.unitEconomicalNumber == unitEconomicalNumber)&&(identical(other.unitProvince, unitProvince) || other.unitProvince == unitProvince)&&(identical(other.unitCity, unitCity) || other.unitCity == unitCity)&&(identical(other.unitPostalCode, unitPostalCode) || other.unitPostalCode == unitPostalCode)&&(identical(other.unitAddress, unitAddress) || other.unitAddress == unitAddress)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,fullname,firstName,lastName,baseOrder,mobile,nationalId,nationalCode,key,city,unitName,unitNationalId,unitRegistrationNumber,unitEconomicalNumber,unitProvince,unitCity,unitPostalCode,unitAddress); + +@override +String toString() { + return 'KillHouseUserModel(fullname: $fullname, firstName: $firstName, lastName: $lastName, baseOrder: $baseOrder, mobile: $mobile, nationalId: $nationalId, nationalCode: $nationalCode, key: $key, city: $city, unitName: $unitName, unitNationalId: $unitNationalId, unitRegistrationNumber: $unitRegistrationNumber, unitEconomicalNumber: $unitEconomicalNumber, unitProvince: $unitProvince, unitCity: $unitCity, unitPostalCode: $unitPostalCode, unitAddress: $unitAddress)'; +} + + +} + +/// @nodoc +abstract mixin class _$KillHouseUserModelCopyWith<$Res> implements $KillHouseUserModelCopyWith<$Res> { + factory _$KillHouseUserModelCopyWith(_KillHouseUserModel value, $Res Function(_KillHouseUserModel) _then) = __$KillHouseUserModelCopyWithImpl; +@override @useResult +$Res call({ + String? fullname, String? firstName, String? lastName, int? baseOrder, String? mobile, String? nationalId, String? nationalCode, String? key, CityDetailModel? city, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress +}); + + +@override $CityDetailModelCopyWith<$Res>? get city; + +} +/// @nodoc +class __$KillHouseUserModelCopyWithImpl<$Res> + implements _$KillHouseUserModelCopyWith<$Res> { + __$KillHouseUserModelCopyWithImpl(this._self, this._then); + + final _KillHouseUserModel _self; + final $Res Function(_KillHouseUserModel) _then; + +/// Create a copy of KillHouseUserModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? fullname = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? baseOrder = freezed,Object? mobile = freezed,Object? nationalId = freezed,Object? nationalCode = freezed,Object? key = freezed,Object? city = freezed,Object? unitName = freezed,Object? unitNationalId = freezed,Object? unitRegistrationNumber = freezed,Object? unitEconomicalNumber = freezed,Object? unitProvince = freezed,Object? unitCity = freezed,Object? unitPostalCode = freezed,Object? unitAddress = freezed,}) { + return _then(_KillHouseUserModel( +fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable +as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable +as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable +as String?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable +as int?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable +as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable +as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable +as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as CityDetailModel?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable +as String?,unitNationalId: freezed == unitNationalId ? _self.unitNationalId : unitNationalId // ignore: cast_nullable_to_non_nullable +as String?,unitRegistrationNumber: freezed == unitRegistrationNumber ? _self.unitRegistrationNumber : unitRegistrationNumber // ignore: cast_nullable_to_non_nullable +as String?,unitEconomicalNumber: freezed == unitEconomicalNumber ? _self.unitEconomicalNumber : unitEconomicalNumber // ignore: cast_nullable_to_non_nullable +as String?,unitProvince: freezed == unitProvince ? _self.unitProvince : unitProvince // ignore: cast_nullable_to_non_nullable +as String?,unitCity: freezed == unitCity ? _self.unitCity : unitCity // ignore: cast_nullable_to_non_nullable +as String?,unitPostalCode: freezed == unitPostalCode ? _self.unitPostalCode : unitPostalCode // ignore: cast_nullable_to_non_nullable +as String?,unitAddress: freezed == unitAddress ? _self.unitAddress : unitAddress // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +/// Create a copy of KillHouseUserModel +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$CityDetailModelCopyWith<$Res>? get city { + if (_self.city == null) { + return null; + } + + return $CityDetailModelCopyWith<$Res>(_self.city!, (value) { + return _then(_self.copyWith(city: value)); + }); +} +} + + +/// @nodoc +mixin _$CityDetailModel { + + int? get id; String? get key; String? get createDate; String? get modifyDate; bool? get trash; int? get provinceIdForeignKey; int? get cityIdKey; String? get name; double? get productPrice; bool? get provinceCenter; int? get cityNumber; String? get cityName; int? get provinceNumber; String? get provinceName; +/// Create a copy of CityDetailModel +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$CityDetailModelCopyWith get copyWith => _$CityDetailModelCopyWithImpl(this as CityDetailModel, _$identity); + + /// Serializes this CityDetailModel to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is CityDetailModel&&(identical(other.id, id) || other.id == id)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.provinceIdForeignKey, provinceIdForeignKey) || other.provinceIdForeignKey == provinceIdForeignKey)&&(identical(other.cityIdKey, cityIdKey) || other.cityIdKey == cityIdKey)&&(identical(other.name, name) || other.name == name)&&(identical(other.productPrice, productPrice) || other.productPrice == productPrice)&&(identical(other.provinceCenter, provinceCenter) || other.provinceCenter == provinceCenter)&&(identical(other.cityNumber, cityNumber) || other.cityNumber == cityNumber)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.provinceNumber, provinceNumber) || other.provinceNumber == provinceNumber)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,key,createDate,modifyDate,trash,provinceIdForeignKey,cityIdKey,name,productPrice,provinceCenter,cityNumber,cityName,provinceNumber,provinceName); + +@override +String toString() { + return 'CityDetailModel(id: $id, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, provinceIdForeignKey: $provinceIdForeignKey, cityIdKey: $cityIdKey, name: $name, productPrice: $productPrice, provinceCenter: $provinceCenter, cityNumber: $cityNumber, cityName: $cityName, provinceNumber: $provinceNumber, provinceName: $provinceName)'; +} + + +} + +/// @nodoc +abstract mixin class $CityDetailModelCopyWith<$Res> { + factory $CityDetailModelCopyWith(CityDetailModel value, $Res Function(CityDetailModel) _then) = _$CityDetailModelCopyWithImpl; +@useResult +$Res call({ + int? id, String? key, String? createDate, String? modifyDate, bool? trash, int? provinceIdForeignKey, int? cityIdKey, String? name, double? productPrice, bool? provinceCenter, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName +}); + + + + +} +/// @nodoc +class _$CityDetailModelCopyWithImpl<$Res> + implements $CityDetailModelCopyWith<$Res> { + _$CityDetailModelCopyWithImpl(this._self, this._then); + + final CityDetailModel _self; + final $Res Function(CityDetailModel) _then; + +/// Create a copy of CityDetailModel +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? provinceIdForeignKey = freezed,Object? cityIdKey = freezed,Object? name = freezed,Object? productPrice = freezed,Object? provinceCenter = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,}) { + return _then(_self.copyWith( +id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable +as String?,modifyDate: freezed == modifyDate ? _self.modifyDate : modifyDate // ignore: cast_nullable_to_non_nullable +as String?,trash: freezed == trash ? _self.trash : trash // ignore: cast_nullable_to_non_nullable +as bool?,provinceIdForeignKey: freezed == provinceIdForeignKey ? _self.provinceIdForeignKey : provinceIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,cityIdKey: freezed == cityIdKey ? _self.cityIdKey : cityIdKey // ignore: cast_nullable_to_non_nullable +as int?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?,productPrice: freezed == productPrice ? _self.productPrice : productPrice // ignore: cast_nullable_to_non_nullable +as double?,provinceCenter: freezed == provinceCenter ? _self.provinceCenter : provinceCenter // ignore: cast_nullable_to_non_nullable +as bool?,cityNumber: freezed == cityNumber ? _self.cityNumber : cityNumber // ignore: cast_nullable_to_non_nullable +as int?,cityName: freezed == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable +as String?,provinceNumber: freezed == provinceNumber ? _self.provinceNumber : provinceNumber // ignore: cast_nullable_to_non_nullable +as int?,provinceName: freezed == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [CityDetailModel]. +extension CityDetailModelPatterns on CityDetailModel { +/// 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 Function( _CityDetailModel value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _CityDetailModel() 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 Function( _CityDetailModel value) $default,){ +final _that = this; +switch (_that) { +case _CityDetailModel(): +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? Function( _CityDetailModel value)? $default,){ +final _that = this; +switch (_that) { +case _CityDetailModel() 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 Function( int? id, String? key, String? createDate, String? modifyDate, bool? trash, int? provinceIdForeignKey, int? cityIdKey, String? name, double? productPrice, bool? provinceCenter, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _CityDetailModel() when $default != null: +return $default(_that.id,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.provinceIdForeignKey,_that.cityIdKey,_that.name,_that.productPrice,_that.provinceCenter,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName);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 Function( int? id, String? key, String? createDate, String? modifyDate, bool? trash, int? provinceIdForeignKey, int? cityIdKey, String? name, double? productPrice, bool? provinceCenter, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName) $default,) {final _that = this; +switch (_that) { +case _CityDetailModel(): +return $default(_that.id,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.provinceIdForeignKey,_that.cityIdKey,_that.name,_that.productPrice,_that.provinceCenter,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName);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? Function( int? id, String? key, String? createDate, String? modifyDate, bool? trash, int? provinceIdForeignKey, int? cityIdKey, String? name, double? productPrice, bool? provinceCenter, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName)? $default,) {final _that = this; +switch (_that) { +case _CityDetailModel() when $default != null: +return $default(_that.id,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.provinceIdForeignKey,_that.cityIdKey,_that.name,_that.productPrice,_that.provinceCenter,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _CityDetailModel implements CityDetailModel { + _CityDetailModel({this.id, this.key, this.createDate, this.modifyDate, this.trash, this.provinceIdForeignKey, this.cityIdKey, this.name, this.productPrice, this.provinceCenter, this.cityNumber, this.cityName, this.provinceNumber, this.provinceName}); + factory _CityDetailModel.fromJson(Map json) => _$CityDetailModelFromJson(json); + +@override final int? id; +@override final String? key; +@override final String? createDate; +@override final String? modifyDate; +@override final bool? trash; +@override final int? provinceIdForeignKey; +@override final int? cityIdKey; +@override final String? name; +@override final double? productPrice; +@override final bool? provinceCenter; +@override final int? cityNumber; +@override final String? cityName; +@override final int? provinceNumber; +@override final String? provinceName; + +/// Create a copy of CityDetailModel +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$CityDetailModelCopyWith<_CityDetailModel> get copyWith => __$CityDetailModelCopyWithImpl<_CityDetailModel>(this, _$identity); + +@override +Map toJson() { + return _$CityDetailModelToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _CityDetailModel&&(identical(other.id, id) || other.id == id)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.provinceIdForeignKey, provinceIdForeignKey) || other.provinceIdForeignKey == provinceIdForeignKey)&&(identical(other.cityIdKey, cityIdKey) || other.cityIdKey == cityIdKey)&&(identical(other.name, name) || other.name == name)&&(identical(other.productPrice, productPrice) || other.productPrice == productPrice)&&(identical(other.provinceCenter, provinceCenter) || other.provinceCenter == provinceCenter)&&(identical(other.cityNumber, cityNumber) || other.cityNumber == cityNumber)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.provinceNumber, provinceNumber) || other.provinceNumber == provinceNumber)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,id,key,createDate,modifyDate,trash,provinceIdForeignKey,cityIdKey,name,productPrice,provinceCenter,cityNumber,cityName,provinceNumber,provinceName); + +@override +String toString() { + return 'CityDetailModel(id: $id, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, provinceIdForeignKey: $provinceIdForeignKey, cityIdKey: $cityIdKey, name: $name, productPrice: $productPrice, provinceCenter: $provinceCenter, cityNumber: $cityNumber, cityName: $cityName, provinceNumber: $provinceNumber, provinceName: $provinceName)'; +} + + +} + +/// @nodoc +abstract mixin class _$CityDetailModelCopyWith<$Res> implements $CityDetailModelCopyWith<$Res> { + factory _$CityDetailModelCopyWith(_CityDetailModel value, $Res Function(_CityDetailModel) _then) = __$CityDetailModelCopyWithImpl; +@override @useResult +$Res call({ + int? id, String? key, String? createDate, String? modifyDate, bool? trash, int? provinceIdForeignKey, int? cityIdKey, String? name, double? productPrice, bool? provinceCenter, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName +}); + + + + +} +/// @nodoc +class __$CityDetailModelCopyWithImpl<$Res> + implements _$CityDetailModelCopyWith<$Res> { + __$CityDetailModelCopyWithImpl(this._self, this._then); + + final _CityDetailModel _self; + final $Res Function(_CityDetailModel) _then; + +/// Create a copy of CityDetailModel +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? provinceIdForeignKey = freezed,Object? cityIdKey = freezed,Object? name = freezed,Object? productPrice = freezed,Object? provinceCenter = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,}) { + return _then(_CityDetailModel( +id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable +as String?,modifyDate: freezed == modifyDate ? _self.modifyDate : modifyDate // ignore: cast_nullable_to_non_nullable +as String?,trash: freezed == trash ? _self.trash : trash // ignore: cast_nullable_to_non_nullable +as bool?,provinceIdForeignKey: freezed == provinceIdForeignKey ? _self.provinceIdForeignKey : provinceIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,cityIdKey: freezed == cityIdKey ? _self.cityIdKey : cityIdKey // ignore: cast_nullable_to_non_nullable +as int?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?,productPrice: freezed == productPrice ? _self.productPrice : productPrice // ignore: cast_nullable_to_non_nullable +as double?,provinceCenter: freezed == provinceCenter ? _self.provinceCenter : provinceCenter // ignore: cast_nullable_to_non_nullable +as bool?,cityNumber: freezed == cityNumber ? _self.cityNumber : cityNumber // ignore: cast_nullable_to_non_nullable +as int?,cityName: freezed == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable +as String?,provinceNumber: freezed == provinceNumber ? _self.provinceNumber : provinceNumber // ignore: cast_nullable_to_non_nullable +as int?,provinceName: freezed == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + +} + + /// @nodoc mixin _$StewardModel { - int? get id; StewardUserModel? get user; AddressModel? get address; dynamic get guildAreaActivity; dynamic get guildTypeActivity; List? get killHouse; List? get stewardKillHouse; List? get stewards; GetPosStatusModel? get getPosStatus; String? get key; String? get createDate; String? get modifyDate; bool? get trash; bool? get active; int? get cityNumber; String? get cityName; String? get guildsId; String? get licenseNumber; String? get guildsName; String? get phone; String? get typeActivity; String? get areaActivity; int? get provinceNumber; String? get provinceName; bool? get steward; bool? get hasPos; int? get allocationLimit; bool? get limitationAllocation; String? get provinceAcceptState; bool? get stewardActive; bool? get stewardLimitationAllocation; bool? get license; int? get wallet; List? get cars; List? get userLevel; + int? get id; StewardUserModel? get user; AddressModel? get address; GetPosStatusModel? get getPosStatus; String? get key; String? get createDate; String? get modifyDate; bool? get trash; bool? get active; int? get cityNumber; String? get cityName; String? get guildsId; String? get licenseNumber; String? get guildsName; String? get phone; String? get typeActivity; String? get areaActivity; int? get provinceNumber; String? get provinceName; bool? get steward; bool? get hasPos; int? get allocationLimit; bool? get limitationAllocation; String? get provinceAcceptState; bool? get stewardActive; bool? get stewardLimitationAllocation; bool? get license; int? get wallet; /// Create a copy of StewardModel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -794,16 +2029,16 @@ $StewardModelCopyWith get copyWith => _$StewardModelCopyWithImpl Object.hashAll([runtimeType,id,user,address,const DeepCollectionEquality().hash(guildAreaActivity),const DeepCollectionEquality().hash(guildTypeActivity),const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(stewardKillHouse),const DeepCollectionEquality().hash(stewards),getPosStatus,key,createDate,modifyDate,trash,active,cityNumber,cityName,guildsId,licenseNumber,guildsName,phone,typeActivity,areaActivity,provinceNumber,provinceName,steward,hasPos,allocationLimit,limitationAllocation,provinceAcceptState,stewardActive,stewardLimitationAllocation,license,wallet,const DeepCollectionEquality().hash(cars),const DeepCollectionEquality().hash(userLevel)]); +int get hashCode => Object.hashAll([runtimeType,id,user,address,getPosStatus,key,createDate,modifyDate,trash,active,cityNumber,cityName,guildsId,licenseNumber,guildsName,phone,typeActivity,areaActivity,provinceNumber,provinceName,steward,hasPos,allocationLimit,limitationAllocation,provinceAcceptState,stewardActive,stewardLimitationAllocation,license,wallet]); @override String toString() { - return 'StewardModel(id: $id, user: $user, address: $address, guildAreaActivity: $guildAreaActivity, guildTypeActivity: $guildTypeActivity, killHouse: $killHouse, stewardKillHouse: $stewardKillHouse, stewards: $stewards, getPosStatus: $getPosStatus, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, active: $active, cityNumber: $cityNumber, cityName: $cityName, guildsId: $guildsId, licenseNumber: $licenseNumber, guildsName: $guildsName, phone: $phone, typeActivity: $typeActivity, areaActivity: $areaActivity, provinceNumber: $provinceNumber, provinceName: $provinceName, steward: $steward, hasPos: $hasPos, allocationLimit: $allocationLimit, limitationAllocation: $limitationAllocation, provinceAcceptState: $provinceAcceptState, stewardActive: $stewardActive, stewardLimitationAllocation: $stewardLimitationAllocation, license: $license, wallet: $wallet, cars: $cars, userLevel: $userLevel)'; + return 'StewardModel(id: $id, user: $user, address: $address, getPosStatus: $getPosStatus, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, active: $active, cityNumber: $cityNumber, cityName: $cityName, guildsId: $guildsId, licenseNumber: $licenseNumber, guildsName: $guildsName, phone: $phone, typeActivity: $typeActivity, areaActivity: $areaActivity, provinceNumber: $provinceNumber, provinceName: $provinceName, steward: $steward, hasPos: $hasPos, allocationLimit: $allocationLimit, limitationAllocation: $limitationAllocation, provinceAcceptState: $provinceAcceptState, stewardActive: $stewardActive, stewardLimitationAllocation: $stewardLimitationAllocation, license: $license, wallet: $wallet)'; } @@ -814,7 +2049,7 @@ abstract mixin class $StewardModelCopyWith<$Res> { factory $StewardModelCopyWith(StewardModel value, $Res Function(StewardModel) _then) = _$StewardModelCopyWithImpl; @useResult $Res call({ - int? id, StewardUserModel? user, AddressModel? address, dynamic guildAreaActivity, dynamic guildTypeActivity, List? killHouse, List? stewardKillHouse, List? stewards, GetPosStatusModel? getPosStatus, String? key, String? createDate, String? modifyDate, bool? trash, bool? active, int? cityNumber, String? cityName, String? guildsId, String? licenseNumber, String? guildsName, String? phone, String? typeActivity, String? areaActivity, int? provinceNumber, String? provinceName, bool? steward, bool? hasPos, int? allocationLimit, bool? limitationAllocation, String? provinceAcceptState, bool? stewardActive, bool? stewardLimitationAllocation, bool? license, int? wallet, List? cars, List? userLevel + int? id, StewardUserModel? user, AddressModel? address, GetPosStatusModel? getPosStatus, String? key, String? createDate, String? modifyDate, bool? trash, bool? active, int? cityNumber, String? cityName, String? guildsId, String? licenseNumber, String? guildsName, String? phone, String? typeActivity, String? areaActivity, int? provinceNumber, String? provinceName, bool? steward, bool? hasPos, int? allocationLimit, bool? limitationAllocation, String? provinceAcceptState, bool? stewardActive, bool? stewardLimitationAllocation, bool? license, int? wallet }); @@ -831,17 +2066,12 @@ class _$StewardModelCopyWithImpl<$Res> /// Create a copy of StewardModel /// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? user = freezed,Object? address = freezed,Object? guildAreaActivity = freezed,Object? guildTypeActivity = freezed,Object? killHouse = freezed,Object? stewardKillHouse = freezed,Object? stewards = freezed,Object? getPosStatus = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? active = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? guildsId = freezed,Object? licenseNumber = freezed,Object? guildsName = freezed,Object? phone = freezed,Object? typeActivity = freezed,Object? areaActivity = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,Object? steward = freezed,Object? hasPos = freezed,Object? allocationLimit = freezed,Object? limitationAllocation = freezed,Object? provinceAcceptState = freezed,Object? stewardActive = freezed,Object? stewardLimitationAllocation = freezed,Object? license = freezed,Object? wallet = freezed,Object? cars = freezed,Object? userLevel = freezed,}) { +@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? user = freezed,Object? address = freezed,Object? getPosStatus = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? active = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? guildsId = freezed,Object? licenseNumber = freezed,Object? guildsName = freezed,Object? phone = freezed,Object? typeActivity = freezed,Object? areaActivity = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,Object? steward = freezed,Object? hasPos = freezed,Object? allocationLimit = freezed,Object? limitationAllocation = freezed,Object? provinceAcceptState = freezed,Object? stewardActive = freezed,Object? stewardLimitationAllocation = freezed,Object? license = freezed,Object? wallet = freezed,}) { return _then(_self.copyWith( id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as int?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable as StewardUserModel?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable -as AddressModel?,guildAreaActivity: freezed == guildAreaActivity ? _self.guildAreaActivity : guildAreaActivity // ignore: cast_nullable_to_non_nullable -as dynamic,guildTypeActivity: freezed == guildTypeActivity ? _self.guildTypeActivity : guildTypeActivity // ignore: cast_nullable_to_non_nullable -as dynamic,killHouse: freezed == killHouse ? _self.killHouse : killHouse // ignore: cast_nullable_to_non_nullable -as List?,stewardKillHouse: freezed == stewardKillHouse ? _self.stewardKillHouse : stewardKillHouse // ignore: cast_nullable_to_non_nullable -as List?,stewards: freezed == stewards ? _self.stewards : stewards // ignore: cast_nullable_to_non_nullable -as List?,getPosStatus: freezed == getPosStatus ? _self.getPosStatus : getPosStatus // ignore: cast_nullable_to_non_nullable +as AddressModel?,getPosStatus: freezed == getPosStatus ? _self.getPosStatus : getPosStatus // ignore: cast_nullable_to_non_nullable as GetPosStatusModel?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable as String?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable as String?,modifyDate: freezed == modifyDate ? _self.modifyDate : modifyDate // ignore: cast_nullable_to_non_nullable @@ -866,9 +2096,7 @@ as String?,stewardActive: freezed == stewardActive ? _self.stewardActive : stewa as bool?,stewardLimitationAllocation: freezed == stewardLimitationAllocation ? _self.stewardLimitationAllocation : stewardLimitationAllocation // ignore: cast_nullable_to_non_nullable as bool?,license: freezed == license ? _self.license : license // ignore: cast_nullable_to_non_nullable as bool?,wallet: freezed == wallet ? _self.wallet : wallet // ignore: cast_nullable_to_non_nullable -as int?,cars: freezed == cars ? _self.cars : cars // ignore: cast_nullable_to_non_nullable -as List?,userLevel: freezed == userLevel ? _self.userLevel : userLevel // ignore: cast_nullable_to_non_nullable -as List?, +as int?, )); } /// Create a copy of StewardModel @@ -989,10 +2217,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( int? id, StewardUserModel? user, AddressModel? address, dynamic guildAreaActivity, dynamic guildTypeActivity, List? killHouse, List? stewardKillHouse, List? stewards, GetPosStatusModel? getPosStatus, String? key, String? createDate, String? modifyDate, bool? trash, bool? active, int? cityNumber, String? cityName, String? guildsId, String? licenseNumber, String? guildsName, String? phone, String? typeActivity, String? areaActivity, int? provinceNumber, String? provinceName, bool? steward, bool? hasPos, int? allocationLimit, bool? limitationAllocation, String? provinceAcceptState, bool? stewardActive, bool? stewardLimitationAllocation, bool? license, int? wallet, List? cars, List? userLevel)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( int? id, StewardUserModel? user, AddressModel? address, GetPosStatusModel? getPosStatus, String? key, String? createDate, String? modifyDate, bool? trash, bool? active, int? cityNumber, String? cityName, String? guildsId, String? licenseNumber, String? guildsName, String? phone, String? typeActivity, String? areaActivity, int? provinceNumber, String? provinceName, bool? steward, bool? hasPos, int? allocationLimit, bool? limitationAllocation, String? provinceAcceptState, bool? stewardActive, bool? stewardLimitationAllocation, bool? license, int? wallet)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _StewardModel() when $default != null: -return $default(_that.id,_that.user,_that.address,_that.guildAreaActivity,_that.guildTypeActivity,_that.killHouse,_that.stewardKillHouse,_that.stewards,_that.getPosStatus,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.active,_that.cityNumber,_that.cityName,_that.guildsId,_that.licenseNumber,_that.guildsName,_that.phone,_that.typeActivity,_that.areaActivity,_that.provinceNumber,_that.provinceName,_that.steward,_that.hasPos,_that.allocationLimit,_that.limitationAllocation,_that.provinceAcceptState,_that.stewardActive,_that.stewardLimitationAllocation,_that.license,_that.wallet,_that.cars,_that.userLevel);case _: +return $default(_that.id,_that.user,_that.address,_that.getPosStatus,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.active,_that.cityNumber,_that.cityName,_that.guildsId,_that.licenseNumber,_that.guildsName,_that.phone,_that.typeActivity,_that.areaActivity,_that.provinceNumber,_that.provinceName,_that.steward,_that.hasPos,_that.allocationLimit,_that.limitationAllocation,_that.provinceAcceptState,_that.stewardActive,_that.stewardLimitationAllocation,_that.license,_that.wallet);case _: return orElse(); } @@ -1010,10 +2238,10 @@ return $default(_that.id,_that.user,_that.address,_that.guildAreaActivity,_that. /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( int? id, StewardUserModel? user, AddressModel? address, dynamic guildAreaActivity, dynamic guildTypeActivity, List? killHouse, List? stewardKillHouse, List? stewards, GetPosStatusModel? getPosStatus, String? key, String? createDate, String? modifyDate, bool? trash, bool? active, int? cityNumber, String? cityName, String? guildsId, String? licenseNumber, String? guildsName, String? phone, String? typeActivity, String? areaActivity, int? provinceNumber, String? provinceName, bool? steward, bool? hasPos, int? allocationLimit, bool? limitationAllocation, String? provinceAcceptState, bool? stewardActive, bool? stewardLimitationAllocation, bool? license, int? wallet, List? cars, List? userLevel) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( int? id, StewardUserModel? user, AddressModel? address, GetPosStatusModel? getPosStatus, String? key, String? createDate, String? modifyDate, bool? trash, bool? active, int? cityNumber, String? cityName, String? guildsId, String? licenseNumber, String? guildsName, String? phone, String? typeActivity, String? areaActivity, int? provinceNumber, String? provinceName, bool? steward, bool? hasPos, int? allocationLimit, bool? limitationAllocation, String? provinceAcceptState, bool? stewardActive, bool? stewardLimitationAllocation, bool? license, int? wallet) $default,) {final _that = this; switch (_that) { case _StewardModel(): -return $default(_that.id,_that.user,_that.address,_that.guildAreaActivity,_that.guildTypeActivity,_that.killHouse,_that.stewardKillHouse,_that.stewards,_that.getPosStatus,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.active,_that.cityNumber,_that.cityName,_that.guildsId,_that.licenseNumber,_that.guildsName,_that.phone,_that.typeActivity,_that.areaActivity,_that.provinceNumber,_that.provinceName,_that.steward,_that.hasPos,_that.allocationLimit,_that.limitationAllocation,_that.provinceAcceptState,_that.stewardActive,_that.stewardLimitationAllocation,_that.license,_that.wallet,_that.cars,_that.userLevel);case _: +return $default(_that.id,_that.user,_that.address,_that.getPosStatus,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.active,_that.cityNumber,_that.cityName,_that.guildsId,_that.licenseNumber,_that.guildsName,_that.phone,_that.typeActivity,_that.areaActivity,_that.provinceNumber,_that.provinceName,_that.steward,_that.hasPos,_that.allocationLimit,_that.limitationAllocation,_that.provinceAcceptState,_that.stewardActive,_that.stewardLimitationAllocation,_that.license,_that.wallet);case _: throw StateError('Unexpected subclass'); } @@ -1030,10 +2258,10 @@ return $default(_that.id,_that.user,_that.address,_that.guildAreaActivity,_that. /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( int? id, StewardUserModel? user, AddressModel? address, dynamic guildAreaActivity, dynamic guildTypeActivity, List? killHouse, List? stewardKillHouse, List? stewards, GetPosStatusModel? getPosStatus, String? key, String? createDate, String? modifyDate, bool? trash, bool? active, int? cityNumber, String? cityName, String? guildsId, String? licenseNumber, String? guildsName, String? phone, String? typeActivity, String? areaActivity, int? provinceNumber, String? provinceName, bool? steward, bool? hasPos, int? allocationLimit, bool? limitationAllocation, String? provinceAcceptState, bool? stewardActive, bool? stewardLimitationAllocation, bool? license, int? wallet, List? cars, List? userLevel)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int? id, StewardUserModel? user, AddressModel? address, GetPosStatusModel? getPosStatus, String? key, String? createDate, String? modifyDate, bool? trash, bool? active, int? cityNumber, String? cityName, String? guildsId, String? licenseNumber, String? guildsName, String? phone, String? typeActivity, String? areaActivity, int? provinceNumber, String? provinceName, bool? steward, bool? hasPos, int? allocationLimit, bool? limitationAllocation, String? provinceAcceptState, bool? stewardActive, bool? stewardLimitationAllocation, bool? license, int? wallet)? $default,) {final _that = this; switch (_that) { case _StewardModel() when $default != null: -return $default(_that.id,_that.user,_that.address,_that.guildAreaActivity,_that.guildTypeActivity,_that.killHouse,_that.stewardKillHouse,_that.stewards,_that.getPosStatus,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.active,_that.cityNumber,_that.cityName,_that.guildsId,_that.licenseNumber,_that.guildsName,_that.phone,_that.typeActivity,_that.areaActivity,_that.provinceNumber,_that.provinceName,_that.steward,_that.hasPos,_that.allocationLimit,_that.limitationAllocation,_that.provinceAcceptState,_that.stewardActive,_that.stewardLimitationAllocation,_that.license,_that.wallet,_that.cars,_that.userLevel);case _: +return $default(_that.id,_that.user,_that.address,_that.getPosStatus,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.active,_that.cityNumber,_that.cityName,_that.guildsId,_that.licenseNumber,_that.guildsName,_that.phone,_that.typeActivity,_that.areaActivity,_that.provinceNumber,_that.provinceName,_that.steward,_that.hasPos,_that.allocationLimit,_that.limitationAllocation,_that.provinceAcceptState,_that.stewardActive,_that.stewardLimitationAllocation,_that.license,_that.wallet);case _: return null; } @@ -1045,41 +2273,12 @@ return $default(_that.id,_that.user,_that.address,_that.guildAreaActivity,_that. @JsonSerializable() class _StewardModel implements StewardModel { - _StewardModel({this.id, this.user, this.address, this.guildAreaActivity, this.guildTypeActivity, final List? killHouse, final List? stewardKillHouse, final List? stewards, this.getPosStatus, this.key, this.createDate, this.modifyDate, this.trash, this.active, this.cityNumber, this.cityName, this.guildsId, this.licenseNumber, this.guildsName, this.phone, this.typeActivity, this.areaActivity, this.provinceNumber, this.provinceName, this.steward, this.hasPos, this.allocationLimit, this.limitationAllocation, this.provinceAcceptState, this.stewardActive, this.stewardLimitationAllocation, this.license, this.wallet, final List? cars, final List? userLevel}): _killHouse = killHouse,_stewardKillHouse = stewardKillHouse,_stewards = stewards,_cars = cars,_userLevel = userLevel; + _StewardModel({this.id, this.user, this.address, this.getPosStatus, this.key, this.createDate, this.modifyDate, this.trash, this.active, this.cityNumber, this.cityName, this.guildsId, this.licenseNumber, this.guildsName, this.phone, this.typeActivity, this.areaActivity, this.provinceNumber, this.provinceName, this.steward, this.hasPos, this.allocationLimit, this.limitationAllocation, this.provinceAcceptState, this.stewardActive, this.stewardLimitationAllocation, this.license, this.wallet}); factory _StewardModel.fromJson(Map json) => _$StewardModelFromJson(json); @override final int? id; @override final StewardUserModel? user; @override final AddressModel? address; -@override final dynamic guildAreaActivity; -@override final dynamic guildTypeActivity; - final List? _killHouse; -@override List? get killHouse { - final value = _killHouse; - if (value == null) return null; - if (_killHouse is EqualUnmodifiableListView) return _killHouse; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); -} - - final List? _stewardKillHouse; -@override List? get stewardKillHouse { - final value = _stewardKillHouse; - if (value == null) return null; - if (_stewardKillHouse is EqualUnmodifiableListView) return _stewardKillHouse; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); -} - - final List? _stewards; -@override List? get stewards { - final value = _stewards; - if (value == null) return null; - if (_stewards is EqualUnmodifiableListView) return _stewards; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); -} - @override final GetPosStatusModel? getPosStatus; @override final String? key; @override final String? createDate; @@ -1105,24 +2304,6 @@ class _StewardModel implements StewardModel { @override final bool? stewardLimitationAllocation; @override final bool? license; @override final int? wallet; - final List? _cars; -@override List? get cars { - final value = _cars; - if (value == null) return null; - if (_cars is EqualUnmodifiableListView) return _cars; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); -} - - final List? _userLevel; -@override List? get userLevel { - final value = _userLevel; - if (value == null) return null; - if (_userLevel is EqualUnmodifiableListView) return _userLevel; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); -} - /// Create a copy of StewardModel /// with the given fields replaced by the non-null parameter values. @@ -1137,16 +2318,16 @@ Map toJson() { @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardModel&&(identical(other.id, id) || other.id == id)&&(identical(other.user, user) || other.user == user)&&(identical(other.address, address) || other.address == address)&&const DeepCollectionEquality().equals(other.guildAreaActivity, guildAreaActivity)&&const DeepCollectionEquality().equals(other.guildTypeActivity, guildTypeActivity)&&const DeepCollectionEquality().equals(other._killHouse, _killHouse)&&const DeepCollectionEquality().equals(other._stewardKillHouse, _stewardKillHouse)&&const DeepCollectionEquality().equals(other._stewards, _stewards)&&(identical(other.getPosStatus, getPosStatus) || other.getPosStatus == getPosStatus)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.active, active) || other.active == active)&&(identical(other.cityNumber, cityNumber) || other.cityNumber == cityNumber)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.guildsId, guildsId) || other.guildsId == guildsId)&&(identical(other.licenseNumber, licenseNumber) || other.licenseNumber == licenseNumber)&&(identical(other.guildsName, guildsName) || other.guildsName == guildsName)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.typeActivity, typeActivity) || other.typeActivity == typeActivity)&&(identical(other.areaActivity, areaActivity) || other.areaActivity == areaActivity)&&(identical(other.provinceNumber, provinceNumber) || other.provinceNumber == provinceNumber)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.hasPos, hasPos) || other.hasPos == hasPos)&&(identical(other.allocationLimit, allocationLimit) || other.allocationLimit == allocationLimit)&&(identical(other.limitationAllocation, limitationAllocation) || other.limitationAllocation == limitationAllocation)&&(identical(other.provinceAcceptState, provinceAcceptState) || other.provinceAcceptState == provinceAcceptState)&&(identical(other.stewardActive, stewardActive) || other.stewardActive == stewardActive)&&(identical(other.stewardLimitationAllocation, stewardLimitationAllocation) || other.stewardLimitationAllocation == stewardLimitationAllocation)&&(identical(other.license, license) || other.license == license)&&(identical(other.wallet, wallet) || other.wallet == wallet)&&const DeepCollectionEquality().equals(other._cars, _cars)&&const DeepCollectionEquality().equals(other._userLevel, _userLevel)); + return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardModel&&(identical(other.id, id) || other.id == id)&&(identical(other.user, user) || other.user == user)&&(identical(other.address, address) || other.address == address)&&(identical(other.getPosStatus, getPosStatus) || other.getPosStatus == getPosStatus)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.active, active) || other.active == active)&&(identical(other.cityNumber, cityNumber) || other.cityNumber == cityNumber)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.guildsId, guildsId) || other.guildsId == guildsId)&&(identical(other.licenseNumber, licenseNumber) || other.licenseNumber == licenseNumber)&&(identical(other.guildsName, guildsName) || other.guildsName == guildsName)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.typeActivity, typeActivity) || other.typeActivity == typeActivity)&&(identical(other.areaActivity, areaActivity) || other.areaActivity == areaActivity)&&(identical(other.provinceNumber, provinceNumber) || other.provinceNumber == provinceNumber)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.hasPos, hasPos) || other.hasPos == hasPos)&&(identical(other.allocationLimit, allocationLimit) || other.allocationLimit == allocationLimit)&&(identical(other.limitationAllocation, limitationAllocation) || other.limitationAllocation == limitationAllocation)&&(identical(other.provinceAcceptState, provinceAcceptState) || other.provinceAcceptState == provinceAcceptState)&&(identical(other.stewardActive, stewardActive) || other.stewardActive == stewardActive)&&(identical(other.stewardLimitationAllocation, stewardLimitationAllocation) || other.stewardLimitationAllocation == stewardLimitationAllocation)&&(identical(other.license, license) || other.license == license)&&(identical(other.wallet, wallet) || other.wallet == wallet)); } @JsonKey(includeFromJson: false, includeToJson: false) @override -int get hashCode => Object.hashAll([runtimeType,id,user,address,const DeepCollectionEquality().hash(guildAreaActivity),const DeepCollectionEquality().hash(guildTypeActivity),const DeepCollectionEquality().hash(_killHouse),const DeepCollectionEquality().hash(_stewardKillHouse),const DeepCollectionEquality().hash(_stewards),getPosStatus,key,createDate,modifyDate,trash,active,cityNumber,cityName,guildsId,licenseNumber,guildsName,phone,typeActivity,areaActivity,provinceNumber,provinceName,steward,hasPos,allocationLimit,limitationAllocation,provinceAcceptState,stewardActive,stewardLimitationAllocation,license,wallet,const DeepCollectionEquality().hash(_cars),const DeepCollectionEquality().hash(_userLevel)]); +int get hashCode => Object.hashAll([runtimeType,id,user,address,getPosStatus,key,createDate,modifyDate,trash,active,cityNumber,cityName,guildsId,licenseNumber,guildsName,phone,typeActivity,areaActivity,provinceNumber,provinceName,steward,hasPos,allocationLimit,limitationAllocation,provinceAcceptState,stewardActive,stewardLimitationAllocation,license,wallet]); @override String toString() { - return 'StewardModel(id: $id, user: $user, address: $address, guildAreaActivity: $guildAreaActivity, guildTypeActivity: $guildTypeActivity, killHouse: $killHouse, stewardKillHouse: $stewardKillHouse, stewards: $stewards, getPosStatus: $getPosStatus, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, active: $active, cityNumber: $cityNumber, cityName: $cityName, guildsId: $guildsId, licenseNumber: $licenseNumber, guildsName: $guildsName, phone: $phone, typeActivity: $typeActivity, areaActivity: $areaActivity, provinceNumber: $provinceNumber, provinceName: $provinceName, steward: $steward, hasPos: $hasPos, allocationLimit: $allocationLimit, limitationAllocation: $limitationAllocation, provinceAcceptState: $provinceAcceptState, stewardActive: $stewardActive, stewardLimitationAllocation: $stewardLimitationAllocation, license: $license, wallet: $wallet, cars: $cars, userLevel: $userLevel)'; + return 'StewardModel(id: $id, user: $user, address: $address, getPosStatus: $getPosStatus, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, active: $active, cityNumber: $cityNumber, cityName: $cityName, guildsId: $guildsId, licenseNumber: $licenseNumber, guildsName: $guildsName, phone: $phone, typeActivity: $typeActivity, areaActivity: $areaActivity, provinceNumber: $provinceNumber, provinceName: $provinceName, steward: $steward, hasPos: $hasPos, allocationLimit: $allocationLimit, limitationAllocation: $limitationAllocation, provinceAcceptState: $provinceAcceptState, stewardActive: $stewardActive, stewardLimitationAllocation: $stewardLimitationAllocation, license: $license, wallet: $wallet)'; } @@ -1157,7 +2338,7 @@ abstract mixin class _$StewardModelCopyWith<$Res> implements $StewardModelCopyWi factory _$StewardModelCopyWith(_StewardModel value, $Res Function(_StewardModel) _then) = __$StewardModelCopyWithImpl; @override @useResult $Res call({ - int? id, StewardUserModel? user, AddressModel? address, dynamic guildAreaActivity, dynamic guildTypeActivity, List? killHouse, List? stewardKillHouse, List? stewards, GetPosStatusModel? getPosStatus, String? key, String? createDate, String? modifyDate, bool? trash, bool? active, int? cityNumber, String? cityName, String? guildsId, String? licenseNumber, String? guildsName, String? phone, String? typeActivity, String? areaActivity, int? provinceNumber, String? provinceName, bool? steward, bool? hasPos, int? allocationLimit, bool? limitationAllocation, String? provinceAcceptState, bool? stewardActive, bool? stewardLimitationAllocation, bool? license, int? wallet, List? cars, List? userLevel + int? id, StewardUserModel? user, AddressModel? address, GetPosStatusModel? getPosStatus, String? key, String? createDate, String? modifyDate, bool? trash, bool? active, int? cityNumber, String? cityName, String? guildsId, String? licenseNumber, String? guildsName, String? phone, String? typeActivity, String? areaActivity, int? provinceNumber, String? provinceName, bool? steward, bool? hasPos, int? allocationLimit, bool? limitationAllocation, String? provinceAcceptState, bool? stewardActive, bool? stewardLimitationAllocation, bool? license, int? wallet }); @@ -1174,17 +2355,12 @@ class __$StewardModelCopyWithImpl<$Res> /// Create a copy of StewardModel /// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? user = freezed,Object? address = freezed,Object? guildAreaActivity = freezed,Object? guildTypeActivity = freezed,Object? killHouse = freezed,Object? stewardKillHouse = freezed,Object? stewards = freezed,Object? getPosStatus = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? active = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? guildsId = freezed,Object? licenseNumber = freezed,Object? guildsName = freezed,Object? phone = freezed,Object? typeActivity = freezed,Object? areaActivity = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,Object? steward = freezed,Object? hasPos = freezed,Object? allocationLimit = freezed,Object? limitationAllocation = freezed,Object? provinceAcceptState = freezed,Object? stewardActive = freezed,Object? stewardLimitationAllocation = freezed,Object? license = freezed,Object? wallet = freezed,Object? cars = freezed,Object? userLevel = freezed,}) { +@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? user = freezed,Object? address = freezed,Object? getPosStatus = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? active = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? guildsId = freezed,Object? licenseNumber = freezed,Object? guildsName = freezed,Object? phone = freezed,Object? typeActivity = freezed,Object? areaActivity = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,Object? steward = freezed,Object? hasPos = freezed,Object? allocationLimit = freezed,Object? limitationAllocation = freezed,Object? provinceAcceptState = freezed,Object? stewardActive = freezed,Object? stewardLimitationAllocation = freezed,Object? license = freezed,Object? wallet = freezed,}) { return _then(_StewardModel( id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as int?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable as StewardUserModel?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable -as AddressModel?,guildAreaActivity: freezed == guildAreaActivity ? _self.guildAreaActivity : guildAreaActivity // ignore: cast_nullable_to_non_nullable -as dynamic,guildTypeActivity: freezed == guildTypeActivity ? _self.guildTypeActivity : guildTypeActivity // ignore: cast_nullable_to_non_nullable -as dynamic,killHouse: freezed == killHouse ? _self._killHouse : killHouse // ignore: cast_nullable_to_non_nullable -as List?,stewardKillHouse: freezed == stewardKillHouse ? _self._stewardKillHouse : stewardKillHouse // ignore: cast_nullable_to_non_nullable -as List?,stewards: freezed == stewards ? _self._stewards : stewards // ignore: cast_nullable_to_non_nullable -as List?,getPosStatus: freezed == getPosStatus ? _self.getPosStatus : getPosStatus // ignore: cast_nullable_to_non_nullable +as AddressModel?,getPosStatus: freezed == getPosStatus ? _self.getPosStatus : getPosStatus // ignore: cast_nullable_to_non_nullable as GetPosStatusModel?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable as String?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable as String?,modifyDate: freezed == modifyDate ? _self.modifyDate : modifyDate // ignore: cast_nullable_to_non_nullable @@ -1209,9 +2385,7 @@ as String?,stewardActive: freezed == stewardActive ? _self.stewardActive : stewa as bool?,stewardLimitationAllocation: freezed == stewardLimitationAllocation ? _self.stewardLimitationAllocation : stewardLimitationAllocation // ignore: cast_nullable_to_non_nullable as bool?,license: freezed == license ? _self.license : license // ignore: cast_nullable_to_non_nullable as bool?,wallet: freezed == wallet ? _self.wallet : wallet // ignore: cast_nullable_to_non_nullable -as int?,cars: freezed == cars ? _self._cars : cars // ignore: cast_nullable_to_non_nullable -as List?,userLevel: freezed == userLevel ? _self._userLevel : userLevel // ignore: cast_nullable_to_non_nullable -as List?, +as int?, )); } diff --git a/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.g.dart b/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.g.dart index a8dc384..7934cc8 100644 --- a/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.g.dart +++ b/packages/chicken/lib/data/models/response/waiting_arrival/waiting_arrival.g.dart @@ -13,7 +13,9 @@ _WaitingArrivalModel _$WaitingArrivalModelFromJson( product: json['product'] == null ? null : ProductModel.fromJson(json['product'] as Map), - killHouse: json['kill_house'], + killHouse: json['kill_house'] == null + ? null + : KillHouseModel.fromJson(json['kill_house'] as Map), toKillHouse: json['to_kill_house'], steward: json['steward'] == null ? null @@ -67,12 +69,9 @@ _WaitingArrivalModel _$WaitingArrivalModelFromJson( temporaryTrash: json['temporary_trash'] as bool?, temporaryDeleted: json['temporary_deleted'] as bool?, overhead: json['overhead'] as bool?, - createdBy: json['created_by'], - modifiedBy: json['modified_by'], - wareHouse: json['ware_house'], - stewardWareHouse: json['steward_ware_house'], - car: json['car'], - dispenser: json['dispenser'], + warehouse: json['warehouse'] as bool?, + stewardWarehouse: json['steward_warehouse'] as bool?, + quota: json['quota'] as String?, ); Map _$WaitingArrivalModelToJson( @@ -128,12 +127,9 @@ Map _$WaitingArrivalModelToJson( 'temporary_trash': instance.temporaryTrash, 'temporary_deleted': instance.temporaryDeleted, 'overhead': instance.overhead, - 'created_by': instance.createdBy, - 'modified_by': instance.modifiedBy, - 'ware_house': instance.wareHouse, - 'steward_ware_house': instance.stewardWareHouse, - 'car': instance.car, - 'dispenser': instance.dispenser, + 'warehouse': instance.warehouse, + 'steward_warehouse': instance.stewardWarehouse, + 'quota': instance.quota, }; _ProductModel _$ProductModelFromJson(Map json) => @@ -148,6 +144,118 @@ Map _$ProductModelToJson(_ProductModel instance) => 'weight_average': instance.weightAverage, }; +_KillHouseModel _$KillHouseModelFromJson(Map json) => + _KillHouseModel( + key: json['key'] as String?, + name: json['name'] as String?, + killer: json['killer'] as bool?, + killHouseOperator: json['kill_house_operator'] == null + ? null + : KillHouseOperatorModel.fromJson( + json['kill_house_operator'] as Map, + ), + ); + +Map _$KillHouseModelToJson(_KillHouseModel instance) => + { + 'key': instance.key, + 'name': instance.name, + 'killer': instance.killer, + 'kill_house_operator': instance.killHouseOperator, + }; + +_KillHouseOperatorModel _$KillHouseOperatorModelFromJson( + Map json, +) => _KillHouseOperatorModel( + user: json['user'] == null + ? null + : KillHouseUserModel.fromJson(json['user'] as Map), +); + +Map _$KillHouseOperatorModelToJson( + _KillHouseOperatorModel instance, +) => {'user': instance.user}; + +_KillHouseUserModel _$KillHouseUserModelFromJson(Map json) => + _KillHouseUserModel( + fullname: json['fullname'] as String?, + firstName: json['first_name'] as String?, + lastName: json['last_name'] as String?, + baseOrder: (json['base_order'] as num?)?.toInt(), + mobile: json['mobile'] as String?, + nationalId: json['national_id'] as String?, + nationalCode: json['national_code'] as String?, + key: json['key'] as String?, + city: json['city'] == null + ? null + : CityDetailModel.fromJson(json['city'] as Map), + unitName: json['unit_name'] as String?, + unitNationalId: json['unit_national_id'] as String?, + unitRegistrationNumber: json['unit_registration_number'] as String?, + unitEconomicalNumber: json['unit_economical_number'] as String?, + unitProvince: json['unit_province'] as String?, + unitCity: json['unit_city'] as String?, + unitPostalCode: json['unit_postal_code'] as String?, + unitAddress: json['unit_address'] as String?, + ); + +Map _$KillHouseUserModelToJson(_KillHouseUserModel instance) => + { + 'fullname': instance.fullname, + 'first_name': instance.firstName, + 'last_name': instance.lastName, + 'base_order': instance.baseOrder, + 'mobile': instance.mobile, + 'national_id': instance.nationalId, + 'national_code': instance.nationalCode, + 'key': instance.key, + 'city': instance.city, + 'unit_name': instance.unitName, + 'unit_national_id': instance.unitNationalId, + 'unit_registration_number': instance.unitRegistrationNumber, + 'unit_economical_number': instance.unitEconomicalNumber, + 'unit_province': instance.unitProvince, + 'unit_city': instance.unitCity, + 'unit_postal_code': instance.unitPostalCode, + 'unit_address': instance.unitAddress, + }; + +_CityDetailModel _$CityDetailModelFromJson(Map json) => + _CityDetailModel( + id: (json['id'] 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?, + provinceIdForeignKey: (json['province_id_foreign_key'] as num?)?.toInt(), + cityIdKey: (json['city_id_key'] as num?)?.toInt(), + name: json['name'] as String?, + productPrice: (json['product_price'] as num?)?.toDouble(), + provinceCenter: json['province_center'] as bool?, + cityNumber: (json['city_number'] as num?)?.toInt(), + cityName: json['city_name'] as String?, + provinceNumber: (json['province_number'] as num?)?.toInt(), + provinceName: json['province_name'] as String?, + ); + +Map _$CityDetailModelToJson(_CityDetailModel instance) => + { + 'id': instance.id, + 'key': instance.key, + 'create_date': instance.createDate, + 'modify_date': instance.modifyDate, + 'trash': instance.trash, + 'province_id_foreign_key': instance.provinceIdForeignKey, + 'city_id_key': instance.cityIdKey, + 'name': instance.name, + 'product_price': instance.productPrice, + 'province_center': instance.provinceCenter, + 'city_number': instance.cityNumber, + 'city_name': instance.cityName, + 'province_number': instance.provinceNumber, + 'province_name': instance.provinceName, + }; + _StewardModel _$StewardModelFromJson(Map json) => _StewardModel( id: (json['id'] as num?)?.toInt(), @@ -157,11 +265,6 @@ _StewardModel _$StewardModelFromJson(Map json) => address: json['address'] == null ? null : AddressModel.fromJson(json['address'] as Map), - guildAreaActivity: json['guild_area_activity'], - guildTypeActivity: json['guild_type_activity'], - killHouse: json['kill_house'] as List?, - stewardKillHouse: json['steward_kill_house'] as List?, - stewards: json['stewards'] as List?, getPosStatus: json['get_pos_status'] == null ? null : GetPosStatusModel.fromJson( @@ -192,8 +295,6 @@ _StewardModel _$StewardModelFromJson(Map json) => json['steward_limitation_allocation'] as bool?, license: json['license'] as bool?, wallet: (json['wallet'] as num?)?.toInt(), - cars: json['cars'] as List?, - userLevel: json['user_level'] as List?, ); Map _$StewardModelToJson(_StewardModel instance) => @@ -201,11 +302,6 @@ Map _$StewardModelToJson(_StewardModel instance) => 'id': instance.id, 'user': instance.user, 'address': instance.address, - 'guild_area_activity': instance.guildAreaActivity, - 'guild_type_activity': instance.guildTypeActivity, - 'kill_house': instance.killHouse, - 'steward_kill_house': instance.stewardKillHouse, - 'stewards': instance.stewards, 'get_pos_status': instance.getPosStatus, 'key': instance.key, 'create_date': instance.createDate, @@ -231,8 +327,6 @@ Map _$StewardModelToJson(_StewardModel instance) => 'steward_limitation_allocation': instance.stewardLimitationAllocation, 'license': instance.license, 'wallet': instance.wallet, - 'cars': instance.cars, - 'user_level': instance.userLevel, }; _StewardUserModel _$StewardUserModelFromJson(Map json) => diff --git a/packages/chicken/lib/data/repositories/chicken/chicken_repository.dart b/packages/chicken/lib/data/repositories/chicken/chicken_repository.dart index eb2d935..b2059c5 100644 --- a/packages/chicken/lib/data/repositories/chicken/chicken_repository.dart +++ b/packages/chicken/lib/data/repositories/chicken/chicken_repository.dart @@ -109,9 +109,9 @@ abstract class ChickenRepository { required CreateStewardFreeBar body, }); - Future deleteStewardPurchasesOutSideOfTheProvince({ + Future editStewardPurchasesOutSideOfTheProvince({ required String token, - required String stewardFreeBarKey, + Map? queryParameters, }); Future?> getOutProvinceCarcassesBuyer({ diff --git a/packages/chicken/lib/data/repositories/chicken/chicken_repository_imp.dart b/packages/chicken/lib/data/repositories/chicken/chicken_repository_imp.dart index 03ee4ff..089b62d 100644 --- a/packages/chicken/lib/data/repositories/chicken/chicken_repository_imp.dart +++ b/packages/chicken/lib/data/repositories/chicken/chicken_repository_imp.dart @@ -223,13 +223,13 @@ class ChickenRepositoryImp implements ChickenRepository { } @override - Future deleteStewardPurchasesOutSideOfTheProvince({ + Future editStewardPurchasesOutSideOfTheProvince({ required String token, - required String stewardFreeBarKey, + Map? queryParameters, }) async { - await remote.deleteStewardPurchasesOutSideOfTheProvince( + await remote.editStewardPurchasesOutSideOfTheProvince( token: token, - stewardFreeBarKey: stewardFreeBarKey, + queryParameters: queryParameters ); } diff --git a/packages/chicken/lib/presentation/pages/steward/buy_in_province_all/logic.dart b/packages/chicken/lib/presentation/pages/steward/buy_in_province_all/logic.dart index 251bec8..64a0ee7 100644 --- a/packages/chicken/lib/presentation/pages/steward/buy_in_province_all/logic.dart +++ b/packages/chicken/lib/presentation/pages/steward/buy_in_province_all/logic.dart @@ -1,10 +1,11 @@ +import 'package:flutter/material.dart'; import 'package:rasadyar_chicken/data/models/request/steward_allocation/steward_allocation_request.dart'; import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'; import 'package:rasadyar_chicken/presentation/pages/steward/root/logic.dart'; import 'package:rasadyar_core/core.dart'; class BuyInProvinceAllLogic extends GetxController { - RxList isExpandedList = [].obs; + RxInt isExpandedListIndex = (-1).obs; Rx fromDateFilter = Jalali.now().obs; Rx toDateFilter = Jalali.now().obs; RxnString searchedValue = RxnString(); @@ -17,6 +18,13 @@ class BuyInProvinceAllLogic extends GetxController { Rx>> allProduct = Resource>.loading().obs; + TextEditingController weightController = TextEditingController(); + TextEditingController countController = TextEditingController(); + TextEditingController lossController = TextEditingController(); + TextEditingController approvedWithOtpController = TextEditingController(); + + RxBool approvedWithOtpCode = false.obs; + @override void onInit() { super.onInit(); @@ -87,22 +95,23 @@ class BuyInProvinceAllLogic extends GetxController { state: 'accepted', receiverRealNumberOfCarcasses: model.realNumberOfCarcasses ?? 0, receiverRealWeightOfCarcasses: model.realWeightOfCarcasses?.toInt() ?? 0, - registrationCode: model.registrationCode ?? 0, + registrationCode: model.registrationCode, weightLossOfCarcasses: model.weightLossOfCarcasses?.toInt() ?? 0, ).toJson(); request.removeWhere((key, value) => value == null); safeCall( + showError: true, call: () async => await rootLogic.chickenRepository.setSateForArrivals( token: rootLogic.tokenService.accessToken.value!, request: request, ), - onError: (error, stackTrace) { - eLog(error); - }, onSuccess: (result) { getAllArrivals(); - rootLogic.getInventory(); + rootLogic.onRefresh(); + clearApprovedController(); + toggleExpansion(); + Get.back(); }, ); } @@ -125,7 +134,7 @@ class BuyInProvinceAllLogic extends GetxController { }, onSuccess: (result) { getAllArrivals(); - rootLogic.getInventory(); + rootLogic.onRefresh(); }, ); } @@ -142,4 +151,20 @@ class BuyInProvinceAllLogic extends GetxController { return Assets.vec.timerSvg.path; } } + + void clearApprovedController() { + weightController.clear(); + countController.clear(); + lossController.clear(); + approvedWithOtpController.clear(); + approvedWithOtpCode.value = false; + } + + void toggleExpansion({int? index}) { + if (isExpandedListIndex.value == index || index == null) { + isExpandedListIndex.value = -1; + } else { + isExpandedListIndex.value = index; + } + } } diff --git a/packages/chicken/lib/presentation/pages/steward/buy_in_province_all/view.dart b/packages/chicken/lib/presentation/pages/steward/buy_in_province_all/view.dart index b615289..6c9d3c8 100644 --- a/packages/chicken/lib/presentation/pages/steward/buy_in_province_all/view.dart +++ b/packages/chicken/lib/presentation/pages/steward/buy_in_province_all/view.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'; import 'package:rasadyar_chicken/presentation/utils/string_utils.dart'; -import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart' hide ListItem2; - import 'package:rasadyar_core/core.dart'; import 'logic.dart'; @@ -24,20 +23,19 @@ class BuyInProvinceAllPage extends GetView { var item = data.value.data!.results![index]; return ObxValue((val) { return ExpandableListItem2( - selected: val.contains(index), - onTap: () => controller.isExpandedList.toggle(index), + selected: val.value == index, + onTap: () => controller.toggleExpansion(index: index), index: index, child: itemListWidget(item), secondChild: itemListExpandedWidget(item), labelColor: getLabelColor(item.receiverState), labelIcon: controller.getVecPathItem(item.receiverState), ); - }, controller.isExpandedList); + }, controller.isExpandedListIndex); }, itemCount: data.value.data?.results?.length ?? 0, separatorBuilder: (context, index) => SizedBox(height: 8.h), onLoadMore: () async => controller.getAllArrivals(true), - ); }, controller.allProduct), ); @@ -138,12 +136,11 @@ class BuyInProvinceAllPage extends GetView { style: AppFonts.yekan10.copyWith(color: AppColor.darkGreyDark), ), SizedBox(width: 7), - SvgGenImage.vec( - controller.getVecPathItem(item.receiverState), - ).svg(width: 16.w, height: 16.h, - colorFilter: ColorFilter.mode(AppColor.darkGreyDark, BlendMode.srcIn) + SvgGenImage.vec(controller.getVecPathItem(item.receiverState)).svg( + width: 16.w, + height: 16.h, + colorFilter: ColorFilter.mode(AppColor.darkGreyDark, BlendMode.srcIn), ), - ], ), Container( @@ -187,19 +184,13 @@ class BuyInProvinceAllPage extends GetView { ), ), - buildRow( - title: 'مشخصات فروشنده', - value: item.steward?.user?.fullname ?? 'N/A', - ), + buildRow(title: 'مشخصات فروشنده', value: item.steward?.user?.fullname ?? 'N/A'), buildRow( title: 'تلفن فروشنده', value: item.steward?.user?.mobile ?? 'N/A', valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), ), - buildRow( - title: 'نوع تخصیص', - value: item.allocationType?.faAllocationType ?? 'N/A', - ), + buildRow(title: 'نوع تخصیص', value: item.allocationType?.faAllocationType ?? 'N/A'), buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'), buildRow( title: 'وزن خریداری شده', @@ -219,9 +210,12 @@ class BuyInProvinceAllPage extends GetView { height: 40.h, isLoading: data[item.key!] ?? false, onPressed: () async { - data[item.key!] = !(data[item.key!] ?? false); - await controller.acceptEntries(item); - data.remove(item.key!); + Get.bottomSheet(conformationBottomSheet(item), isScrollControlled: true).then( + (value) { + Get.back(); + controller.clearApprovedController(); + }, + ); }, textStyle: AppFonts.yekan20.copyWith(color: Colors.white), backgroundColor: AppColor.greenNormal, @@ -255,7 +249,6 @@ class BuyInProvinceAllPage extends GetView { case 'pending': return AppColor.blueLight; case 'accepted': - return AppColor.greenLightHover; case 'rejected': return AppColor.redLightHover; @@ -263,4 +256,109 @@ class BuyInProvinceAllPage extends GetView { return AppColor.blueLight; } } + + Widget conformationBottomSheet(WaitingArrivalModel item) { + controller.weightController.text = item.weightOfCarcasses.separatedByComma; + return BaseBottomSheet( + height: 430.h, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + RTextField( + label: 'وزن(کیلوگرم)', + controller: controller.weightController, + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()], + ), + SizedBox(height: 16.h), + RTextField( + label: 'حجم(قطعه)', + controller: controller.countController, + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()], + ), + SizedBox(height: 16.h), + RTextField( + label: 'افت وزن(کیلوگرم)', + controller: controller.lossController, + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()], + ), + SizedBox(height: 16.h), + + Text('تایید ', style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor)), + ObxValue((data) { + return Column( + children: [ + RadioGroup( + groupValue: data.value, + onChanged: (value) { + controller.approvedWithOtpCode.value = value ?? false; + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + radioRow( + value: true, + label: ' با کد احراز', + onTap: () { + controller.approvedWithOtpCode.value = true; + }, + ), + radioRow( + value: false, + label: 'بدون کد احراز', + onTap: () { + controller.approvedWithOtpCode.value = false; + }, + ), + ], + ), + ), + Visibility( + child: RTextField( + controller: controller.approvedWithOtpController, + label: 'کد احراز', + keyboardType: TextInputType.number, + ), + visible: data.value, + ), + ], + ); + }, controller.approvedWithOtpCode), + SizedBox(height: 30.h), + ObxValue((data) { + return RElevated( + enabled: controller.approvedWithOtpCode.value + ? controller.approvedWithOtpController.text.isNotEmpty + : true, + text: 'تایید', + onPressed: () async { + await controller.acceptEntries(item); + }, + isFullWidth: true, + ); + }, controller.approvedWithOtpCode), + SizedBox(height: 20.h), + ], + ), + ); + } + + Widget radioRow({ + required bool value, + required String label, + TextStyle? textStyle, + GestureTapCallback? onTap, + }) { + return GestureDetector( + onTap: onTap, + child: Row( + children: [ + Radio(value: value), + Text(label, style: textStyle ?? AppFonts.yekan16.copyWith(color: AppColor.textColor)), + ], + ), + ); + } } diff --git a/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/logic.dart b/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/logic.dart index 282d374..1037e85 100644 --- a/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/logic.dart +++ b/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/logic.dart @@ -8,7 +8,7 @@ import 'package:rasadyar_chicken/presentation/utils/utils.dart'; import 'package:rasadyar_core/core.dart'; class BuyInProvinceWaitingLogic extends GetxController { - RxList isExpandedList = [].obs; + RxInt isExpandedListIndex = (-1).obs; Rx fromDateFilter = Jalali.now().obs; Rx toDateFilter = Jalali.now().obs; RxnString searchedValue = RxnString(); @@ -21,6 +21,13 @@ class BuyInProvinceWaitingLogic extends GetxController { Rx>> waitingProduct = Resource>.loading().obs; + TextEditingController weightController = TextEditingController(); + TextEditingController countController = TextEditingController(); + TextEditingController lossController = TextEditingController(); + TextEditingController approvedWithOtpController = TextEditingController(); + + RxBool approvedWithOtpCode = false.obs; + @override void onInit() { super.onInit(); @@ -99,12 +106,13 @@ class BuyInProvinceWaitingLogic extends GetxController { state: 'accepted', receiverRealNumberOfCarcasses: model.realNumberOfCarcasses ?? 0, receiverRealWeightOfCarcasses: model.realWeightOfCarcasses?.toInt() ?? 0, - registrationCode: model.registrationCode ?? 0, + registrationCode: model.registrationCode, weightLossOfCarcasses: model.weightLossOfCarcasses?.toInt() ?? 0, ).toJson(); request.removeWhere((key, value) => value == null); safeCall( + showError: true, call: () async => await rootLogic.chickenRepository.setSateForArrivals( token: rootLogic.tokenService.accessToken.value!, request: request, @@ -114,7 +122,10 @@ class BuyInProvinceWaitingLogic extends GetxController { }, onSuccess: (result) { getWaitingArrivals(); - // getBarGeneralInformation(); + rootLogic.onRefresh(); + clearApprovedController(); + toggleExpansion(); + Get.back(); }, ); } @@ -137,8 +148,7 @@ class BuyInProvinceWaitingLogic extends GetxController { }, onSuccess: (result) { getWaitingArrivals(); - //TODO - // getBarGeneralInformation(); + rootLogic.onRefresh(); }, ); } @@ -152,4 +162,20 @@ class BuyInProvinceWaitingLogic extends GetxController { } }); } + + void clearApprovedController() { + weightController.clear(); + countController.clear(); + lossController.clear(); + approvedWithOtpController.clear(); + approvedWithOtpCode.value = false; + } + + void toggleExpansion({int? index}) { + if (isExpandedListIndex.value == index || index == null) { + isExpandedListIndex.value = -1; + } else { + isExpandedListIndex.value = index; + } + } } diff --git a/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/view.dart b/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/view.dart index 03c6a51..7fed124 100644 --- a/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/view.dart +++ b/packages/chicken/lib/presentation/pages/steward/buy_in_province_waiting/view.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'; import 'package:rasadyar_chicken/presentation/utils/string_utils.dart'; -import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart' hide ListItem2; - import 'package:rasadyar_core/core.dart'; import 'logic.dart'; @@ -26,15 +25,15 @@ class BuyInProvinceWaitingPage extends GetView { var item = data.value.data!.results![index]; return ObxValue((val) { return ExpandableListItem2( - selected: val.contains(index), - onTap: () => controller.isExpandedList.toggle(index), + selected: controller.isExpandedListIndex.value == index, + onTap: () => controller.toggleExpansion(index: index), index: index, child: itemListWidget(item), secondChild: itemListExpandedWidget(item), labelColor: AppColor.blueLight, labelIcon: Assets.vec.timerSvg.path, ); - }, controller.isExpandedList); + }, controller.isExpandedListIndex); }, itemCount: data.value.data?.results?.length ?? 0, separatorBuilder: (context, index) => SizedBox(height: 8.h), @@ -184,25 +183,22 @@ class BuyInProvinceWaitingPage extends GetView { ), ), - buildRow( - title: 'مشخصات فروشنده', - value: item.steward?.user?.fullname ?? 'N/A', - ), + buildRow(title: 'مشخصات فروشنده', value: item.toSteward?.user?.fullname ?? 'N/A'), buildRow( title: 'تلفن فروشنده', - value: item.steward?.user?.mobile ?? 'N/A', + value: item.toSteward?.user?.mobile ?? 'N/A', valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), ), - buildRow( - title: 'نوع تخصیص', - value: item.allocationType?.faAllocationType ?? 'N/A', - ), + buildRow(title: 'نوع تخصیص', value: item.quota?.faTitle ?? 'N/A'), + buildRow(title: 'سهمیه', value: item.allocationType?.faAllocationType ?? 'N/A'), buildRow(title: 'محصول', value: item.product?.name ?? 'N/A'), buildRow( title: 'وزن خریداری شده', value: '${item.weightOfCarcasses?.separatedByCommaFa} کیلوگرم', ), + buildRow(title: 'قیمت هر کیلو', value: '${item.amount?.separatedByCommaFa} ریال'), buildRow(title: 'قیمت کل', value: '${item.totalAmount?.separatedByCommaFa} ریال'), + Row( mainAxisAlignment: MainAxisAlignment.center, spacing: 16.w, @@ -214,9 +210,7 @@ class BuyInProvinceWaitingPage extends GetView { height: 40.h, isLoading: data[item.key!] ?? false, onPressed: () async { - data[item.key!] = !(data[item.key!] ?? false); - await controller.acceptEntries(item); - data.remove(item.key!); + await Get.bottomSheet(conformationBottomSheet(item), isScrollControlled: true); }, textStyle: AppFonts.yekan20.copyWith(color: Colors.white), backgroundColor: AppColor.greenNormal, @@ -243,4 +237,109 @@ class BuyInProvinceWaitingPage extends GetView { ), ); } + + Widget conformationBottomSheet(WaitingArrivalModel item) { + controller.weightController.text = item.weightOfCarcasses.separatedByComma; + return BaseBottomSheet( + height: 430.h, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + RTextField( + label: 'وزن(کیلوگرم)', + controller: controller.weightController, + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()], + ), + SizedBox(height: 16.h), + RTextField( + label: 'حجم(قطعه)', + controller: controller.countController, + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()], + ), + SizedBox(height: 16.h), + RTextField( + label: 'افت وزن(کیلوگرم)', + controller: controller.lossController, + keyboardType: TextInputType.number, + inputFormatters: [FilteringTextInputFormatter.digitsOnly, SeparatorInputFormatter()], + ), + SizedBox(height: 16.h), + + Text('تایید ', style: AppFonts.yekan16Bold.copyWith(color: AppColor.textColor)), + ObxValue((data) { + return Column( + children: [ + RadioGroup( + groupValue: data.value, + onChanged: (value) { + controller.approvedWithOtpCode.value = value ?? false; + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + radioRow( + value: true, + label: ' با کد احراز', + onTap: () { + controller.approvedWithOtpCode.value = true; + }, + ), + radioRow( + value: false, + label: 'بدون کد احراز', + onTap: () { + controller.approvedWithOtpCode.value = false; + }, + ), + ], + ), + ), + Visibility( + child: RTextField( + controller: controller.approvedWithOtpController, + label: 'کد احراز', + keyboardType: TextInputType.number, + ), + visible: data.value, + ), + ], + ); + }, controller.approvedWithOtpCode), + SizedBox(height: 30.h), + ObxValue((data) { + return RElevated( + enabled: controller.approvedWithOtpCode.value + ? controller.approvedWithOtpController.text.isNotEmpty + : true, + text: 'تایید', + onPressed: () async { + await controller.acceptEntries(item); + }, + isFullWidth: true, + ); + }, controller.approvedWithOtpCode), + SizedBox(height: 20.h), + ], + ), + ); + } + + Widget radioRow({ + required bool value, + required String label, + TextStyle? textStyle, + GestureTapCallback? onTap, + }) { + return GestureDetector( + onTap: onTap, + child: Row( + children: [ + Radio(value: value), + Text(label, style: textStyle ?? AppFonts.yekan16.copyWith(color: AppColor.textColor)), + ], + ), + ); + } } diff --git a/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/logic.dart b/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/logic.dart index 2aacbbf..0773740 100644 --- a/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/logic.dart +++ b/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/logic.dart @@ -11,9 +11,9 @@ import 'package:rasadyar_core/core.dart'; class BuyOutOfProvinceLogic extends GetxController { late List routesName; - RxBool isExpanded = false.obs; RxBool isSubmitButtonEnabled = false.obs; - RxList isExpandedList = [].obs; + RxInt expandedListIndex = (-1).obs; + final RxInt currentPage = 1.obs; final RxBool isLoadingMoreAllocationsMade = false.obs; final RxBool isOnLoadingSubmitOrEdit = false.obs; @@ -34,14 +34,15 @@ class BuyOutOfProvinceLogic extends GetxController { StewardRootLogic rootLogic = Get.find(); - BuyLogic get buyLogic => Get.find(); + BuyLogic buyLogic = Get.find(); - SaleLogic get outOfTheProvinceLogic => Get.find(); + SaleLogic outOfTheProvinceLogic = Get.find(); GlobalKey formKey = GlobalKey(); TextEditingController sellerNameController = TextEditingController(); TextEditingController sellerPhoneController = TextEditingController(); TextEditingController carcassWeightController = TextEditingController(); + TextEditingController carcassCountController = TextEditingController(); Rx fromDateFilter = Jalali.now().obs; Rx toDateFilter = Jalali.now().obs; @@ -51,8 +52,6 @@ class BuyOutOfProvinceLogic extends GetxController { void onInit() { super.onInit(); routesName = [...buyLogic.routesName, 'خارج استان'].toList(); - - fLog('BuyOutOfProvinceLogic ${rootLogic.stewardSalesInfoDashboard}'); } @override @@ -76,7 +75,6 @@ class BuyOutOfProvinceLogic extends GetxController { sellerNameController.dispose(); sellerPhoneController.dispose(); carcassWeightController.dispose(); - isExpandedList.clear(); super.onClose(); } @@ -144,9 +142,15 @@ class BuyOutOfProvinceLogic extends GetxController { } void setupListeners() { - sellerNameController.addListener(checkFormValid); + sellerNameController.addListener(() { + checkFormValid(); + if (!isSubmitButtonEnabled.value) { + isSubmitButtonEnabled.value = !isSubmitButtonEnabled.value; + } + }); sellerPhoneController.addListener(checkFormValid); carcassWeightController.addListener(checkFormValid); + carcassCountController.addListener(checkFormValid); ever(selectedProvince, (_) => checkFormValid()); ever(selectedCity, (_) => checkFormValid()); @@ -164,19 +168,26 @@ class BuyOutOfProvinceLogic extends GetxController { sellerNameController.text.isNotEmpty && sellerPhoneController.text.isNotEmpty && carcassWeightController.text.isNotEmpty && + carcassCountController.text.isNotEmpty && selectedProvince.value != null && selectedCity.value != null && selectedProduct.value != null && selectedImage.value != null; + + if (isSubmitButtonEnabled.value) { + isOnLoadingSubmitOrEdit.value = false; + } } Future createStewardPurchaseOutOfProvince() async { bool res = false; isOnLoadingSubmitOrEdit.value = true; if (!(formKey.currentState?.validate() ?? false)) { + isOnLoadingSubmitOrEdit.value = false; return res; } await safeCall( + showError: true, call: () async { CreateStewardFreeBar createStewardFreeBar = CreateStewardFreeBar( productKey: selectedProduct.value!.key, @@ -188,7 +199,7 @@ class BuyOutOfProvinceLogic extends GetxController { barImage: _base64Image.value, date: DateTime.now().formattedYHMS, ); - final res = await rootLogic.chickenRepository.createStewardPurchasesOutSideOfTheProvince( + await rootLogic.chickenRepository.createStewardPurchasesOutSideOfTheProvince( token: rootLogic.tokenService.accessToken.value!, body: createStewardFreeBar, ); @@ -196,6 +207,7 @@ class BuyOutOfProvinceLogic extends GetxController { onSuccess: (result) { getStewardPurchaseOutOfProvince(); resetSubmitForm(); + toggleExpansion(); res = true; }, ); @@ -229,11 +241,31 @@ class BuyOutOfProvinceLogic extends GetxController { isSubmitButtonEnabled.value = true; } + Future editStewardPurchaseOutOfProvince(StewardFreeBar item) async { + CreateStewardFreeBar edit = CreateStewardFreeBar( + productKey: selectedProduct.value!.key, + killHouseName: sellerNameController.text, + killHouseMobile: sellerPhoneController.text, + province: selectedProvince.value!.name, + city: selectedCity.value!.name, + weightOfCarcasses: int.parse(carcassWeightController.text.clearComma), + barImage: _base64Image.value, + date: DateTime.now().formattedYHMS, + ); + + await safeCall( + call: () => rootLogic.chickenRepository.editStewardPurchasesOutSideOfTheProvince( + token: rootLogic.tokenService.accessToken.value!, + queryParameters: buildRawQueryParams(queryParams: {'key': key}), + ), + ); + } + Future deleteStewardPurchaseOutOfProvince(String key) async { await safeCall( - call: () => rootLogic.chickenRepository.deleteStewardPurchasesOutSideOfTheProvince( + call: () => rootLogic.chickenRepository.editStewardPurchasesOutSideOfTheProvince( token: rootLogic.tokenService.accessToken.value!, - stewardFreeBarKey: key, + queryParameters: buildRawQueryParams(queryParams: {'key': key}), ), ); } @@ -243,4 +275,12 @@ class BuyOutOfProvinceLogic extends GetxController { await rootLogic.onRefresh(); await getStewardPurchaseOutOfProvince(); } + + void toggleExpansion({int? index}) { + if (expandedListIndex.value == index || index == null) { + expandedListIndex.value = -1; // Collapse if the same index is tapped + } else { + expandedListIndex.value = index; // Expand the new index + } + } } diff --git a/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/view.dart b/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/view.dart index 4ce2701..5464419 100644 --- a/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/view.dart +++ b/packages/chicken/lib/presentation/pages/steward/buy_out_of_province/view.dart @@ -43,15 +43,15 @@ class BuyOutOfProvincePage extends GetView { var item = data.value.data!.results![index]; return ObxValue((val) { return ExpandableListItem2( - selected: val.contains(index), - onTap: () => controller.isExpandedList.toggle(index), + selected: val.value == index, + onTap: () => controller.toggleExpansion(index: index), index: index, child: itemListWidget(item), secondChild: itemListExpandedWidget(item), labelColor: AppColor.blueLight, labelIcon: Assets.vec.truckFastOutlinedSvg.path, ); - }, controller.isExpandedList); + }, controller.expandedListIndex); }, itemCount: data.value.data?.results?.length ?? 0, separatorBuilder: (context, index) => SizedBox(height: 8.h), @@ -380,6 +380,16 @@ class BuyOutOfProvincePage extends GetView { SeparatorInputFormatter(), ], ), + + UnitTextField( + controller: controller.carcassCountController, + hint: 'حجم', + unit: 'قطعه', + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + SeparatorInputFormatter(), + ], + ), ], ), ), diff --git a/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/logic.dart b/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/logic.dart index 5206977..c9a5adf 100644 --- a/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/logic.dart +++ b/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/logic.dart @@ -15,7 +15,7 @@ import 'package:rasadyar_core/core.dart'; class SalesOutOfProvinceLogic extends GetxController { StewardRootLogic rootLogic = Get.find(); - SaleLogic get saleLogic => Get.find(); + SaleLogic saleLogic = Get.find(); @@ -148,7 +148,7 @@ class SalesOutOfProvinceLogic extends GetxController { Future deleteStewardPurchaseOutOfProvince(String key) async { await safeCall( - call: () => rootLogic.chickenRepository.deleteStewardPurchasesOutSideOfTheProvince( + call: () => rootLogic.chickenRepository.editStewardPurchasesOutSideOfTheProvince( token: rootLogic.tokenService.accessToken.value!, stewardFreeBarKey: key, ), diff --git a/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/view.dart b/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/view.dart index 7852f44..6334f5a 100644 --- a/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/view.dart +++ b/packages/chicken/lib/presentation/pages/steward/sales_out_of_province/view.dart @@ -32,45 +32,7 @@ class SalesOutOfProvincePage extends GetView { child: Column( children: [ inventoryWidget(controller.rootLogic), - /*Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - spacing: 8, - children: [ - Expanded( - child: _informationLabelCard( - title: 'مانده دولتی', - titleColor: AppColor.textColor, - borderColor: Color(0xFFFFAE00), - description: 356952222222.separatedByCommaFa, - iconPath: Assets.vec.cubeCardGovermentSvg.path, - bgDescriptionColor: Colors.white, - gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [Color(0xFFFFD47A), Colors.white], - ), - ), - ), - Expanded( - child: _informationLabelCard( - title: 'مانده آزاد', - borderColor: const Color(0xFF9758FF), - description: 9658554788.separatedByCommaFa, - unit: 'KG', - iconPath: Assets.vec.cubeCardFreeSvg.path, - bgDescriptionColor: Colors.white, - gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [const Color(0xFFD3B9FF), Colors.white], - ), - ), - ), - ], - ), - ),*/ ObxValue((data) { return RPaginatedListView( onLoadMore: () async => controller.getOutProvinceSales(true), diff --git a/packages/chicken/lib/presentation/pages/steward/sales_out_of_province_sales_list/logic.dart b/packages/chicken/lib/presentation/pages/steward/sales_out_of_province_sales_list/logic.dart index 5bcb52e..5b60fb5 100644 --- a/packages/chicken/lib/presentation/pages/steward/sales_out_of_province_sales_list/logic.dart +++ b/packages/chicken/lib/presentation/pages/steward/sales_out_of_province_sales_list/logic.dart @@ -148,7 +148,7 @@ class SalesOutOfProvinceSalesListLogic extends GetxController { Future deleteStewardPurchaseOutOfProvince(String key) async { await safeCall( call: () => rootLogic.chickenRepository - .deleteStewardPurchasesOutSideOfTheProvince( + .editStewardPurchasesOutSideOfTheProvince( token: rootLogic.tokenService.accessToken.value!, stewardFreeBarKey: key, ), diff --git a/packages/chicken/lib/presentation/utils/string_utils.dart b/packages/chicken/lib/presentation/utils/string_utils.dart index 9145793..68c0976 100644 --- a/packages/chicken/lib/presentation/utils/string_utils.dart +++ b/packages/chicken/lib/presentation/utils/string_utils.dart @@ -19,6 +19,10 @@ extension XStringUtils on String { return false; } } + + String get faTitle { + return utilsMap[this] ?? this; + } } Map utilsMap = { @@ -30,4 +34,5 @@ Map utilsMap = { 'pending': 'در انتظار', 'accepted': 'تایید شده', 'guild': 'صنف', + 'governmental': 'دولتی', }; diff --git a/packages/core/lib/presentation/widget/base_page/widgets/breadcrumb.dart b/packages/core/lib/presentation/widget/base_page/widgets/breadcrumb.dart index ac936a8..893b9de 100644 --- a/packages/core/lib/presentation/widget/base_page/widgets/breadcrumb.dart +++ b/packages/core/lib/presentation/widget/base_page/widgets/breadcrumb.dart @@ -107,3 +107,44 @@ class ContainerBreadcrumb extends Breadcrumb { ); } } + +/* +class _TriangleClipper extends CustomClipper { + final bool isFirst; + final bool isLast; + + _TriangleClipper({required this.isFirst, required this.isLast}); + + @override + Path getClip(Size size) { + final Path path = Path(); + + if (isFirst) { + path.moveTo(20, 0); + path.lineTo(size.width, 0); + path.lineTo(size.width, size.height); + path.lineTo(20, size.height); + } else { + path.moveTo(20, 0); + path.lineTo(size.width, 0); + path.lineTo(size.width - 20, size.height / 2); + path.lineTo(size.width, size.height); + path.lineTo(20, size.height); + } + + if (isLast) { + path.moveTo(0, 0); + path.lineTo(0, size.height); + } else { + path.moveTo(20, 0); + path.lineTo(0, size.height / 2); + path.lineTo(20, size.height); + } + return path; + } + + @override + bool shouldReclip(CustomClipper oldClipper) { + return true; + } +}*/ diff --git a/pubspec.yaml b/pubspec.yaml index 1a93ab8..57e4536 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: rasadyar_app description: "A new Flutter project." publish_to: 'none' -version: 1.3.20+17 +version: 1.3.21+18 environment: sdk: ^3.9.2