show static method

void show(
  1. BuildContext context, {
  2. required String publishableApiKey,
  3. required String transactionId,
  4. FutureOr<void> onPaymentSuccess(
    1. bool isSuccess
    )?,
  5. bool isFullPage = false,
  6. bool isMasriviInBottomSheet = true,
  7. String? masriviPhoneNumber,
  8. double masriviBottomSheetHeight = 0.88,
})

Displays the MoosylView modal sheet to start the payment process.

  • context: The build context.
  • publishableApiKey: The API key to authenticate the payment.
  • transactionId: The transaction ID for the current session.
  • onPaymentSuccess: Callback for when payment is successful.

Implementation

static void show(
  BuildContext context, {
  required String publishableApiKey,
  required String transactionId,
  final FutureOr<void> Function(bool isSuccess)? onPaymentSuccess,
  bool isFullPage = false,
  bool isMasriviInBottomSheet = true,
  String? masriviPhoneNumber,
  double masriviBottomSheetHeight = 0.88,
}) {
  showBarModalBottomSheet(
    context: context,
    builder: (context) => MoosylView(
      publishableApiKey: publishableApiKey,
      transactionId: transactionId,
      onPaymentSuccess: onPaymentSuccess,
      isFullPage: isFullPage,
      isMasriviInBottomSheet: isMasriviInBottomSheet,
      masriviPhoneNumber: masriviPhoneNumber,
    ),
  );
}