updated and fix checking, buy point
This commit is contained in:
@ -25,6 +25,8 @@ class Destination {
|
||||
int? hidden_location;
|
||||
String? checkin_image;
|
||||
String? buypoint_image;
|
||||
bool forced_checkin = false;
|
||||
int recipt_times = 0;
|
||||
|
||||
Destination({
|
||||
this.name,
|
||||
@ -50,13 +52,16 @@ class Destination {
|
||||
this.buy_point,
|
||||
this.hidden_location,
|
||||
this.checkin_image,
|
||||
this.buypoint_image
|
||||
this.buypoint_image,
|
||||
this.forced_checkin = false,
|
||||
this.recipt_times = 0
|
||||
});
|
||||
|
||||
factory Destination.fromMap(Map<String, dynamic> json) {
|
||||
|
||||
bool selec = json['selected'] == 0 ? false : true;
|
||||
bool checkin = json['checkedin'] == 0 ? false : true;
|
||||
bool _forced_checkin = json['forced_checkin'] == 0 ? false : true;
|
||||
|
||||
return Destination(
|
||||
name: json['name'],
|
||||
@ -82,13 +87,16 @@ class Destination {
|
||||
buy_point: json['buy_point'],
|
||||
hidden_location: json['hidden_location'],
|
||||
checkin_image: json['checkin_image'],
|
||||
buypoint_image: json["buypoint_image"]
|
||||
buypoint_image: json["buypoint_image"],
|
||||
forced_checkin: _forced_checkin,
|
||||
recipt_times: json["recipt_times"]
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap(){
|
||||
int sel = selected == false ? 0 : 1;
|
||||
int check = checkedin == false ? 0 : 1;
|
||||
int _forced_checkin = forced_checkin == false ? 0 : 1;
|
||||
return {
|
||||
'name':name,
|
||||
'address': address,
|
||||
@ -113,7 +121,9 @@ class Destination {
|
||||
'buy_point' : buy_point,
|
||||
'hidden_location' : hidden_location,
|
||||
'checkin_image': checkin_image,
|
||||
'buypoint_image' : buypoint_image
|
||||
'buypoint_image' : buypoint_image,
|
||||
'forced_checkin' : _forced_checkin,
|
||||
'recipt_times' : recipt_times
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user