TimeZone.fromJson constructor

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

Creates a new instance of TimeZone from a JSON object.

The JSON object should contain keys "alias" and "displayName" that correspond to the properties of TimeZone.

Implementation

factory TimeZone.fromJson(Map<String, dynamic> json) {
  return TimeZone(
    alias: json['alias'],
    displayName: json['displayName'],
  );
}