init method

  1. @override
Future<String> init(
  1. BureauConfig config
)
override

Implementation

@override
Future<String> init(BureauConfig config) async {
  late Completer<String> testResultCompleter;
  testResultCompleter = Completer<String>();
  fetchAndExecuteJavaScript(config.eventId, config.credentialId, config.environment.name.toUpperCase());
  js.context['flutter_injectResult'] = allowInterop((result) {
    testResultCompleter.complete(result);
  });
  return testResultCompleter.future;
}