TimezoneInfo.fromJson constructor

TimezoneInfo.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TimezoneInfo.fromJson(Map<String, dynamic> json) {
  return TimezoneInfo(
    datetime: json['datetime'] != null ? DateTime.parse(json['datetime']) : null,
    day: json['day'] != null ? int.parse(json['day']) : null,
    timeZones: json['time_zones'] != null
        ? List<String>.from(json['time_zones'])
        : null,
    id: json['id'],
    month: json['month'] != null ? int.parse(json['month']) : null,
    name: json['name'],
    time: json['time'],
    timeZoneName: json['time_zone_name'],
    utc: json['utc'] != null ? int.parse(json['utc']) : null,
    year: json['year'] != null ? int.parse(json['year']) : null,
  );
}