Initial commit
This commit is contained in:
29
app_code/lib/models/common_response.dart
Normal file
29
app_code/lib/models/common_response.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
// To parse this JSON data, do
|
||||
//
|
||||
// final commonResponse = commonResponseFromJson(jsonString);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
CommonResponse commonResponseFromJson(String str) => CommonResponse.fromJson(json.decode(str));
|
||||
|
||||
String commonResponseToJson(CommonResponse data) => json.encode(data.toJson());
|
||||
|
||||
class CommonResponse {
|
||||
bool result;
|
||||
var message;
|
||||
|
||||
CommonResponse({
|
||||
required this.result,
|
||||
required this.message,
|
||||
});
|
||||
|
||||
factory CommonResponse.fromJson(Map<String, dynamic> json) => CommonResponse(
|
||||
result: json["result"],
|
||||
message: json["message"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"result": result,
|
||||
"message": message,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user