feat :
1 - search in map with api 2 - show details in selected location
This commit is contained in:
@@ -0,0 +1,210 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'hatching_details.freezed.dart';
|
||||
part 'hatching_details.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class HatchingDetails with _$HatchingDetails {
|
||||
const factory HatchingDetails({
|
||||
required int id,
|
||||
String? chainCompany,
|
||||
int? age,
|
||||
dynamic inspectionLosses,
|
||||
VetFarm? vetFarm,
|
||||
ActiveKill? activeKill,
|
||||
KillingInfo? killingInfo,
|
||||
FreeGovernmentalInfo? freeGovernmentalInfo,
|
||||
String? key,
|
||||
DateTime? createDate,
|
||||
DateTime? modifyDate,
|
||||
bool? trash,
|
||||
bool? hasChainCompany,
|
||||
dynamic poultryIdForeignKey,
|
||||
dynamic poultryHatchingIdKey,
|
||||
int? quantity,
|
||||
int? losses,
|
||||
int? leftOver,
|
||||
int? killedQuantity,
|
||||
int? extraKilledQuantity,
|
||||
double? governmentalKilledQuantity,
|
||||
double? governmentalQuantity,
|
||||
double? freeKilledQuantity,
|
||||
double? freeQuantity,
|
||||
double? chainKilledQuantity,
|
||||
double? chainKilledWeight,
|
||||
double? outProvinceKilledWeight,
|
||||
double? outProvinceKilledQuantity,
|
||||
double? exportKilledWeight,
|
||||
double? exportKilledQuantity,
|
||||
double? totalCommitment,
|
||||
String? commitmentType,
|
||||
double? totalCommitmentQuantity,
|
||||
double? totalFreeCommitmentQuantity,
|
||||
double? totalFreeCommitmentWeight,
|
||||
double? totalKilledWeight,
|
||||
double? totalAverageKilledWeight,
|
||||
int? requestLeftOver,
|
||||
int? hall,
|
||||
DateTime? date,
|
||||
DateTime? predicateDate,
|
||||
String? chickenBreed,
|
||||
int? period,
|
||||
String? allowHatching,
|
||||
String? state,
|
||||
bool? archive,
|
||||
bool? violation,
|
||||
dynamic message,
|
||||
dynamic registrar,
|
||||
List<Breed>? breed,
|
||||
int? cityNumber,
|
||||
String? cityName,
|
||||
int? provinceNumber,
|
||||
String? provinceName,
|
||||
LastChange? lastChange,
|
||||
int? chickenAge,
|
||||
int? nowAge,
|
||||
LatestHatchingChange? latestHatchingChange,
|
||||
dynamic violationReport,
|
||||
String? violationMessage,
|
||||
dynamic violationImage,
|
||||
dynamic violationReporter,
|
||||
dynamic violationReportDate,
|
||||
dynamic violationReportEditor,
|
||||
dynamic violationReportEditDate,
|
||||
int? totalLosses,
|
||||
int? directLosses,
|
||||
dynamic directLossesInputer,
|
||||
dynamic directLossesDate,
|
||||
dynamic directLossesEditor,
|
||||
dynamic directLossesLastEditDate,
|
||||
dynamic endPeriodLossesInputer,
|
||||
dynamic endPeriodLossesDate,
|
||||
dynamic endPeriodLossesEditor,
|
||||
dynamic endPeriodLossesLastEditDate,
|
||||
String? breedingUniqueId,
|
||||
String? licenceNumber,
|
||||
bool? temporaryTrash,
|
||||
bool? temporaryDeleted,
|
||||
dynamic firstDateInputArchive,
|
||||
dynamic secondDateInputArchive,
|
||||
dynamic inputArchiver,
|
||||
dynamic outputArchiveDate,
|
||||
dynamic outputArchiver,
|
||||
double? barDifferenceRequestWeight,
|
||||
double? barDifferenceRequestQuantity,
|
||||
dynamic healthCertificate,
|
||||
int? samasatDischargePercentage,
|
||||
String? personTypeName,
|
||||
String? interactTypeName,
|
||||
String? unionTypeName,
|
||||
String? certId,
|
||||
int? increaseQuantity,
|
||||
dynamic tenantFullname,
|
||||
dynamic tenantNationalCode,
|
||||
dynamic tenantMobile,
|
||||
dynamic tenantCity,
|
||||
bool? hasTenant,
|
||||
dynamic createdBy,
|
||||
dynamic modifiedBy,
|
||||
int? poultry,
|
||||
}) = _HatchingDetails;
|
||||
|
||||
factory HatchingDetails.fromJson(Map<String, dynamic> json) =>
|
||||
_$HatchingDetailsFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class VetFarm with _$VetFarm {
|
||||
const factory VetFarm({
|
||||
String? vetFarmFullName,
|
||||
String? vetFarmMobile,
|
||||
}) = _VetFarm;
|
||||
|
||||
factory VetFarm.fromJson(Map<String, dynamic> json) =>
|
||||
_$VetFarmFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ActiveKill with _$ActiveKill {
|
||||
const factory ActiveKill({
|
||||
bool? activeKill,
|
||||
int? countOfRequest,
|
||||
}) = _ActiveKill;
|
||||
|
||||
factory ActiveKill.fromJson(Map<String, dynamic> json) =>
|
||||
_$ActiveKillFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class KillingInfo with _$KillingInfo {
|
||||
const factory KillingInfo({
|
||||
String? violationMessage,
|
||||
int? provinceKillRequests,
|
||||
int? provinceKillRequestsQuantity,
|
||||
double? provinceKillRequestsWeight,
|
||||
int? killHouseRequests,
|
||||
int? killHouseRequestsFirstQuantity,
|
||||
double? killHouseRequestsFirstWeight,
|
||||
int? barCompleteWithKillHouse,
|
||||
int? acceptedRealQuantityFinal,
|
||||
double? acceptedRealWightFinal,
|
||||
int? wareHouseBars,
|
||||
int? wareHouseBarsQuantity,
|
||||
double? wareHouseBarsWeight,
|
||||
double? wareHouseBarsWeightLose,
|
||||
}) = _KillingInfo;
|
||||
|
||||
factory KillingInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillingInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class FreeGovernmentalInfo with _$FreeGovernmentalInfo {
|
||||
const factory FreeGovernmentalInfo({
|
||||
int? governmentalAllocatedQuantity,
|
||||
double? totalCommitmentQuantity,
|
||||
int? freeAllocatedQuantity,
|
||||
double? totalFreeCommitmentQuantity,
|
||||
int? leftTotalFreeCommitmentQuantity,
|
||||
}) = _FreeGovernmentalInfo;
|
||||
|
||||
factory FreeGovernmentalInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$FreeGovernmentalInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Breed with _$Breed {
|
||||
const factory Breed({
|
||||
String? breed,
|
||||
int? mainQuantity,
|
||||
int? remainQuantity,
|
||||
}) = _Breed;
|
||||
|
||||
factory Breed.fromJson(Map<String, dynamic> json) =>
|
||||
_$BreedFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class LastChange with _$LastChange {
|
||||
const factory LastChange({
|
||||
DateTime? date,
|
||||
String? role,
|
||||
String? type,
|
||||
String? fullName,
|
||||
}) = _LastChange;
|
||||
|
||||
factory LastChange.fromJson(Map<String, dynamic> json) =>
|
||||
_$LastChangeFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class LatestHatchingChange with _$LatestHatchingChange {
|
||||
const factory LatestHatchingChange({
|
||||
DateTime? date,
|
||||
String? role,
|
||||
String? fullName,
|
||||
}) = _LatestHatchingChange;
|
||||
|
||||
factory LatestHatchingChange.fromJson(Map<String, dynamic> json) =>
|
||||
_$LatestHatchingChangeFromJson(json);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,385 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'hatching_details.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_HatchingDetails _$HatchingDetailsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _HatchingDetails(
|
||||
id: (json['id'] as num).toInt(),
|
||||
chainCompany: json['chain_company'] as String?,
|
||||
age: (json['age'] as num?)?.toInt(),
|
||||
inspectionLosses: json['inspection_losses'],
|
||||
vetFarm: json['vet_farm'] == null
|
||||
? null
|
||||
: VetFarm.fromJson(json['vet_farm'] as Map<String, dynamic>),
|
||||
activeKill: json['active_kill'] == null
|
||||
? null
|
||||
: ActiveKill.fromJson(json['active_kill'] as Map<String, dynamic>),
|
||||
killingInfo: json['killing_info'] == null
|
||||
? null
|
||||
: KillingInfo.fromJson(json['killing_info'] as Map<String, dynamic>),
|
||||
freeGovernmentalInfo: json['free_governmental_info'] == null
|
||||
? null
|
||||
: FreeGovernmentalInfo.fromJson(
|
||||
json['free_governmental_info'] as Map<String, dynamic>,
|
||||
),
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['create_date'] as String),
|
||||
modifyDate: json['modify_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['modify_date'] as String),
|
||||
trash: json['trash'] as bool?,
|
||||
hasChainCompany: json['has_chain_company'] as bool?,
|
||||
poultryIdForeignKey: json['poultry_id_foreign_key'],
|
||||
poultryHatchingIdKey: json['poultry_hatching_id_key'],
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
losses: (json['losses'] as num?)?.toInt(),
|
||||
leftOver: (json['left_over'] as num?)?.toInt(),
|
||||
killedQuantity: (json['killed_quantity'] as num?)?.toInt(),
|
||||
extraKilledQuantity: (json['extra_killed_quantity'] as num?)?.toInt(),
|
||||
governmentalKilledQuantity: (json['governmental_killed_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
governmentalQuantity: (json['governmental_quantity'] as num?)?.toDouble(),
|
||||
freeKilledQuantity: (json['free_killed_quantity'] as num?)?.toDouble(),
|
||||
freeQuantity: (json['free_quantity'] as num?)?.toDouble(),
|
||||
chainKilledQuantity: (json['chain_killed_quantity'] as num?)?.toDouble(),
|
||||
chainKilledWeight: (json['chain_killed_weight'] as num?)?.toDouble(),
|
||||
outProvinceKilledWeight: (json['out_province_killed_weight'] as num?)
|
||||
?.toDouble(),
|
||||
outProvinceKilledQuantity: (json['out_province_killed_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
exportKilledWeight: (json['export_killed_weight'] as num?)?.toDouble(),
|
||||
exportKilledQuantity: (json['export_killed_quantity'] as num?)?.toDouble(),
|
||||
totalCommitment: (json['total_commitment'] as num?)?.toDouble(),
|
||||
commitmentType: json['commitment_type'] as String?,
|
||||
totalCommitmentQuantity: (json['total_commitment_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
totalFreeCommitmentQuantity: (json['total_free_commitment_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
totalFreeCommitmentWeight: (json['total_free_commitment_weight'] as num?)
|
||||
?.toDouble(),
|
||||
totalKilledWeight: (json['total_killed_weight'] as num?)?.toDouble(),
|
||||
totalAverageKilledWeight: (json['total_average_killed_weight'] as num?)
|
||||
?.toDouble(),
|
||||
requestLeftOver: (json['request_left_over'] as num?)?.toInt(),
|
||||
hall: (json['hall'] as num?)?.toInt(),
|
||||
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
|
||||
predicateDate: json['predicate_date'] == null
|
||||
? null
|
||||
: DateTime.parse(json['predicate_date'] as String),
|
||||
chickenBreed: json['chicken_breed'] as String?,
|
||||
period: (json['period'] as num?)?.toInt(),
|
||||
allowHatching: json['allow_hatching'] as String?,
|
||||
state: json['state'] as String?,
|
||||
archive: json['archive'] as bool?,
|
||||
violation: json['violation'] as bool?,
|
||||
message: json['message'],
|
||||
registrar: json['registrar'],
|
||||
breed: (json['breed'] as List<dynamic>?)
|
||||
?.map((e) => Breed.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
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?,
|
||||
lastChange: json['last_change'] == null
|
||||
? null
|
||||
: LastChange.fromJson(json['last_change'] as Map<String, dynamic>),
|
||||
chickenAge: (json['chicken_age'] as num?)?.toInt(),
|
||||
nowAge: (json['now_age'] as num?)?.toInt(),
|
||||
latestHatchingChange: json['latest_hatching_change'] == null
|
||||
? null
|
||||
: LatestHatchingChange.fromJson(
|
||||
json['latest_hatching_change'] as Map<String, dynamic>,
|
||||
),
|
||||
violationReport: json['violation_report'],
|
||||
violationMessage: json['violation_message'] as String?,
|
||||
violationImage: json['violation_image'],
|
||||
violationReporter: json['violation_reporter'],
|
||||
violationReportDate: json['violation_report_date'],
|
||||
violationReportEditor: json['violation_report_editor'],
|
||||
violationReportEditDate: json['violation_report_edit_date'],
|
||||
totalLosses: (json['total_losses'] as num?)?.toInt(),
|
||||
directLosses: (json['direct_losses'] as num?)?.toInt(),
|
||||
directLossesInputer: json['direct_losses_inputer'],
|
||||
directLossesDate: json['direct_losses_date'],
|
||||
directLossesEditor: json['direct_losses_editor'],
|
||||
directLossesLastEditDate: json['direct_losses_last_edit_date'],
|
||||
endPeriodLossesInputer: json['end_period_losses_inputer'],
|
||||
endPeriodLossesDate: json['end_period_losses_date'],
|
||||
endPeriodLossesEditor: json['end_period_losses_editor'],
|
||||
endPeriodLossesLastEditDate: json['end_period_losses_last_edit_date'],
|
||||
breedingUniqueId: json['breeding_unique_id'] as String?,
|
||||
licenceNumber: json['licence_number'] as String?,
|
||||
temporaryTrash: json['temporary_trash'] as bool?,
|
||||
temporaryDeleted: json['temporary_deleted'] as bool?,
|
||||
firstDateInputArchive: json['first_date_input_archive'],
|
||||
secondDateInputArchive: json['second_date_input_archive'],
|
||||
inputArchiver: json['input_archiver'],
|
||||
outputArchiveDate: json['output_archive_date'],
|
||||
outputArchiver: json['output_archiver'],
|
||||
barDifferenceRequestWeight: (json['bar_difference_request_weight'] as num?)
|
||||
?.toDouble(),
|
||||
barDifferenceRequestQuantity:
|
||||
(json['bar_difference_request_quantity'] as num?)?.toDouble(),
|
||||
healthCertificate: json['health_certificate'],
|
||||
samasatDischargePercentage: (json['samasat_discharge_percentage'] as num?)
|
||||
?.toInt(),
|
||||
personTypeName: json['person_type_name'] as String?,
|
||||
interactTypeName: json['interact_type_name'] as String?,
|
||||
unionTypeName: json['union_type_name'] as String?,
|
||||
certId: json['cert_id'] as String?,
|
||||
increaseQuantity: (json['increase_quantity'] as num?)?.toInt(),
|
||||
tenantFullname: json['tenant_fullname'],
|
||||
tenantNationalCode: json['tenant_national_code'],
|
||||
tenantMobile: json['tenant_mobile'],
|
||||
tenantCity: json['tenant_city'],
|
||||
hasTenant: json['has_tenant'] as bool?,
|
||||
createdBy: json['created_by'],
|
||||
modifiedBy: json['modified_by'],
|
||||
poultry: (json['poultry'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$HatchingDetailsToJson(_HatchingDetails instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'chain_company': instance.chainCompany,
|
||||
'age': instance.age,
|
||||
'inspection_losses': instance.inspectionLosses,
|
||||
'vet_farm': instance.vetFarm,
|
||||
'active_kill': instance.activeKill,
|
||||
'killing_info': instance.killingInfo,
|
||||
'free_governmental_info': instance.freeGovernmentalInfo,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate?.toIso8601String(),
|
||||
'modify_date': instance.modifyDate?.toIso8601String(),
|
||||
'trash': instance.trash,
|
||||
'has_chain_company': instance.hasChainCompany,
|
||||
'poultry_id_foreign_key': instance.poultryIdForeignKey,
|
||||
'poultry_hatching_id_key': instance.poultryHatchingIdKey,
|
||||
'quantity': instance.quantity,
|
||||
'losses': instance.losses,
|
||||
'left_over': instance.leftOver,
|
||||
'killed_quantity': instance.killedQuantity,
|
||||
'extra_killed_quantity': instance.extraKilledQuantity,
|
||||
'governmental_killed_quantity': instance.governmentalKilledQuantity,
|
||||
'governmental_quantity': instance.governmentalQuantity,
|
||||
'free_killed_quantity': instance.freeKilledQuantity,
|
||||
'free_quantity': instance.freeQuantity,
|
||||
'chain_killed_quantity': instance.chainKilledQuantity,
|
||||
'chain_killed_weight': instance.chainKilledWeight,
|
||||
'out_province_killed_weight': instance.outProvinceKilledWeight,
|
||||
'out_province_killed_quantity': instance.outProvinceKilledQuantity,
|
||||
'export_killed_weight': instance.exportKilledWeight,
|
||||
'export_killed_quantity': instance.exportKilledQuantity,
|
||||
'total_commitment': instance.totalCommitment,
|
||||
'commitment_type': instance.commitmentType,
|
||||
'total_commitment_quantity': instance.totalCommitmentQuantity,
|
||||
'total_free_commitment_quantity': instance.totalFreeCommitmentQuantity,
|
||||
'total_free_commitment_weight': instance.totalFreeCommitmentWeight,
|
||||
'total_killed_weight': instance.totalKilledWeight,
|
||||
'total_average_killed_weight': instance.totalAverageKilledWeight,
|
||||
'request_left_over': instance.requestLeftOver,
|
||||
'hall': instance.hall,
|
||||
'date': instance.date?.toIso8601String(),
|
||||
'predicate_date': instance.predicateDate?.toIso8601String(),
|
||||
'chicken_breed': instance.chickenBreed,
|
||||
'period': instance.period,
|
||||
'allow_hatching': instance.allowHatching,
|
||||
'state': instance.state,
|
||||
'archive': instance.archive,
|
||||
'violation': instance.violation,
|
||||
'message': instance.message,
|
||||
'registrar': instance.registrar,
|
||||
'breed': instance.breed,
|
||||
'city_number': instance.cityNumber,
|
||||
'city_name': instance.cityName,
|
||||
'province_number': instance.provinceNumber,
|
||||
'province_name': instance.provinceName,
|
||||
'last_change': instance.lastChange,
|
||||
'chicken_age': instance.chickenAge,
|
||||
'now_age': instance.nowAge,
|
||||
'latest_hatching_change': instance.latestHatchingChange,
|
||||
'violation_report': instance.violationReport,
|
||||
'violation_message': instance.violationMessage,
|
||||
'violation_image': instance.violationImage,
|
||||
'violation_reporter': instance.violationReporter,
|
||||
'violation_report_date': instance.violationReportDate,
|
||||
'violation_report_editor': instance.violationReportEditor,
|
||||
'violation_report_edit_date': instance.violationReportEditDate,
|
||||
'total_losses': instance.totalLosses,
|
||||
'direct_losses': instance.directLosses,
|
||||
'direct_losses_inputer': instance.directLossesInputer,
|
||||
'direct_losses_date': instance.directLossesDate,
|
||||
'direct_losses_editor': instance.directLossesEditor,
|
||||
'direct_losses_last_edit_date': instance.directLossesLastEditDate,
|
||||
'end_period_losses_inputer': instance.endPeriodLossesInputer,
|
||||
'end_period_losses_date': instance.endPeriodLossesDate,
|
||||
'end_period_losses_editor': instance.endPeriodLossesEditor,
|
||||
'end_period_losses_last_edit_date': instance.endPeriodLossesLastEditDate,
|
||||
'breeding_unique_id': instance.breedingUniqueId,
|
||||
'licence_number': instance.licenceNumber,
|
||||
'temporary_trash': instance.temporaryTrash,
|
||||
'temporary_deleted': instance.temporaryDeleted,
|
||||
'first_date_input_archive': instance.firstDateInputArchive,
|
||||
'second_date_input_archive': instance.secondDateInputArchive,
|
||||
'input_archiver': instance.inputArchiver,
|
||||
'output_archive_date': instance.outputArchiveDate,
|
||||
'output_archiver': instance.outputArchiver,
|
||||
'bar_difference_request_weight': instance.barDifferenceRequestWeight,
|
||||
'bar_difference_request_quantity': instance.barDifferenceRequestQuantity,
|
||||
'health_certificate': instance.healthCertificate,
|
||||
'samasat_discharge_percentage': instance.samasatDischargePercentage,
|
||||
'person_type_name': instance.personTypeName,
|
||||
'interact_type_name': instance.interactTypeName,
|
||||
'union_type_name': instance.unionTypeName,
|
||||
'cert_id': instance.certId,
|
||||
'increase_quantity': instance.increaseQuantity,
|
||||
'tenant_fullname': instance.tenantFullname,
|
||||
'tenant_national_code': instance.tenantNationalCode,
|
||||
'tenant_mobile': instance.tenantMobile,
|
||||
'tenant_city': instance.tenantCity,
|
||||
'has_tenant': instance.hasTenant,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
'poultry': instance.poultry,
|
||||
};
|
||||
|
||||
_VetFarm _$VetFarmFromJson(Map<String, dynamic> json) => _VetFarm(
|
||||
vetFarmFullName: json['vet_farm_full_name'] as String?,
|
||||
vetFarmMobile: json['vet_farm_mobile'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$VetFarmToJson(_VetFarm instance) => <String, dynamic>{
|
||||
'vet_farm_full_name': instance.vetFarmFullName,
|
||||
'vet_farm_mobile': instance.vetFarmMobile,
|
||||
};
|
||||
|
||||
_ActiveKill _$ActiveKillFromJson(Map<String, dynamic> json) => _ActiveKill(
|
||||
activeKill: json['active_kill'] as bool?,
|
||||
countOfRequest: (json['count_of_request'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ActiveKillToJson(_ActiveKill instance) =>
|
||||
<String, dynamic>{
|
||||
'active_kill': instance.activeKill,
|
||||
'count_of_request': instance.countOfRequest,
|
||||
};
|
||||
|
||||
_KillingInfo _$KillingInfoFromJson(Map<String, dynamic> json) => _KillingInfo(
|
||||
violationMessage: json['violation_message'] as String?,
|
||||
provinceKillRequests: (json['province_kill_requests'] as num?)?.toInt(),
|
||||
provinceKillRequestsQuantity:
|
||||
(json['province_kill_requests_quantity'] as num?)?.toInt(),
|
||||
provinceKillRequestsWeight: (json['province_kill_requests_weight'] as num?)
|
||||
?.toDouble(),
|
||||
killHouseRequests: (json['kill_house_requests'] as num?)?.toInt(),
|
||||
killHouseRequestsFirstQuantity:
|
||||
(json['kill_house_requests_first_quantity'] as num?)?.toInt(),
|
||||
killHouseRequestsFirstWeight:
|
||||
(json['kill_house_requests_first_weight'] as num?)?.toDouble(),
|
||||
barCompleteWithKillHouse: (json['bar_complete_with_kill_house'] as num?)
|
||||
?.toInt(),
|
||||
acceptedRealQuantityFinal: (json['accepted_real_quantity_final'] as num?)
|
||||
?.toInt(),
|
||||
acceptedRealWightFinal: (json['accepted_real_wight_final'] as num?)
|
||||
?.toDouble(),
|
||||
wareHouseBars: (json['ware_house_bars'] as num?)?.toInt(),
|
||||
wareHouseBarsQuantity: (json['ware_house_bars_quantity'] as num?)?.toInt(),
|
||||
wareHouseBarsWeight: (json['ware_house_bars_weight'] as num?)?.toDouble(),
|
||||
wareHouseBarsWeightLose: (json['ware_house_bars_weight_lose'] as num?)
|
||||
?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillingInfoToJson(
|
||||
_KillingInfo instance,
|
||||
) => <String, dynamic>{
|
||||
'violation_message': instance.violationMessage,
|
||||
'province_kill_requests': instance.provinceKillRequests,
|
||||
'province_kill_requests_quantity': instance.provinceKillRequestsQuantity,
|
||||
'province_kill_requests_weight': instance.provinceKillRequestsWeight,
|
||||
'kill_house_requests': instance.killHouseRequests,
|
||||
'kill_house_requests_first_quantity': instance.killHouseRequestsFirstQuantity,
|
||||
'kill_house_requests_first_weight': instance.killHouseRequestsFirstWeight,
|
||||
'bar_complete_with_kill_house': instance.barCompleteWithKillHouse,
|
||||
'accepted_real_quantity_final': instance.acceptedRealQuantityFinal,
|
||||
'accepted_real_wight_final': instance.acceptedRealWightFinal,
|
||||
'ware_house_bars': instance.wareHouseBars,
|
||||
'ware_house_bars_quantity': instance.wareHouseBarsQuantity,
|
||||
'ware_house_bars_weight': instance.wareHouseBarsWeight,
|
||||
'ware_house_bars_weight_lose': instance.wareHouseBarsWeightLose,
|
||||
};
|
||||
|
||||
_FreeGovernmentalInfo _$FreeGovernmentalInfoFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _FreeGovernmentalInfo(
|
||||
governmentalAllocatedQuantity:
|
||||
(json['governmental_allocated_quantity'] as num?)?.toInt(),
|
||||
totalCommitmentQuantity: (json['total_commitment_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
freeAllocatedQuantity: (json['free_allocated_quantity'] as num?)?.toInt(),
|
||||
totalFreeCommitmentQuantity: (json['total_free_commitment_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
leftTotalFreeCommitmentQuantity:
|
||||
(json['left_total_free_commitment_quantity'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$FreeGovernmentalInfoToJson(
|
||||
_FreeGovernmentalInfo instance,
|
||||
) => <String, dynamic>{
|
||||
'governmental_allocated_quantity': instance.governmentalAllocatedQuantity,
|
||||
'total_commitment_quantity': instance.totalCommitmentQuantity,
|
||||
'free_allocated_quantity': instance.freeAllocatedQuantity,
|
||||
'total_free_commitment_quantity': instance.totalFreeCommitmentQuantity,
|
||||
'left_total_free_commitment_quantity':
|
||||
instance.leftTotalFreeCommitmentQuantity,
|
||||
};
|
||||
|
||||
_Breed _$BreedFromJson(Map<String, dynamic> json) => _Breed(
|
||||
breed: json['breed'] as String?,
|
||||
mainQuantity: (json['main_quantity'] as num?)?.toInt(),
|
||||
remainQuantity: (json['remain_quantity'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BreedToJson(_Breed instance) => <String, dynamic>{
|
||||
'breed': instance.breed,
|
||||
'main_quantity': instance.mainQuantity,
|
||||
'remain_quantity': instance.remainQuantity,
|
||||
};
|
||||
|
||||
_LastChange _$LastChangeFromJson(Map<String, dynamic> json) => _LastChange(
|
||||
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
|
||||
role: json['role'] as String?,
|
||||
type: json['type'] as String?,
|
||||
fullName: json['full_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$LastChangeToJson(_LastChange instance) =>
|
||||
<String, dynamic>{
|
||||
'date': instance.date?.toIso8601String(),
|
||||
'role': instance.role,
|
||||
'type': instance.type,
|
||||
'full_name': instance.fullName,
|
||||
};
|
||||
|
||||
_LatestHatchingChange _$LatestHatchingChangeFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _LatestHatchingChange(
|
||||
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
|
||||
role: json['role'] as String?,
|
||||
fullName: json['full_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$LatestHatchingChangeToJson(
|
||||
_LatestHatchingChange instance,
|
||||
) => <String, dynamic>{
|
||||
'date': instance.date?.toIso8601String(),
|
||||
'role': instance.role,
|
||||
'full_name': instance.fullName,
|
||||
};
|
||||
@@ -15,6 +15,7 @@ abstract class PoultryLocationModel with _$PoultryLocationModel {
|
||||
User? user,
|
||||
List<Hatching>? hatching,
|
||||
Address? address,
|
||||
String? breedingUniqueId,
|
||||
}) = _PoultryLocationModel;
|
||||
|
||||
factory PoultryLocationModel.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -34,13 +35,12 @@ abstract class User with _$User {
|
||||
@freezed
|
||||
abstract class Hatching with _$Hatching {
|
||||
const factory Hatching({
|
||||
int? quantity,
|
||||
|
||||
int? leftOver,
|
||||
int? period,
|
||||
int? chickenAge,
|
||||
DateTime? date,
|
||||
bool?violation,
|
||||
bool?archive,
|
||||
String? licenceNumber,
|
||||
|
||||
}) = _Hatching;
|
||||
|
||||
factory Hatching.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$PoultryLocationModel {
|
||||
|
||||
int? get id; String? get unitName;@JsonKey(name: 'Lat') double? get lat;@JsonKey(name: 'Long') double? get long; User? get user; List<Hatching>? get hatching; Address? get address;
|
||||
int? get id; String? get unitName;@JsonKey(name: 'Lat') double? get lat;@JsonKey(name: 'Long') double? get long; User? get user; List<Hatching>? get hatching; Address? get address; String? get breedingUniqueId;
|
||||
/// Create a copy of PoultryLocationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $PoultryLocationModelCopyWith<PoultryLocationModel> get copyWith => _$PoultryLoc
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is PoultryLocationModel&&(identical(other.id, id) || other.id == id)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.long, long) || other.long == long)&&(identical(other.user, user) || other.user == user)&&const DeepCollectionEquality().equals(other.hatching, hatching)&&(identical(other.address, address) || other.address == address));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is PoultryLocationModel&&(identical(other.id, id) || other.id == id)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.long, long) || other.long == long)&&(identical(other.user, user) || other.user == user)&&const DeepCollectionEquality().equals(other.hatching, hatching)&&(identical(other.address, address) || other.address == address)&&(identical(other.breedingUniqueId, breedingUniqueId) || other.breedingUniqueId == breedingUniqueId));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,unitName,lat,long,user,const DeepCollectionEquality().hash(hatching),address);
|
||||
int get hashCode => Object.hash(runtimeType,id,unitName,lat,long,user,const DeepCollectionEquality().hash(hatching),address,breedingUniqueId);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PoultryLocationModel(id: $id, unitName: $unitName, lat: $lat, long: $long, user: $user, hatching: $hatching, address: $address)';
|
||||
return 'PoultryLocationModel(id: $id, unitName: $unitName, lat: $lat, long: $long, user: $user, hatching: $hatching, address: $address, breedingUniqueId: $breedingUniqueId)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $PoultryLocationModelCopyWith<$Res> {
|
||||
factory $PoultryLocationModelCopyWith(PoultryLocationModel value, $Res Function(PoultryLocationModel) _then) = _$PoultryLocationModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int? id, String? unitName,@JsonKey(name: 'Lat') double? lat,@JsonKey(name: 'Long') double? long, User? user, List<Hatching>? hatching, Address? address
|
||||
int? id, String? unitName,@JsonKey(name: 'Lat') double? lat,@JsonKey(name: 'Long') double? long, User? user, List<Hatching>? hatching, Address? address, String? breedingUniqueId
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$PoultryLocationModelCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of PoultryLocationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? unitName = freezed,Object? lat = freezed,Object? long = freezed,Object? user = freezed,Object? hatching = freezed,Object? address = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? unitName = freezed,Object? lat = freezed,Object? long = freezed,Object? user = freezed,Object? hatching = freezed,Object? address = freezed,Object? breedingUniqueId = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
|
||||
@@ -74,7 +74,8 @@ as double?,long: freezed == long ? _self.long : long // ignore: cast_nullable_to
|
||||
as double?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
|
||||
as User?,hatching: freezed == hatching ? _self.hatching : hatching // ignore: cast_nullable_to_non_nullable
|
||||
as List<Hatching>?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
|
||||
as Address?,
|
||||
as Address?,breedingUniqueId: freezed == breedingUniqueId ? _self.breedingUniqueId : breedingUniqueId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of PoultryLocationModel
|
||||
@@ -183,10 +184,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? id, String? unitName, @JsonKey(name: 'Lat') double? lat, @JsonKey(name: 'Long') double? long, User? user, List<Hatching>? hatching, Address? address)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? id, String? unitName, @JsonKey(name: 'Lat') double? lat, @JsonKey(name: 'Long') double? long, User? user, List<Hatching>? hatching, Address? address, String? breedingUniqueId)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PoultryLocationModel() when $default != null:
|
||||
return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.hatching,_that.address);case _:
|
||||
return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.hatching,_that.address,_that.breedingUniqueId);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -204,10 +205,10 @@ return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.ha
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? id, String? unitName, @JsonKey(name: 'Lat') double? lat, @JsonKey(name: 'Long') double? long, User? user, List<Hatching>? hatching, Address? address) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? id, String? unitName, @JsonKey(name: 'Lat') double? lat, @JsonKey(name: 'Long') double? long, User? user, List<Hatching>? hatching, Address? address, String? breedingUniqueId) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PoultryLocationModel():
|
||||
return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.hatching,_that.address);case _:
|
||||
return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.hatching,_that.address,_that.breedingUniqueId);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -224,10 +225,10 @@ return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.ha
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? id, String? unitName, @JsonKey(name: 'Lat') double? lat, @JsonKey(name: 'Long') double? long, User? user, List<Hatching>? hatching, Address? address)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? id, String? unitName, @JsonKey(name: 'Lat') double? lat, @JsonKey(name: 'Long') double? long, User? user, List<Hatching>? hatching, Address? address, String? breedingUniqueId)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PoultryLocationModel() when $default != null:
|
||||
return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.hatching,_that.address);case _:
|
||||
return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.hatching,_that.address,_that.breedingUniqueId);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -239,7 +240,7 @@ return $default(_that.id,_that.unitName,_that.lat,_that.long,_that.user,_that.ha
|
||||
@JsonSerializable()
|
||||
|
||||
class _PoultryLocationModel implements PoultryLocationModel {
|
||||
const _PoultryLocationModel({this.id, this.unitName, @JsonKey(name: 'Lat') this.lat, @JsonKey(name: 'Long') this.long, this.user, final List<Hatching>? hatching, this.address}): _hatching = hatching;
|
||||
const _PoultryLocationModel({this.id, this.unitName, @JsonKey(name: 'Lat') this.lat, @JsonKey(name: 'Long') this.long, this.user, final List<Hatching>? hatching, this.address, this.breedingUniqueId}): _hatching = hatching;
|
||||
factory _PoultryLocationModel.fromJson(Map<String, dynamic> json) => _$PoultryLocationModelFromJson(json);
|
||||
|
||||
@override final int? id;
|
||||
@@ -257,6 +258,7 @@ class _PoultryLocationModel implements PoultryLocationModel {
|
||||
}
|
||||
|
||||
@override final Address? address;
|
||||
@override final String? breedingUniqueId;
|
||||
|
||||
/// Create a copy of PoultryLocationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -271,16 +273,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PoultryLocationModel&&(identical(other.id, id) || other.id == id)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.long, long) || other.long == long)&&(identical(other.user, user) || other.user == user)&&const DeepCollectionEquality().equals(other._hatching, _hatching)&&(identical(other.address, address) || other.address == address));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PoultryLocationModel&&(identical(other.id, id) || other.id == id)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.long, long) || other.long == long)&&(identical(other.user, user) || other.user == user)&&const DeepCollectionEquality().equals(other._hatching, _hatching)&&(identical(other.address, address) || other.address == address)&&(identical(other.breedingUniqueId, breedingUniqueId) || other.breedingUniqueId == breedingUniqueId));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,id,unitName,lat,long,user,const DeepCollectionEquality().hash(_hatching),address);
|
||||
int get hashCode => Object.hash(runtimeType,id,unitName,lat,long,user,const DeepCollectionEquality().hash(_hatching),address,breedingUniqueId);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PoultryLocationModel(id: $id, unitName: $unitName, lat: $lat, long: $long, user: $user, hatching: $hatching, address: $address)';
|
||||
return 'PoultryLocationModel(id: $id, unitName: $unitName, lat: $lat, long: $long, user: $user, hatching: $hatching, address: $address, breedingUniqueId: $breedingUniqueId)';
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +293,7 @@ abstract mixin class _$PoultryLocationModelCopyWith<$Res> implements $PoultryLoc
|
||||
factory _$PoultryLocationModelCopyWith(_PoultryLocationModel value, $Res Function(_PoultryLocationModel) _then) = __$PoultryLocationModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int? id, String? unitName,@JsonKey(name: 'Lat') double? lat,@JsonKey(name: 'Long') double? long, User? user, List<Hatching>? hatching, Address? address
|
||||
int? id, String? unitName,@JsonKey(name: 'Lat') double? lat,@JsonKey(name: 'Long') double? long, User? user, List<Hatching>? hatching, Address? address, String? breedingUniqueId
|
||||
});
|
||||
|
||||
|
||||
@@ -308,7 +310,7 @@ class __$PoultryLocationModelCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of PoultryLocationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? unitName = freezed,Object? lat = freezed,Object? long = freezed,Object? user = freezed,Object? hatching = freezed,Object? address = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? unitName = freezed,Object? lat = freezed,Object? long = freezed,Object? user = freezed,Object? hatching = freezed,Object? address = freezed,Object? breedingUniqueId = freezed,}) {
|
||||
return _then(_PoultryLocationModel(
|
||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
|
||||
@@ -317,7 +319,8 @@ as double?,long: freezed == long ? _self.long : long // ignore: cast_nullable_to
|
||||
as double?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
|
||||
as User?,hatching: freezed == hatching ? _self._hatching : hatching // ignore: cast_nullable_to_non_nullable
|
||||
as List<Hatching>?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
|
||||
as Address?,
|
||||
as Address?,breedingUniqueId: freezed == breedingUniqueId ? _self.breedingUniqueId : breedingUniqueId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -618,7 +621,7 @@ as String?,
|
||||
/// @nodoc
|
||||
mixin _$Hatching {
|
||||
|
||||
int? get quantity; int? get leftOver; int? get period; int? get chickenAge; DateTime? get date; bool? get violation; bool? get archive;
|
||||
int? get leftOver; int? get chickenAge; DateTime? get date; String? get licenceNumber;
|
||||
/// Create a copy of Hatching
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -631,16 +634,16 @@ $HatchingCopyWith<Hatching> get copyWith => _$HatchingCopyWithImpl<Hatching>(thi
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is Hatching&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.leftOver, leftOver) || other.leftOver == leftOver)&&(identical(other.period, period) || other.period == period)&&(identical(other.chickenAge, chickenAge) || other.chickenAge == chickenAge)&&(identical(other.date, date) || other.date == date)&&(identical(other.violation, violation) || other.violation == violation)&&(identical(other.archive, archive) || other.archive == archive));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is Hatching&&(identical(other.leftOver, leftOver) || other.leftOver == leftOver)&&(identical(other.chickenAge, chickenAge) || other.chickenAge == chickenAge)&&(identical(other.date, date) || other.date == date)&&(identical(other.licenceNumber, licenceNumber) || other.licenceNumber == licenceNumber));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,quantity,leftOver,period,chickenAge,date,violation,archive);
|
||||
int get hashCode => Object.hash(runtimeType,leftOver,chickenAge,date,licenceNumber);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Hatching(quantity: $quantity, leftOver: $leftOver, period: $period, chickenAge: $chickenAge, date: $date, violation: $violation, archive: $archive)';
|
||||
return 'Hatching(leftOver: $leftOver, chickenAge: $chickenAge, date: $date, licenceNumber: $licenceNumber)';
|
||||
}
|
||||
|
||||
|
||||
@@ -651,7 +654,7 @@ abstract mixin class $HatchingCopyWith<$Res> {
|
||||
factory $HatchingCopyWith(Hatching value, $Res Function(Hatching) _then) = _$HatchingCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int? quantity, int? leftOver, int? period, int? chickenAge, DateTime? date, bool? violation, bool? archive
|
||||
int? leftOver, int? chickenAge, DateTime? date, String? licenceNumber
|
||||
});
|
||||
|
||||
|
||||
@@ -668,16 +671,13 @@ class _$HatchingCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of Hatching
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? quantity = freezed,Object? leftOver = freezed,Object? period = freezed,Object? chickenAge = freezed,Object? date = freezed,Object? violation = freezed,Object? archive = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? leftOver = freezed,Object? chickenAge = freezed,Object? date = freezed,Object? licenceNumber = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,leftOver: freezed == leftOver ? _self.leftOver : leftOver // ignore: cast_nullable_to_non_nullable
|
||||
as int?,period: freezed == period ? _self.period : period // ignore: cast_nullable_to_non_nullable
|
||||
leftOver: freezed == leftOver ? _self.leftOver : leftOver // ignore: cast_nullable_to_non_nullable
|
||||
as int?,chickenAge: freezed == chickenAge ? _self.chickenAge : chickenAge // ignore: cast_nullable_to_non_nullable
|
||||
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,violation: freezed == violation ? _self.violation : violation // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,archive: freezed == archive ? _self.archive : archive // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
as DateTime?,licenceNumber: freezed == licenceNumber ? _self.licenceNumber : licenceNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -762,10 +762,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? quantity, int? leftOver, int? period, int? chickenAge, DateTime? date, bool? violation, bool? archive)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? leftOver, int? chickenAge, DateTime? date, String? licenceNumber)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Hatching() when $default != null:
|
||||
return $default(_that.quantity,_that.leftOver,_that.period,_that.chickenAge,_that.date,_that.violation,_that.archive);case _:
|
||||
return $default(_that.leftOver,_that.chickenAge,_that.date,_that.licenceNumber);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -783,10 +783,10 @@ return $default(_that.quantity,_that.leftOver,_that.period,_that.chickenAge,_tha
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? quantity, int? leftOver, int? period, int? chickenAge, DateTime? date, bool? violation, bool? archive) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? leftOver, int? chickenAge, DateTime? date, String? licenceNumber) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Hatching():
|
||||
return $default(_that.quantity,_that.leftOver,_that.period,_that.chickenAge,_that.date,_that.violation,_that.archive);case _:
|
||||
return $default(_that.leftOver,_that.chickenAge,_that.date,_that.licenceNumber);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -803,10 +803,10 @@ return $default(_that.quantity,_that.leftOver,_that.period,_that.chickenAge,_tha
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? quantity, int? leftOver, int? period, int? chickenAge, DateTime? date, bool? violation, bool? archive)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? leftOver, int? chickenAge, DateTime? date, String? licenceNumber)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Hatching() when $default != null:
|
||||
return $default(_that.quantity,_that.leftOver,_that.period,_that.chickenAge,_that.date,_that.violation,_that.archive);case _:
|
||||
return $default(_that.leftOver,_that.chickenAge,_that.date,_that.licenceNumber);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -818,16 +818,13 @@ return $default(_that.quantity,_that.leftOver,_that.period,_that.chickenAge,_tha
|
||||
@JsonSerializable()
|
||||
|
||||
class _Hatching implements Hatching {
|
||||
const _Hatching({this.quantity, this.leftOver, this.period, this.chickenAge, this.date, this.violation, this.archive});
|
||||
const _Hatching({this.leftOver, this.chickenAge, this.date, this.licenceNumber});
|
||||
factory _Hatching.fromJson(Map<String, dynamic> json) => _$HatchingFromJson(json);
|
||||
|
||||
@override final int? quantity;
|
||||
@override final int? leftOver;
|
||||
@override final int? period;
|
||||
@override final int? chickenAge;
|
||||
@override final DateTime? date;
|
||||
@override final bool? violation;
|
||||
@override final bool? archive;
|
||||
@override final String? licenceNumber;
|
||||
|
||||
/// Create a copy of Hatching
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -842,16 +839,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Hatching&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.leftOver, leftOver) || other.leftOver == leftOver)&&(identical(other.period, period) || other.period == period)&&(identical(other.chickenAge, chickenAge) || other.chickenAge == chickenAge)&&(identical(other.date, date) || other.date == date)&&(identical(other.violation, violation) || other.violation == violation)&&(identical(other.archive, archive) || other.archive == archive));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Hatching&&(identical(other.leftOver, leftOver) || other.leftOver == leftOver)&&(identical(other.chickenAge, chickenAge) || other.chickenAge == chickenAge)&&(identical(other.date, date) || other.date == date)&&(identical(other.licenceNumber, licenceNumber) || other.licenceNumber == licenceNumber));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,quantity,leftOver,period,chickenAge,date,violation,archive);
|
||||
int get hashCode => Object.hash(runtimeType,leftOver,chickenAge,date,licenceNumber);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Hatching(quantity: $quantity, leftOver: $leftOver, period: $period, chickenAge: $chickenAge, date: $date, violation: $violation, archive: $archive)';
|
||||
return 'Hatching(leftOver: $leftOver, chickenAge: $chickenAge, date: $date, licenceNumber: $licenceNumber)';
|
||||
}
|
||||
|
||||
|
||||
@@ -862,7 +859,7 @@ abstract mixin class _$HatchingCopyWith<$Res> implements $HatchingCopyWith<$Res>
|
||||
factory _$HatchingCopyWith(_Hatching value, $Res Function(_Hatching) _then) = __$HatchingCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int? quantity, int? leftOver, int? period, int? chickenAge, DateTime? date, bool? violation, bool? archive
|
||||
int? leftOver, int? chickenAge, DateTime? date, String? licenceNumber
|
||||
});
|
||||
|
||||
|
||||
@@ -879,16 +876,13 @@ class __$HatchingCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of Hatching
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? quantity = freezed,Object? leftOver = freezed,Object? period = freezed,Object? chickenAge = freezed,Object? date = freezed,Object? violation = freezed,Object? archive = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? leftOver = freezed,Object? chickenAge = freezed,Object? date = freezed,Object? licenceNumber = freezed,}) {
|
||||
return _then(_Hatching(
|
||||
quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,leftOver: freezed == leftOver ? _self.leftOver : leftOver // ignore: cast_nullable_to_non_nullable
|
||||
as int?,period: freezed == period ? _self.period : period // ignore: cast_nullable_to_non_nullable
|
||||
leftOver: freezed == leftOver ? _self.leftOver : leftOver // ignore: cast_nullable_to_non_nullable
|
||||
as int?,chickenAge: freezed == chickenAge ? _self.chickenAge : chickenAge // ignore: cast_nullable_to_non_nullable
|
||||
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,violation: freezed == violation ? _self.violation : violation // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,archive: freezed == archive ? _self.archive : archive // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
as DateTime?,licenceNumber: freezed == licenceNumber ? _self.licenceNumber : licenceNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ _PoultryLocationModel _$PoultryLocationModelFromJson(
|
||||
address: json['address'] == null
|
||||
? null
|
||||
: Address.fromJson(json['address'] as Map<String, dynamic>),
|
||||
breedingUniqueId: json['breeding_unique_id'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryLocationModelToJson(
|
||||
@@ -34,6 +35,7 @@ Map<String, dynamic> _$PoultryLocationModelToJson(
|
||||
'user': instance.user,
|
||||
'hatching': instance.hatching,
|
||||
'address': instance.address,
|
||||
'breeding_unique_id': instance.breedingUniqueId,
|
||||
};
|
||||
|
||||
_User _$UserFromJson(Map<String, dynamic> json) => _User(
|
||||
@@ -47,23 +49,17 @@ Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
|
||||
};
|
||||
|
||||
_Hatching _$HatchingFromJson(Map<String, dynamic> json) => _Hatching(
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
leftOver: (json['left_over'] as num?)?.toInt(),
|
||||
period: (json['period'] as num?)?.toInt(),
|
||||
chickenAge: (json['chicken_age'] as num?)?.toInt(),
|
||||
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
|
||||
violation: json['violation'] as bool?,
|
||||
archive: json['archive'] as bool?,
|
||||
licenceNumber: json['licence_number'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$HatchingToJson(_Hatching instance) => <String, dynamic>{
|
||||
'quantity': instance.quantity,
|
||||
'left_over': instance.leftOver,
|
||||
'period': instance.period,
|
||||
'chicken_age': instance.chickenAge,
|
||||
'date': instance.date?.toIso8601String(),
|
||||
'violation': instance.violation,
|
||||
'archive': instance.archive,
|
||||
'licence_number': instance.licenceNumber,
|
||||
};
|
||||
|
||||
_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
|
||||
|
||||
Reference in New Issue
Block a user