feat : profile and map
This commit is contained in:
BIN
assets/vec/bg_auth.svg.vec
Normal file
BIN
assets/vec/bg_auth.svg.vec
Normal file
Binary file not shown.
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,
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,104 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'user_profile_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_UserProfileModel _$UserProfileModelFromJson(Map<String, dynamic> json) =>
|
||||
_UserProfileModel(
|
||||
user: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
role: Role.fromJson(json['role'] as Map<String, dynamic>),
|
||||
permissions: (json['permissions'] as List<dynamic>)
|
||||
.map((e) => Permission.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserProfileModelToJson(_UserProfileModel instance) =>
|
||||
<String, dynamic>{
|
||||
'user': instance.user,
|
||||
'role': instance.role,
|
||||
'permissions': instance.permissions,
|
||||
};
|
||||
|
||||
_User _$UserFromJson(Map<String, dynamic> json) => _User(
|
||||
id: (json['id'] as num).toInt(),
|
||||
username: json['username'] as String,
|
||||
password: json['password'] as String,
|
||||
firstName: json['first_name'] as String,
|
||||
lastName: json['last_name'] as String,
|
||||
isActive: json['is_active'] as bool,
|
||||
mobile: json['mobile'] as String,
|
||||
phone: json['phone'] as String,
|
||||
nationalCode: json['national_code'] as String,
|
||||
birthdate: DateTime.parse(json['birthdate'] as String),
|
||||
nationality: json['nationality'] as String,
|
||||
ownership: json['ownership'] as String,
|
||||
address: json['address'] as String,
|
||||
photo: json['photo'] as String,
|
||||
province: (json['province'] as num).toInt(),
|
||||
city: (json['city'] as num).toInt(),
|
||||
otpStatus: json['otp_status'] as bool,
|
||||
cityName: json['city_name'] as String,
|
||||
provinceName: json['province_name'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'username': instance.username,
|
||||
'password': instance.password,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'is_active': instance.isActive,
|
||||
'mobile': instance.mobile,
|
||||
'phone': instance.phone,
|
||||
'national_code': instance.nationalCode,
|
||||
'birthdate': instance.birthdate.toIso8601String(),
|
||||
'nationality': instance.nationality,
|
||||
'ownership': instance.ownership,
|
||||
'address': instance.address,
|
||||
'photo': instance.photo,
|
||||
'province': instance.province,
|
||||
'city': instance.city,
|
||||
'otp_status': instance.otpStatus,
|
||||
'city_name': instance.cityName,
|
||||
'province_name': instance.provinceName,
|
||||
};
|
||||
|
||||
_Role _$RoleFromJson(Map<String, dynamic> json) => _Role(
|
||||
id: (json['id'] as num).toInt(),
|
||||
roleName: json['role_name'] as String,
|
||||
description: json['description'] as String,
|
||||
type: RoleType.fromJson(json['type'] as Map<String, dynamic>),
|
||||
permissions: json['permissions'] as List<dynamic>,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$RoleToJson(_Role instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'role_name': instance.roleName,
|
||||
'description': instance.description,
|
||||
'type': instance.type,
|
||||
'permissions': instance.permissions,
|
||||
};
|
||||
|
||||
_RoleType _$RoleTypeFromJson(Map<String, dynamic> json) =>
|
||||
_RoleType(key: json['key'] as String?, name: json['name'] as String);
|
||||
|
||||
Map<String, dynamic> _$RoleTypeToJson(_RoleType instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
_Permission _$PermissionFromJson(Map<String, dynamic> json) => _Permission(
|
||||
pageName: json['page_name'] as String,
|
||||
pageAccess: (json['page_access'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PermissionToJson(_Permission instance) =>
|
||||
<String, dynamic>{
|
||||
'page_name': instance.pageName,
|
||||
'page_access': instance.pageAccess,
|
||||
};
|
||||
Reference in New Issue
Block a user