MenuItem.fromJson constructor
MenuItem.fromJson(
- String json
Implementation
MenuItem.fromJson(String json) {
Map<String, dynamic> map = jsonDecode(json);
id = map["id"];
name = map["name"];
price = map["price"] is int ? (map["price"] as int).toDouble() : map["price"];
status = map["status"];
image = map["image"];
stallId = map["stall_id"];
}