toCardContactLessOptionScreen method
Future<void>
toCardContactLessOptionScreen(
- RouteSettings settings,
- BuildContext context,
- Locale locale,
- OnPayCallback? onPay,
Navigates to the contactless card payment screen.
This method presents a screen for contactless card payments using NFC technology or other contactless payment methods.
Parameters:
settings
- Route settings containing payment argumentscontext
- The current build context for navigationlocale
- Locale setting for internationalizationonPay
- Optional callback function for payment completion
Contactless Features
The contactless screen supports:
- NFC card reading
- Contactless payment processing
- Real-time payment status updates
- Secure payment authentication
Example
await AmwalSdkNavigator.instance.toCardContactLessOptionScreen(
settings,
context,
const Locale('en'),
(result) => print('Contactless payment completed: $result'),
);
Navigates to the contactless card payment screen.
Implementation
Future<void> toCardContactLessOptionScreen(
RouteSettings settings,
BuildContext context,
Locale locale,
OnPayCallback? onPay,
) async {
final arguments = settings.arguments as PaymentArguments;
await Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => SaleByCardContactLessScreen(
onPay: onPay,
locale: locale,
currency: arguments.currencyData!.name,
currencyId: arguments.currencyData!.idN,
terminalId: arguments.terminalId,
amount: arguments.amount,
merchantId: arguments.merchantId,
transactionId: arguments.transactionId,
),
settings: settings,
),
);
}