fromJson static method

NewRecurrence fromJson(
  1. dynamic value
)

Returns a new NewRecurrence instance and imports its values from value if it's a Map, null otherwise.

Implementation

// ignore: prefer_constructors_over_static_methods
static NewRecurrence fromJson(dynamic value) {
  final json = value.cast<String, dynamic>();
  return NewRecurrence(
    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', ''),
  );
}