MasriviView constructor
const
MasriviView({
- Key? key,
- required String publishableApiKey,
- required String transactionId,
- required String configurationId,
- FutureOr<
void> onPaymentSuccess(- bool isSuccess
- VoidCallback? onBackPress,
- VoidCallback? onPaymentDeclined,
- MasriviWebViewPresentation presentation = MasriviWebViewPresentation.fullPage,
- String? phoneNumber,
Creates a new MasriviView instance.
publishableApiKey: The API key for authenticating the payment.transactionId: The transaction ID for the payment.configurationId: The configuration ID (payment method ID) fromPaymentMethod.id.onPaymentSuccess: The callback to call when the payment is successful.onBackPress: The callback to call when the back button is pressed.onPaymentDeclined: The callback to call when the payment is declined.presentation: Whether to render as a full page or bottom sheet.phoneNumber: Optional phone number to prefill in the Masrivi page.
Implementation
const MasriviView({
super.key,
required this.publishableApiKey,
required this.transactionId,
required this.configurationId,
this.onPaymentSuccess,
this.onBackPress,
this.onPaymentDeclined,
this.presentation = MasriviWebViewPresentation.fullPage,
this.phoneNumber,
});