GetNetworkResponse.fromJson constructor

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

Implementation

factory GetNetworkResponse.fromJson(Map<String, dynamic> json) {
  GetNetworkResponse response = GetNetworkResponse(json);
  if (json['result'] != null) {
    response.friendbotUrl = json['result']['friendbotUrl'];
    response.passphrase = json['result']['passphrase'];
    response.protocolVersion = json['result']['protocolVersion'];
  } else if (json['error'] != null) {
    response.error = SorobanRpcErrorResponse.fromJson(json);
  }
  return response;
}