fromJson static method

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

Implementation

static TimeZone? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return TimeZone(
    id: (json['id'] as String?) ?? '',
    name: (json['name'] as String?) ?? '',
    utcTimeOffset: (json['utc_time_offset'] as int?) ?? 0,
  );
}