onConfirmAsync method

Promise onConfirmAsync(
  1. String data
)

Implementation

Promise onConfirmAsync(String data)  {

  return Promise<bool>(allowInterop((resolve, reject) async {
    if(this._callbackAsyncConfirm != null) {

      bool result = await this._callbackAsyncConfirm!(data);
      resolve(result);
    } else {
      resolve(false);
    }

    // var tmp = Future.delayed(Duration(seconds: 1), () {
    //   return 'test';
    // });
    // tmp.then(resolve, onError: reject);
  }));
}