buildWithOptions method

Future buildWithOptions({
  1. required String baseUrl,
  2. required String description,
  3. required String callbackUrl,
  4. required String successUrl,
  5. required String notificationEmail,
  6. required String customerEmail,
  7. required int satoshis,
  8. required String reference,
  9. required String publicKey,
  10. required BuildContext context,
  11. required dynamic successCallback(
    1. dynamic response
    ),
  12. required dynamic failCallback(
    1. dynamic response
    ),
  13. required dynamic closeCallBack(
    1. dynamic response
    ),
})

This method use for payment

Implementation

Future buildWithOptions({
  required String baseUrl,
  required String description,
  required String callbackUrl,
  required String successUrl,
  required String notificationEmail,
  required String customerEmail,
  required int satoshis,
  required String reference,
  required String publicKey,
  required BuildContext context,
  required Function(
    dynamic response,
  )
      successCallback,
  required Function(
    dynamic response,
  )
      failCallback,
  required Function(
    dynamic response,
  )
      closeCallBack,
}) async {
  ///Here navigate to the webview screen.

  await Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) => PreViewScreen(
          baseUrl: baseUrl,
          description: description,
          callbackUrl: callbackUrl,
          successUrl: successUrl,
          notificationEmail: notificationEmail,
          customerEmail: customerEmail,
          satoshis: satoshis,
          reference: reference,
          publicKey: publicKey,
          closeCallBack: closeCallBack,
          failCallback: failCallback,
          successCallback: successCallback,
        ),
      ));
  return null;
}