AmwalSdkNavigator class
Navigation controller for managing screen transitions within the Amwal Pay SDK.
This class provides centralized navigation logic for all SDK screens, including wallet options, card payment screens, and contactless payment screens. It follows the singleton pattern to ensure consistent navigation behavior throughout the SDK.
Features
- Centralized Navigation: All SDK screen transitions go through this class
- Screen Management: Handles navigation to different payment flows
- Argument Passing: Manages data transfer between screens
- Observer Integration: Integrates with Flutter's navigation observer system
- Consistent Routing: Standardized navigation patterns across the SDK
Usage Example
// Navigate to wallet options
await AmwalSdkNavigator.instance.toWalletOptionsScreen(
context,
settings,
onPay,
onCountComplete,
getTransactionFunction,
90,
logCallback,
);
// Navigate to card screen
await AmwalSdkNavigator.instance.toCardScreen(
onPay: onPayCallback,
locale: const Locale('en'),
);
Navigation Flows
The SDK supports several payment flows:
- Wallet Payments: Digital wallet payment options
- Card Payments: Traditional credit/debit card processing
- Contactless Payments: NFC and contactless card payments
- Manual Card Entry: Manual card information input
Screen Arguments
All navigation methods accept appropriate arguments including:
- Payment amounts and currencies
- Merchant and terminal information
- Transaction IDs and callbacks
- Localization settings
- Logging and monitoring callbacks
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toCardContactLessOptionScreen(
RouteSettings settings, BuildContext context, Locale locale, OnPayCallback? onPay) → Future< void> - Navigates to the contactless card payment screen.
-
toCardOptionScreen(
RouteSettings settings, BuildContext context, Locale locale, OnPayCallback onPay, EventCallback? log) → Future< void> - Navigates to the manual card entry screen.
-
toCardScreen(
{Locale? locale, String? transactionId, required OnPayCallback onPay, EventCallback? log}) → Future< void> - Navigates to the main card payment screen.
-
toString(
) → String -
A string representation of this object.
inherited
-
toWalletOptionsScreen(
BuildContext context, RouteSettings settings, OnPayCallback onPay, OnPayCallback onCountComplete, GetTransactionFunction getTransactionFunction, int countDownInSeconds, EventCallback? log) → Future< void> - Navigates to the wallet payment options screen.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
Navigation observer for monitoring SDK navigation events.
getter/setter pair
- instance → AmwalSdkNavigator
-
Returns the singleton instance of AmwalSdkNavigator.
no setter