mirror of
https://github.com/supanadit/geo-smart-app.git
synced 2024-11-14 04:02:23 +00:00
26 lines
475 B
Dart
26 lines
475 B
Dart
class ResponseModel {
|
|
final String errorMessage = "error";
|
|
|
|
String status;
|
|
|
|
ResponseModel({this.status});
|
|
|
|
ResponseModel.fromJson(Map<String, dynamic> json) {
|
|
status = json['status'];
|
|
}
|
|
|
|
ResponseModel.fromNull() {
|
|
status = errorMessage;
|
|
}
|
|
|
|
isError() {
|
|
return (status == errorMessage);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['status'] = this.status;
|
|
return data;
|
|
}
|
|
}
|