mirror of
https://github.com/supanadit/geo-smart-app.git
synced 2024-11-24 11:16:24 +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;
|
|
}
|
|
}
|