class Schedule { final String effectiveTime; final String invalidTime; final List workingDay; Schedule({ required this.effectiveTime, required this.invalidTime, required this.workingDay, }); factory Schedule.fromJson(Map json) { return Schedule( effectiveTime: json['effectiveTime'], invalidTime: json['invalidTime'], workingDay: List.from(json['workingDay']), ); } Map toJson() { return { 'effectiveTime': effectiveTime, 'invalidTime': invalidTime, 'workingDay': workingDay, }; } }