From f9e09a17fe2bf508e553d91c5b649a38f650ada5 Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Sun, 14 Dec 2025 16:26:35 +0330 Subject: [PATCH] chore: update app version to 1.3.39+35, change build mode to release, and enhance role handling in authentication logic for improved user experience --- android/local.properties | 6 +- output.json | 74 +++++++++++++++++++ .../common/presentation/page/auth/logic.dart | 11 ++- .../submit_inspection_response_schema.json | 1 + .../response/hatching/hatching_models.dart | 2 +- .../hatching/hatching_models.freezed.dart | 18 ++--- .../response/hatching/hatching_models.g.dart | 2 +- .../create_inspection_bottom_sheet_logic.dart | 14 ++-- pubspec.yaml | 2 +- 9 files changed, 106 insertions(+), 24 deletions(-) create mode 100644 output.json diff --git a/android/local.properties b/android/local.properties index bc39512..d397f2f 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=debug -flutter.versionName=1.3.36 -flutter.versionCode=32 \ No newline at end of file +flutter.buildMode=release +flutter.versionName=1.3.39 +flutter.versionCode=35 \ No newline at end of file diff --git a/output.json b/output.json new file mode 100644 index 0000000..b058660 --- /dev/null +++ b/output.json @@ -0,0 +1,74 @@ +{ + "lat": 35.8245784, + "log": 50.9479516, + "hatching_id": 4560, + "role": "SuperAdmin", + "report_information": { + "general_condition_hall": { + "images": [ + "https://s3.rasadyar.com/rasadyar/202512141551550.jpg", + "https://s3.rasadyar.com/rasadyar/202512141551560.jpg" + ], + "health_status": "عالی", + "ventilation_status": "عالی", + "bed_condition": "خشک", + "temperature": 25, + "drinking_water_source": null, + "drinking_water_quality": null + }, + "casualties": { + "normal_losses": null, + "abnormal_losses": null, + "source_of_hatching": null, + "cause_abnormal_losses": null, + "type_disease": null, + "sampling_done": null, + "type_sampling": null, + "images": null + }, + "technical_officer": { + "technical_health_officer": "", + "technical_engineering_officer": "" + }, + "input_status": { + "input_status": null, + "company_name": null, + "tracking_code": "", + "type_of_grain": null, + "inventory_in_warehouse": "", + "inventory_until_visit": "", + "grade_grain": null, + "images": null + }, + "infrastructure_energy": { + "generator_type": "", + "generator_model": "", + "generator_count": "", + "generator_capacity": "", + "fuel_type": null, + "generator_performance": null, + "emergency_fuel_inventory": "", + "has_power_cut_history": null, + "power_cut_duration": "", + "power_cut_hour": "", + "additional_notes": "" + }, + "hr": { + "number_employed": null, + "number_indigenous": null, + "number_non_indigenous": null, + "contract_status": null, + "trained": null + }, + "facilities": { + "has_facilities": null, + "type_of_facility": null, + "amount": null, + "date": null, + "repayment_status": null, + "request_facilities": null + }, + "inspection_status": "تایید شده", + "inspection_notes": "تست" + } +} \ No newline at end of file diff --git a/packages/chicken/lib/features/common/presentation/page/auth/logic.dart b/packages/chicken/lib/features/common/presentation/page/auth/logic.dart index 111f6a7..fa74d23 100644 --- a/packages/chicken/lib/features/common/presentation/page/auth/logic.dart +++ b/packages/chicken/lib/features/common/presentation/page/auth/logic.dart @@ -150,6 +150,9 @@ class AuthLogic extends GetxController with GetTickerProviderStateMixin { final lowerElement = element.toString().toLowerCase().trim(); return allowedRoles.contains(lowerElement); }).toList(); + if (tmpRoles?.length==1) { + await tokenStorageService.saveRoles(_module, tmpRoles ?? []); + } await tokenStorageService.saveRoles(_module, tmpRoles ?? []); if (rememberMe.value) { @@ -168,11 +171,15 @@ class AuthLogic extends GetxController with GetTickerProviderStateMixin { }, ); - if (tmpRoles!.length > 1) { + + Get.offAndToNamed(CommonRoutes.role); + + +/* if (tmpRoles!.length > 1) { Get.offAndToNamed(CommonRoutes.role); } else { Get.offAllNamed(StewardRoutes.initSteward); - } + } */ }, onError: (error, stackTrace) { if (error is DioException) { diff --git a/packages/chicken/lib/features/poultry_science/data/model/request/submit_inspection/submit_inspection_response_schema.json b/packages/chicken/lib/features/poultry_science/data/model/request/submit_inspection/submit_inspection_response_schema.json index 7fc8703..abe6e96 100644 --- a/packages/chicken/lib/features/poultry_science/data/model/request/submit_inspection/submit_inspection_response_schema.json +++ b/packages/chicken/lib/features/poultry_science/data/model/request/submit_inspection/submit_inspection_response_schema.json @@ -423,3 +423,4 @@ } } + diff --git a/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.dart b/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.dart index 0c907c5..3db0271 100644 --- a/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.dart +++ b/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.dart @@ -187,7 +187,7 @@ abstract class Poultry with _$Poultry { num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, - int? interestLicenseId, + String? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, diff --git a/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.freezed.dart b/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.freezed.dart index 05c6c44..862be95 100644 --- a/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.freezed.dart +++ b/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.freezed.dart @@ -858,7 +858,7 @@ $LatestHatchingChangeCopyWith<$Res>? get latestHatchingChange { /// @nodoc mixin _$Poultry { - int? get id; PoultryUser? get user; PoultryAddress? get address; String? get key; bool? get trash; int? get ownerIdForeignKey; int? get userIdForeignKey; int? get addressIdForeignKey; bool? get hasChainCompany; int? get userBankIdForeignKey; String? get cityOperator; String? get unitName; String? get gisCode; num? get operatingLicenceCapacity; num? get numberOfHalls; bool? get tenant; bool? get hasTenant; String? get personType; String? get economicCode; String? get systemCode; String? get epidemiologicalCode; String? get breedingUniqueId; num? get totalCapacity; String? get licenceNumber; String? get healthCertificateNumber; num? get numberOfRequests; String? get hatchingDate; String? get lastPartyDate; num? get numberOfIncubators; num? get herdAgeByDay; num? get herdAgeByWeek; num? get numberOfParty; String? get communicationType; String? get cooperative; String? get dateOfRegister; String? get unitStatus; bool? get active; dynamic get identityDocuments; String? get samasatUserCode; String? get baseOrder; String? get incubationDate; num? get walletAmount; num? get city; num? get cityNumber; String? get cityName; num? get provinceNumber; String? get provinceName; int? get walletIdForeignKey; int? get poultryIdKey; num? get lat; num? get long; String? get date; num? get killingAveAge; num? get activeLeftOver; num? get killingAveCount; num? get killingAveWeight; num? get killingLiveWeight; num? get killingCarcassesWeight; num? get killingLossWeightPercent; num? get realKillingAveWeight; num? get realKillingLiveWeight; num? get realKillingCarcassesWeight; num? get realKillingLossWeightPercent; int? get interestLicenseId; bool? get orderLimit; int? get owner; int? get userBankInfo; int? get wallet; + int? get id; PoultryUser? get user; PoultryAddress? get address; String? get key; bool? get trash; int? get ownerIdForeignKey; int? get userIdForeignKey; int? get addressIdForeignKey; bool? get hasChainCompany; int? get userBankIdForeignKey; String? get cityOperator; String? get unitName; String? get gisCode; num? get operatingLicenceCapacity; num? get numberOfHalls; bool? get tenant; bool? get hasTenant; String? get personType; String? get economicCode; String? get systemCode; String? get epidemiologicalCode; String? get breedingUniqueId; num? get totalCapacity; String? get licenceNumber; String? get healthCertificateNumber; num? get numberOfRequests; String? get hatchingDate; String? get lastPartyDate; num? get numberOfIncubators; num? get herdAgeByDay; num? get herdAgeByWeek; num? get numberOfParty; String? get communicationType; String? get cooperative; String? get dateOfRegister; String? get unitStatus; bool? get active; dynamic get identityDocuments; String? get samasatUserCode; String? get baseOrder; String? get incubationDate; num? get walletAmount; num? get city; num? get cityNumber; String? get cityName; num? get provinceNumber; String? get provinceName; int? get walletIdForeignKey; int? get poultryIdKey; num? get lat; num? get long; String? get date; num? get killingAveAge; num? get activeLeftOver; num? get killingAveCount; num? get killingAveWeight; num? get killingLiveWeight; num? get killingCarcassesWeight; num? get killingLossWeightPercent; num? get realKillingAveWeight; num? get realKillingLiveWeight; num? get realKillingCarcassesWeight; num? get realKillingLossWeightPercent; String? get interestLicenseId; bool? get orderLimit; int? get owner; int? get userBankInfo; int? get wallet; /// Create a copy of Poultry /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -891,7 +891,7 @@ abstract mixin class $PoultryCopyWith<$Res> { factory $PoultryCopyWith(Poultry value, $Res Function(Poultry) _then) = _$PoultryCopyWithImpl; @useResult $Res call({ - int? id, PoultryUser? user, PoultryAddress? address, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, String? cityOperator, String? unitName, String? gisCode, num? operatingLicenceCapacity, num? numberOfHalls, bool? tenant, bool? hasTenant, String? personType, String? economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, num? totalCapacity, String? licenceNumber, String? healthCertificateNumber, num? numberOfRequests, String? hatchingDate, String? lastPartyDate, num? numberOfIncubators, num? herdAgeByDay, num? herdAgeByWeek, num? numberOfParty, String? communicationType, String? cooperative, String? dateOfRegister, String? unitStatus, bool? active, dynamic identityDocuments, String? samasatUserCode, String? baseOrder, String? incubationDate, num? walletAmount, num? city, num? cityNumber, String? cityName, num? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, num? lat, num? long, String? date, num? killingAveAge, num? activeLeftOver, num? killingAveCount, num? killingAveWeight, num? killingLiveWeight, num? killingCarcassesWeight, num? killingLossWeightPercent, num? realKillingAveWeight, num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, int? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, int? wallet + int? id, PoultryUser? user, PoultryAddress? address, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, String? cityOperator, String? unitName, String? gisCode, num? operatingLicenceCapacity, num? numberOfHalls, bool? tenant, bool? hasTenant, String? personType, String? economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, num? totalCapacity, String? licenceNumber, String? healthCertificateNumber, num? numberOfRequests, String? hatchingDate, String? lastPartyDate, num? numberOfIncubators, num? herdAgeByDay, num? herdAgeByWeek, num? numberOfParty, String? communicationType, String? cooperative, String? dateOfRegister, String? unitStatus, bool? active, dynamic identityDocuments, String? samasatUserCode, String? baseOrder, String? incubationDate, num? walletAmount, num? city, num? cityNumber, String? cityName, num? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, num? lat, num? long, String? date, num? killingAveAge, num? activeLeftOver, num? killingAveCount, num? killingAveWeight, num? killingLiveWeight, num? killingCarcassesWeight, num? killingLossWeightPercent, num? realKillingAveWeight, num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, String? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, int? wallet }); @@ -974,7 +974,7 @@ as num?,realKillingLiveWeight: freezed == realKillingLiveWeight ? _self.realKill as num?,realKillingCarcassesWeight: freezed == realKillingCarcassesWeight ? _self.realKillingCarcassesWeight : realKillingCarcassesWeight // ignore: cast_nullable_to_non_nullable as num?,realKillingLossWeightPercent: freezed == realKillingLossWeightPercent ? _self.realKillingLossWeightPercent : realKillingLossWeightPercent // ignore: cast_nullable_to_non_nullable as num?,interestLicenseId: freezed == interestLicenseId ? _self.interestLicenseId : interestLicenseId // ignore: cast_nullable_to_non_nullable -as int?,orderLimit: freezed == orderLimit ? _self.orderLimit : orderLimit // ignore: cast_nullable_to_non_nullable +as String?,orderLimit: freezed == orderLimit ? _self.orderLimit : orderLimit // ignore: cast_nullable_to_non_nullable as bool?,owner: freezed == owner ? _self.owner : owner // ignore: cast_nullable_to_non_nullable as int?,userBankInfo: freezed == userBankInfo ? _self.userBankInfo : userBankInfo // ignore: cast_nullable_to_non_nullable as int?,wallet: freezed == wallet ? _self.wallet : wallet // ignore: cast_nullable_to_non_nullable @@ -1087,7 +1087,7 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( int? id, PoultryUser? user, PoultryAddress? address, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, String? cityOperator, String? unitName, String? gisCode, num? operatingLicenceCapacity, num? numberOfHalls, bool? tenant, bool? hasTenant, String? personType, String? economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, num? totalCapacity, String? licenceNumber, String? healthCertificateNumber, num? numberOfRequests, String? hatchingDate, String? lastPartyDate, num? numberOfIncubators, num? herdAgeByDay, num? herdAgeByWeek, num? numberOfParty, String? communicationType, String? cooperative, String? dateOfRegister, String? unitStatus, bool? active, dynamic identityDocuments, String? samasatUserCode, String? baseOrder, String? incubationDate, num? walletAmount, num? city, num? cityNumber, String? cityName, num? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, num? lat, num? long, String? date, num? killingAveAge, num? activeLeftOver, num? killingAveCount, num? killingAveWeight, num? killingLiveWeight, num? killingCarcassesWeight, num? killingLossWeightPercent, num? realKillingAveWeight, num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, int? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, int? wallet)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( int? id, PoultryUser? user, PoultryAddress? address, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, String? cityOperator, String? unitName, String? gisCode, num? operatingLicenceCapacity, num? numberOfHalls, bool? tenant, bool? hasTenant, String? personType, String? economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, num? totalCapacity, String? licenceNumber, String? healthCertificateNumber, num? numberOfRequests, String? hatchingDate, String? lastPartyDate, num? numberOfIncubators, num? herdAgeByDay, num? herdAgeByWeek, num? numberOfParty, String? communicationType, String? cooperative, String? dateOfRegister, String? unitStatus, bool? active, dynamic identityDocuments, String? samasatUserCode, String? baseOrder, String? incubationDate, num? walletAmount, num? city, num? cityNumber, String? cityName, num? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, num? lat, num? long, String? date, num? killingAveAge, num? activeLeftOver, num? killingAveCount, num? killingAveWeight, num? killingLiveWeight, num? killingCarcassesWeight, num? killingLossWeightPercent, num? realKillingAveWeight, num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, String? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, int? wallet)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _Poultry() when $default != null: return $default(_that.id,_that.user,_that.address,_that.key,_that.trash,_that.ownerIdForeignKey,_that.userIdForeignKey,_that.addressIdForeignKey,_that.hasChainCompany,_that.userBankIdForeignKey,_that.cityOperator,_that.unitName,_that.gisCode,_that.operatingLicenceCapacity,_that.numberOfHalls,_that.tenant,_that.hasTenant,_that.personType,_that.economicCode,_that.systemCode,_that.epidemiologicalCode,_that.breedingUniqueId,_that.totalCapacity,_that.licenceNumber,_that.healthCertificateNumber,_that.numberOfRequests,_that.hatchingDate,_that.lastPartyDate,_that.numberOfIncubators,_that.herdAgeByDay,_that.herdAgeByWeek,_that.numberOfParty,_that.communicationType,_that.cooperative,_that.dateOfRegister,_that.unitStatus,_that.active,_that.identityDocuments,_that.samasatUserCode,_that.baseOrder,_that.incubationDate,_that.walletAmount,_that.city,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.walletIdForeignKey,_that.poultryIdKey,_that.lat,_that.long,_that.date,_that.killingAveAge,_that.activeLeftOver,_that.killingAveCount,_that.killingAveWeight,_that.killingLiveWeight,_that.killingCarcassesWeight,_that.killingLossWeightPercent,_that.realKillingAveWeight,_that.realKillingLiveWeight,_that.realKillingCarcassesWeight,_that.realKillingLossWeightPercent,_that.interestLicenseId,_that.orderLimit,_that.owner,_that.userBankInfo,_that.wallet);case _: @@ -1108,7 +1108,7 @@ return $default(_that.id,_that.user,_that.address,_that.key,_that.trash,_that.ow /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( int? id, PoultryUser? user, PoultryAddress? address, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, String? cityOperator, String? unitName, String? gisCode, num? operatingLicenceCapacity, num? numberOfHalls, bool? tenant, bool? hasTenant, String? personType, String? economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, num? totalCapacity, String? licenceNumber, String? healthCertificateNumber, num? numberOfRequests, String? hatchingDate, String? lastPartyDate, num? numberOfIncubators, num? herdAgeByDay, num? herdAgeByWeek, num? numberOfParty, String? communicationType, String? cooperative, String? dateOfRegister, String? unitStatus, bool? active, dynamic identityDocuments, String? samasatUserCode, String? baseOrder, String? incubationDate, num? walletAmount, num? city, num? cityNumber, String? cityName, num? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, num? lat, num? long, String? date, num? killingAveAge, num? activeLeftOver, num? killingAveCount, num? killingAveWeight, num? killingLiveWeight, num? killingCarcassesWeight, num? killingLossWeightPercent, num? realKillingAveWeight, num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, int? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, int? wallet) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( int? id, PoultryUser? user, PoultryAddress? address, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, String? cityOperator, String? unitName, String? gisCode, num? operatingLicenceCapacity, num? numberOfHalls, bool? tenant, bool? hasTenant, String? personType, String? economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, num? totalCapacity, String? licenceNumber, String? healthCertificateNumber, num? numberOfRequests, String? hatchingDate, String? lastPartyDate, num? numberOfIncubators, num? herdAgeByDay, num? herdAgeByWeek, num? numberOfParty, String? communicationType, String? cooperative, String? dateOfRegister, String? unitStatus, bool? active, dynamic identityDocuments, String? samasatUserCode, String? baseOrder, String? incubationDate, num? walletAmount, num? city, num? cityNumber, String? cityName, num? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, num? lat, num? long, String? date, num? killingAveAge, num? activeLeftOver, num? killingAveCount, num? killingAveWeight, num? killingLiveWeight, num? killingCarcassesWeight, num? killingLossWeightPercent, num? realKillingAveWeight, num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, String? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, int? wallet) $default,) {final _that = this; switch (_that) { case _Poultry(): return $default(_that.id,_that.user,_that.address,_that.key,_that.trash,_that.ownerIdForeignKey,_that.userIdForeignKey,_that.addressIdForeignKey,_that.hasChainCompany,_that.userBankIdForeignKey,_that.cityOperator,_that.unitName,_that.gisCode,_that.operatingLicenceCapacity,_that.numberOfHalls,_that.tenant,_that.hasTenant,_that.personType,_that.economicCode,_that.systemCode,_that.epidemiologicalCode,_that.breedingUniqueId,_that.totalCapacity,_that.licenceNumber,_that.healthCertificateNumber,_that.numberOfRequests,_that.hatchingDate,_that.lastPartyDate,_that.numberOfIncubators,_that.herdAgeByDay,_that.herdAgeByWeek,_that.numberOfParty,_that.communicationType,_that.cooperative,_that.dateOfRegister,_that.unitStatus,_that.active,_that.identityDocuments,_that.samasatUserCode,_that.baseOrder,_that.incubationDate,_that.walletAmount,_that.city,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.walletIdForeignKey,_that.poultryIdKey,_that.lat,_that.long,_that.date,_that.killingAveAge,_that.activeLeftOver,_that.killingAveCount,_that.killingAveWeight,_that.killingLiveWeight,_that.killingCarcassesWeight,_that.killingLossWeightPercent,_that.realKillingAveWeight,_that.realKillingLiveWeight,_that.realKillingCarcassesWeight,_that.realKillingLossWeightPercent,_that.interestLicenseId,_that.orderLimit,_that.owner,_that.userBankInfo,_that.wallet);case _: @@ -1128,7 +1128,7 @@ return $default(_that.id,_that.user,_that.address,_that.key,_that.trash,_that.ow /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( int? id, PoultryUser? user, PoultryAddress? address, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, String? cityOperator, String? unitName, String? gisCode, num? operatingLicenceCapacity, num? numberOfHalls, bool? tenant, bool? hasTenant, String? personType, String? economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, num? totalCapacity, String? licenceNumber, String? healthCertificateNumber, num? numberOfRequests, String? hatchingDate, String? lastPartyDate, num? numberOfIncubators, num? herdAgeByDay, num? herdAgeByWeek, num? numberOfParty, String? communicationType, String? cooperative, String? dateOfRegister, String? unitStatus, bool? active, dynamic identityDocuments, String? samasatUserCode, String? baseOrder, String? incubationDate, num? walletAmount, num? city, num? cityNumber, String? cityName, num? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, num? lat, num? long, String? date, num? killingAveAge, num? activeLeftOver, num? killingAveCount, num? killingAveWeight, num? killingLiveWeight, num? killingCarcassesWeight, num? killingLossWeightPercent, num? realKillingAveWeight, num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, int? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, int? wallet)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int? id, PoultryUser? user, PoultryAddress? address, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, String? cityOperator, String? unitName, String? gisCode, num? operatingLicenceCapacity, num? numberOfHalls, bool? tenant, bool? hasTenant, String? personType, String? economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, num? totalCapacity, String? licenceNumber, String? healthCertificateNumber, num? numberOfRequests, String? hatchingDate, String? lastPartyDate, num? numberOfIncubators, num? herdAgeByDay, num? herdAgeByWeek, num? numberOfParty, String? communicationType, String? cooperative, String? dateOfRegister, String? unitStatus, bool? active, dynamic identityDocuments, String? samasatUserCode, String? baseOrder, String? incubationDate, num? walletAmount, num? city, num? cityNumber, String? cityName, num? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, num? lat, num? long, String? date, num? killingAveAge, num? activeLeftOver, num? killingAveCount, num? killingAveWeight, num? killingLiveWeight, num? killingCarcassesWeight, num? killingLossWeightPercent, num? realKillingAveWeight, num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, String? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, int? wallet)? $default,) {final _that = this; switch (_that) { case _Poultry() when $default != null: return $default(_that.id,_that.user,_that.address,_that.key,_that.trash,_that.ownerIdForeignKey,_that.userIdForeignKey,_that.addressIdForeignKey,_that.hasChainCompany,_that.userBankIdForeignKey,_that.cityOperator,_that.unitName,_that.gisCode,_that.operatingLicenceCapacity,_that.numberOfHalls,_that.tenant,_that.hasTenant,_that.personType,_that.economicCode,_that.systemCode,_that.epidemiologicalCode,_that.breedingUniqueId,_that.totalCapacity,_that.licenceNumber,_that.healthCertificateNumber,_that.numberOfRequests,_that.hatchingDate,_that.lastPartyDate,_that.numberOfIncubators,_that.herdAgeByDay,_that.herdAgeByWeek,_that.numberOfParty,_that.communicationType,_that.cooperative,_that.dateOfRegister,_that.unitStatus,_that.active,_that.identityDocuments,_that.samasatUserCode,_that.baseOrder,_that.incubationDate,_that.walletAmount,_that.city,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.walletIdForeignKey,_that.poultryIdKey,_that.lat,_that.long,_that.date,_that.killingAveAge,_that.activeLeftOver,_that.killingAveCount,_that.killingAveWeight,_that.killingLiveWeight,_that.killingCarcassesWeight,_that.killingLossWeightPercent,_that.realKillingAveWeight,_that.realKillingLiveWeight,_that.realKillingCarcassesWeight,_that.realKillingLossWeightPercent,_that.interestLicenseId,_that.orderLimit,_that.owner,_that.userBankInfo,_that.wallet);case _: @@ -1209,7 +1209,7 @@ class _Poultry implements Poultry { @override final num? realKillingLiveWeight; @override final num? realKillingCarcassesWeight; @override final num? realKillingLossWeightPercent; -@override final int? interestLicenseId; +@override final String? interestLicenseId; @override final bool? orderLimit; @override final int? owner; @override final int? userBankInfo; @@ -1248,7 +1248,7 @@ abstract mixin class _$PoultryCopyWith<$Res> implements $PoultryCopyWith<$Res> { factory _$PoultryCopyWith(_Poultry value, $Res Function(_Poultry) _then) = __$PoultryCopyWithImpl; @override @useResult $Res call({ - int? id, PoultryUser? user, PoultryAddress? address, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, String? cityOperator, String? unitName, String? gisCode, num? operatingLicenceCapacity, num? numberOfHalls, bool? tenant, bool? hasTenant, String? personType, String? economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, num? totalCapacity, String? licenceNumber, String? healthCertificateNumber, num? numberOfRequests, String? hatchingDate, String? lastPartyDate, num? numberOfIncubators, num? herdAgeByDay, num? herdAgeByWeek, num? numberOfParty, String? communicationType, String? cooperative, String? dateOfRegister, String? unitStatus, bool? active, dynamic identityDocuments, String? samasatUserCode, String? baseOrder, String? incubationDate, num? walletAmount, num? city, num? cityNumber, String? cityName, num? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, num? lat, num? long, String? date, num? killingAveAge, num? activeLeftOver, num? killingAveCount, num? killingAveWeight, num? killingLiveWeight, num? killingCarcassesWeight, num? killingLossWeightPercent, num? realKillingAveWeight, num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, int? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, int? wallet + int? id, PoultryUser? user, PoultryAddress? address, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, String? cityOperator, String? unitName, String? gisCode, num? operatingLicenceCapacity, num? numberOfHalls, bool? tenant, bool? hasTenant, String? personType, String? economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, num? totalCapacity, String? licenceNumber, String? healthCertificateNumber, num? numberOfRequests, String? hatchingDate, String? lastPartyDate, num? numberOfIncubators, num? herdAgeByDay, num? herdAgeByWeek, num? numberOfParty, String? communicationType, String? cooperative, String? dateOfRegister, String? unitStatus, bool? active, dynamic identityDocuments, String? samasatUserCode, String? baseOrder, String? incubationDate, num? walletAmount, num? city, num? cityNumber, String? cityName, num? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, num? lat, num? long, String? date, num? killingAveAge, num? activeLeftOver, num? killingAveCount, num? killingAveWeight, num? killingLiveWeight, num? killingCarcassesWeight, num? killingLossWeightPercent, num? realKillingAveWeight, num? realKillingLiveWeight, num? realKillingCarcassesWeight, num? realKillingLossWeightPercent, String? interestLicenseId, bool? orderLimit, int? owner, int? userBankInfo, int? wallet }); @@ -1331,7 +1331,7 @@ as num?,realKillingLiveWeight: freezed == realKillingLiveWeight ? _self.realKill as num?,realKillingCarcassesWeight: freezed == realKillingCarcassesWeight ? _self.realKillingCarcassesWeight : realKillingCarcassesWeight // ignore: cast_nullable_to_non_nullable as num?,realKillingLossWeightPercent: freezed == realKillingLossWeightPercent ? _self.realKillingLossWeightPercent : realKillingLossWeightPercent // ignore: cast_nullable_to_non_nullable as num?,interestLicenseId: freezed == interestLicenseId ? _self.interestLicenseId : interestLicenseId // ignore: cast_nullable_to_non_nullable -as int?,orderLimit: freezed == orderLimit ? _self.orderLimit : orderLimit // ignore: cast_nullable_to_non_nullable +as String?,orderLimit: freezed == orderLimit ? _self.orderLimit : orderLimit // ignore: cast_nullable_to_non_nullable as bool?,owner: freezed == owner ? _self.owner : owner // ignore: cast_nullable_to_non_nullable as int?,userBankInfo: freezed == userBankInfo ? _self.userBankInfo : userBankInfo // ignore: cast_nullable_to_non_nullable as int?,wallet: freezed == wallet ? _self.wallet : wallet // ignore: cast_nullable_to_non_nullable diff --git a/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.g.dart b/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.g.dart index 8599f86..2d61411 100644 --- a/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.g.dart +++ b/packages/chicken/lib/features/poultry_science/data/model/response/hatching/hatching_models.g.dart @@ -331,7 +331,7 @@ _Poultry _$PoultryFromJson(Map json) => _Poultry( realKillingCarcassesWeight: json['real_killing_carcasses_weight'] as num?, realKillingLossWeightPercent: json['real_killing_loss_weight_percent'] as num?, - interestLicenseId: (json['interest_license_id'] as num?)?.toInt(), + interestLicenseId: json['interest_license_id'] as String?, orderLimit: json['order_limit'] as bool?, owner: (json['owner'] as num?)?.toInt(), userBankInfo: (json['user_bank_info'] as num?)?.toInt(), diff --git a/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/create_inspection_bottom_sheet_logic.dart b/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/create_inspection_bottom_sheet_logic.dart index 3f93d54..dd8d499 100644 --- a/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/create_inspection_bottom_sheet_logic.dart +++ b/packages/chicken/lib/features/poultry_science/presentation/widgets/submit_inspection_bottom_sheet/create_inspection_bottom_sheet_logic.dart @@ -869,11 +869,11 @@ class CreateInspectionBottomSheetLogic extends GetxController hatchingTemperatureController.text; submitInspectionResponse?.generalConditionHall?.drinkingWaterQuality = waterQuality.value; - submitInspectionResponse?.casualties?.abnormalLosses = int.parse( - abnormalLossesController.text, + submitInspectionResponse?.casualties?.abnormalLosses = int.tryParse( + abnormalLossesController.text.clearComma, ); - submitInspectionResponse?.casualties?.normalLosses = int.parse( - normalLossesController.text, + submitInspectionResponse?.casualties?.normalLosses = int.tryParse( + normalLossesController.text.clearComma, ); if (isOthercauseOfUnusualCasualties.value) { @@ -926,13 +926,13 @@ class CreateInspectionBottomSheetLogic extends GetxController submitInspectionResponse?.infrastructureEnergy?.additionalNotes = additionalNotesController.text; - submitInspectionResponse?.hr?.numberEmployed = int.parse( + submitInspectionResponse?.hr?.numberEmployed = int.tryParse( employedWorkersCountController.text.clearComma, ); - submitInspectionResponse?.hr?.numberIndigenous = int.parse( + submitInspectionResponse?.hr?.numberIndigenous = int.tryParse( nativeWorkersCountController.text.clearComma, ); - submitInspectionResponse?.hr?.numberNonIndigenous = int.parse( + submitInspectionResponse?.hr?.numberNonIndigenous = int.tryParse( nonNativeWorkersCountController.text.clearComma, ); diff --git a/pubspec.yaml b/pubspec.yaml index 24df1ad..86a1fa7 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.36+32 +version: 1.3.39+35 environment: sdk: ^3.10.0