TimeConstraint.fromJson constructor
Creates a new instance of TimeConstraint from a JSON object.
The JSON object should contain keys that correspond to the parameters of TimeConstraint.
Implementation
factory TimeConstraint.fromJson(Map<String, dynamic> json) {
return TimeConstraint(
activityDomain: json['activityDomain'],
timeSlots: (json['timeSlots'] as List)
.map((e) =>
e == null ? null : TimeSlot.fromJson(e as Map<String, dynamic>))
.toList(),
);
}