DateSymbols.deserializeFromMap constructor
DateSymbols.deserializeFromMap( - Map map
)
Implementation
factory DateSymbols.deserializeFromMap(Map<dynamic, dynamic> map) {
List<String> getStringList(String name) => List<String>.from(map[name]);
return DateSymbols(
NAME: map['NAME'],
ERAS: getStringList('ERAS'),
ERANAMES: getStringList('ERANAMES'),
NARROWMONTHS: getStringList('NARROWMONTHS'),
STANDALONENARROWMONTHS: getStringList('STANDALONENARROWMONTHS'),
MONTHS: getStringList('MONTHS'),
STANDALONEMONTHS: getStringList('STANDALONEMONTHS'),
SHORTMONTHS: getStringList('SHORTMONTHS'),
STANDALONESHORTMONTHS: getStringList('STANDALONESHORTMONTHS'),
WEEKDAYS: getStringList('WEEKDAYS'),
STANDALONEWEEKDAYS: getStringList('STANDALONEWEEKDAYS'),
SHORTWEEKDAYS: getStringList('SHORTWEEKDAYS'),
STANDALONESHORTWEEKDAYS: getStringList('STANDALONESHORTWEEKDAYS'),
NARROWWEEKDAYS: getStringList('NARROWWEEKDAYS'),
STANDALONENARROWWEEKDAYS: getStringList('STANDALONENARROWWEEKDAYS'),
SHORTQUARTERS: getStringList('SHORTQUARTERS'),
QUARTERS: getStringList('QUARTERS'),
AMPMS: getStringList('AMPMS'),
ZERODIGIT: map['ZERODIGIT'],
DATEFORMATS: getStringList('DATEFORMATS'),
TIMEFORMATS: getStringList('TIMEFORMATS'),
AVAILABLEFORMATS: Map<String, String>.from(map['AVAILABLEFORMATS'] ?? {}),
FIRSTDAYOFWEEK: map['FIRSTDAYOFWEEK'],
WEEKENDRANGE: List<int>.from(map['WEEKENDRANGE']),
FIRSTWEEKCUTOFFDAY: map['FIRSTWEEKCUTOFFDAY'],
DATETIMEFORMATS: getStringList('DATETIMEFORMATS'),
);
}