addNewCard method

void addNewCard(
  1. BioPayload payload,
  2. int type, {
  3. bool? doWorkNow = true,
})

Implementation

void addNewCard(BioPayload payload, int type, {bool? doWorkNow = true}) {
  this.payload = payload;
  requestType = type;
  String script = BioConstants.getJSAddCard(payload);
  updateProgressShow(true);
  if(doWorkNow == true) {
    webView?.controller?.runJavaScript(
        callJavascriptAsync(script)
    );

    // webView?.controller?.future.then((controller) {
    //   controller.runJavascript(
    //       callJavascriptAsync(script)
    //   );
    // });
  } else {
    webView?.startScript = script;
  }
}