getChainId method

  1. @override
Future<String?> getChainId()
override

Implementation

@override
Future<String?> getChainId() async {
  if (_serviceNotReady) {
    throw Exception('Service is not ready');
  }
  //
  _getChainIdCompleter = Completer<String?>();
  final message = GetChainId().toString();
  await _webViewController.runJavaScript('sendMessage($message)');
  return await _getChainIdCompleter.future;
}