Configuration.fromJson constructor

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

Implementation

factory Configuration.fromJson(Map<String, dynamic> json) {
  return Configuration(
    latitude: json['latitude']?.toDouble(),
    longitude: json['longitude']?.toDouble(),
    elevation: json['elevation']?.toDouble(),
    unitSystem: Map<String, String>.from(json['unit_system']),
    locationName: json['location_name'],
    timeZone: json['time_zone'],
    components: List<String>.from(json['components']),
    configDir: json['config_dir'],
    whitelistExternalDirs: List<String>.from(json['whitelist_external_dirs']),
    allowlistExternalDirs: List<String>.from(json['allowlist_external_dirs']),
    allowlistExternalUrls: List<String>.from(json['allowlist_external_urls']),
    version: json['version'],
    configSource: json['config_source'],
    safeMode: json['safe_mode'],
    state: json['state'],
    externalUrl: json['external_url'],
    internalUrl: json['internal_url'],
    currency: json['currency'],
    country: json['country'],
    language: json['language'],
  );
}