feat : profile and map
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,86 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'poultry_location_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_PoultryLocationModel _$PoultryLocationModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _PoultryLocationModel(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
unitName: json['unit_name'] as String?,
|
||||
lat: (json['Lat'] as num?)?.toDouble(),
|
||||
long: (json['Long'] as num?)?.toDouble(),
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
hatching: (json['hatching'] as List<dynamic>?)
|
||||
?.map((e) => Hatching.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
address: json['address'] == null
|
||||
? null
|
||||
: Address.fromJson(json['address'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryLocationModelToJson(
|
||||
_PoultryLocationModel instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'unit_name': instance.unitName,
|
||||
'Lat': instance.lat,
|
||||
'Long': instance.long,
|
||||
'user': instance.user,
|
||||
'hatching': instance.hatching,
|
||||
'address': instance.address,
|
||||
};
|
||||
|
||||
_User _$UserFromJson(Map<String, dynamic> json) => _User(
|
||||
fullname: json['fullname'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
|
||||
'fullname': instance.fullname,
|
||||
'mobile': instance.mobile,
|
||||
};
|
||||
|
||||
_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?,
|
||||
);
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: City.fromJson(json['city'] as Map<String, dynamic>),
|
||||
address: json['address'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
|
||||
'city': instance.city,
|
||||
'address': instance.address,
|
||||
};
|
||||
|
||||
_City _$CityFromJson(Map<String, dynamic> json) =>
|
||||
_City(name: json['name'] as String?);
|
||||
|
||||
Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
};
|
||||
Reference in New Issue
Block a user