update for chech in
This commit is contained in:
@ -16,7 +16,8 @@ class Destination {
|
||||
String? photos;
|
||||
double? checkin_radious;
|
||||
int? auto_checkin;
|
||||
bool selected = false;
|
||||
bool? selected = false;
|
||||
bool? checkedin = false;
|
||||
|
||||
Destination({
|
||||
this.name,
|
||||
@ -33,28 +34,40 @@ class Destination {
|
||||
this.list_order,
|
||||
this.photos,
|
||||
this.checkin_radious,
|
||||
this.auto_checkin
|
||||
this.auto_checkin,
|
||||
this.selected,
|
||||
this.checkedin
|
||||
});
|
||||
|
||||
factory Destination.fromMap(Map<String, dynamic> json) => Destination(
|
||||
name: json['name'],
|
||||
address: json['address'],
|
||||
phone: json['phone'],
|
||||
email: json['email'],
|
||||
webcontents: json['webcontents'],
|
||||
videos: json['videos'],
|
||||
category: json['category'],
|
||||
series: json['series'],
|
||||
lat: json['lat'],
|
||||
lon: json['lon'],
|
||||
location_id: json['location_id'],
|
||||
list_order: json['list_order'],
|
||||
photos: json['category'],
|
||||
checkin_radious: json['checkin_radious'],
|
||||
auto_checkin:json['auto_checkin']
|
||||
);
|
||||
factory Destination.fromMap(Map<String, dynamic> json) {
|
||||
|
||||
bool selec = json['selected'] == 0 ? false : true;
|
||||
bool checkin = json['checkedin'] == 0 ? false : true;
|
||||
|
||||
return Destination(
|
||||
name: json['name'],
|
||||
address: json['address'],
|
||||
phone: json['phone'],
|
||||
email: json['email'],
|
||||
webcontents: json['webcontents'],
|
||||
videos: json['videos'],
|
||||
category: json['category'],
|
||||
series: json['series'],
|
||||
lat: json['lat'],
|
||||
lon: json['lon'],
|
||||
location_id: json['location_id'],
|
||||
list_order: json['list_order'],
|
||||
photos: json['photos'],
|
||||
checkin_radious: json['checkin_radious'],
|
||||
auto_checkin:json['auto_checkin'],
|
||||
selected: selec,
|
||||
checkedin: checkin
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap(){
|
||||
int sel = selected == false ? 0 : 1;
|
||||
int check = checkedin == false ? 0 : 1;
|
||||
return {
|
||||
'name':name,
|
||||
'address': address,
|
||||
@ -70,7 +83,9 @@ class Destination {
|
||||
'list_order':list_order,
|
||||
'photos':photos,
|
||||
'checkin_radious': checkin_radious,
|
||||
'auto_checkin': auto_checkin
|
||||
'auto_checkin': auto_checkin,
|
||||
'selected': sel,
|
||||
'checkedin': check
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user