SmartSceneActiveTimeslot.fromJson constructor

SmartSceneActiveTimeslot.fromJson(
  1. Map<String, dynamic> dataMap
)

Creates a SmartSceneActiveTimeslot object from the JSON response to a GET request.

Implementation

factory SmartSceneActiveTimeslot.fromJson(Map<String, dynamic> dataMap) {
  return SmartSceneActiveTimeslot(
    timeslotId: dataMap[ApiFields.timeslotId] ?? 0,
    weekday: dataMap[ApiFields.weekday] ?? "",
  );
}