requestPin method

Future<PinResponseDetails?> requestPin(
  1. RequestPinDetails details
)

Requests the PIN from the user. Only one ongoing request at a time is allowed. The requests issued while another flow is ongoing are rejected. It's the extension's responsibility to try again later if another flow is in progress. |details|: Contains the details about the requested dialog. |callback|: Is called when the dialog is resolved with the user input, or when the dialog request finishes unsuccessfully (e.g. the dialog was canceled by the user or was not allowed to be shown).

Implementation

Future<PinResponseDetails?> requestPin(RequestPinDetails details) async {
  var $res = await promiseToFuture<$js.PinResponseDetails?>(
      $js.chrome.certificateProvider.requestPin(details.toJS));
  return $res?.let(PinResponseDetails.fromJS);
}