fromJson static method
Returns a new Recurrence instance and imports its values from
value
if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static Recurrence? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return Recurrence(
type: mapValueOfType<String>(json, r'type'),
weekDays: json[r'weekDays'] is List
? (json[r'weekDays'] as List).cast<String>()
: null,
start: mapDateTime(json, r'start', ''),
end: mapDateTime(json, r'end', ''),
);
}
return null;
}