queryNetwork method
Implementation
Future<Map?> queryNetwork() async {
// fetch network info
List res = await serviceRoot.webView!.evalJavascript(
'Promise.all([settings.getNetworkProperties(api),api.rpc.system.chain(),settings.getNetworkConst(api)])');
if (res[0] == null || res[1] == null || res[2] == null) {
return null;
}
final Map props = {"props": res[0], "const": res[2]};
props["props"]['name'] = res[1];
return props;
}