fromJson static method
Returns a new NewAppointmentModel instance and imports its values from
value
if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static NewAppointmentModel fromJson(dynamic value) {
final json = value.cast<String, dynamic>();
return NewAppointmentModel(
employeeId: mapValueOfType<int>(json, r'employeeId'),
serviceId: mapValueOfType<int>(json, r'serviceId'),
customerId: mapValueOfType<int>(json, r'customerId'),
from: mapDateTime(json, r'from', ''),
to: mapDateTime(json, r'to', ''),
recurrence: NewRecurrence.fromJson(json[r'recurrence']),
);
}