import 'package:medcify/models/timing_item.dart'; class TimingResponse{ bool? status; String? message; List? timings; TimingResponse.fromJson(Map json){ status = (json["Code"] ?? "0") != "0"; timings = (json["Data"] != null) ? json["Data"].map((e) => TimingItem.fromJson(e)).toList() : []; message = json["Message"] ?? "Something went wrong"; } TimingResponse.withError(String err){ status = false; timings = []; message = err; } }