Application/medcify/lib/models/api/store_response.dart

20 lines
514 B
Dart
Raw Normal View History

2022-09-26 06:33:52 +00:00
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;
}
}