Overview
CheckoutScreen is a StatefulWidget that provides the main checkout interface for processing payments. It handles the initialization of payment channels and displays the checkout UI with business information.
Constructor
Parameters
The purchase information including amount, customer phone number, description, and client reference.
The checkout configuration containing merchant credentials and callback URL.
Optional list of previously saved bank cards for quick checkout.
Optional theme configuration to customize the checkout UI appearance.
Optional widget key for Flutter’s widget tree.
Properties
The purchase information for the current checkout session.
The merchant configuration for the checkout.
List of saved bank cards that can be used for payment.
The theme configuration for customizing the UI.
The view model that manages checkout business logic and state.
Usage Example
Notes
- The
CheckoutScreenautomatically fetches available payment channels on initialization - A loading indicator is displayed while payment channels are being fetched
- The checkout screen internally manages the payment flow state using
CheckoutViewModel - If no
themeConfigis provided, the default Hubtel teal color is used