update fixes
This commit is contained in:
@ -6,25 +6,30 @@ class GpsData {
|
||||
double lon;
|
||||
int is_checkin;
|
||||
int created_at;
|
||||
int is_synced;
|
||||
|
||||
GpsData(
|
||||
{required this.id,
|
||||
required this.team_name,
|
||||
required this.event_code,
|
||||
required this.lat,
|
||||
required this.lon,
|
||||
required this.created_at,
|
||||
this.is_checkin = 0});
|
||||
GpsData({
|
||||
required this.id,
|
||||
required this.team_name,
|
||||
required this.event_code,
|
||||
required this.lat,
|
||||
required this.lon,
|
||||
required this.created_at,
|
||||
this.is_checkin = 0,
|
||||
this.is_synced = 0,
|
||||
});
|
||||
|
||||
factory GpsData.fromMap(Map<String, dynamic> json) {
|
||||
return GpsData(
|
||||
id: json["id"],
|
||||
team_name: json["team_name"],
|
||||
event_code: json["event_code"],
|
||||
lat: json["lat"],
|
||||
lon: json["lon"],
|
||||
is_checkin: json["is_checkin"],
|
||||
created_at: json["created_at"]);
|
||||
id: json["id"],
|
||||
team_name: json["team_name"],
|
||||
event_code: json["event_code"],
|
||||
lat: json["lat"],
|
||||
lon: json["lon"],
|
||||
is_checkin: json["is_checkin"],
|
||||
created_at: json["created_at"],
|
||||
is_synced: json["is_synced"] ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
@ -35,7 +40,8 @@ class GpsData {
|
||||
'lat': lat,
|
||||
'lon': lon,
|
||||
'is_checkin': is_checkin,
|
||||
'created_at': created_at
|
||||
'created_at': created_at,
|
||||
'is_synced': is_synced,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user