LightSignalingStatus.fromJson constructor
Creates a LightSignalingStatus object from the JSON response to a GET request.
Implementation
factory LightSignalingStatus.fromJson(Map<String, dynamic> dataMap) {
return LightSignalingStatus(
signal: dataMap[ApiFields.signal] ?? "",
signalValues: List<String>.from(dataMap[ApiFields.signalValues] ?? []),
estimatedEnd: DateTime.tryParse(dataMap[ApiFields.estimatedEnd] ?? "") ??
DateUtils.dateOnly(DateTime.now()),
);
}