Application/medcify/lib/models/api/store_response.dart
2022-09-26 12:03:52 +05:30

20 lines
514 B
Dart

import 'package:medcify/models/banner_item.dart';
import 'package:medcify/models/store_item.dart';
class StoreResponse{
bool? status;
String? message;
StoreItem? store;
StoreResponse.fromJson(Map<String, dynamic> json){
status = (json["Code"] ?? "0") != "0";
store = (json["Data"] != null) ? StoreItem.fromJson(json["Data"]) : null;
message = json["Message"] ?? "Something went wrong";
}
StoreResponse.withError(String err){
status = false;
store = null;
message = err;
}
}