NetworkInfo.fromJson constructor

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

Implementation

factory NetworkInfo.fromJson(Map<String, dynamic> json) {
  return NetworkInfo(
    bech32Hrp: json['bech32_hrp'] as String,
    lcdUrl: Uri.parse(json['lcd_url'] as String),
    name: json.containsKey('name') ? json['name'] as String : '',
    iconUrl: json.containsKey('icon_url') ? json['icon_url'] as String : '',
    defaultTokenDenom: json['default_token_denom'] as String?,
  );
}