rpcPost method

Future<String?> rpcPost(
  1. Map<String, dynamic> reqJson
)

Post json to the RPC address

Implementation

Future<String?> rpcPost(Map<String, dynamic> reqJson) async {
  this.id++;
  http.Response response =
      await http.post(Uri.parse(rpcAddress), body: json.encode(reqJson));
  if (response.statusCode != 200) {
    return null; // TODO - make this an error response with more details
  }
  return response.body;
}