ChapaNativePayment class
A widget for performing Chapa native payment checkout.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ChapaNativePayment
Constructors
-
ChapaNativePayment({Key? key, required BuildContext context, required String publicKey, required String email, required String phone, required String amount, required String firstName, required String lastName, required String txRef, required String title, required String desc, required String namedRouteFallBack, required String currency, Color? buttonColor, bool? showPaymentMethodsOnGridView, List<
String> availablePaymentMethods = const ["telebirr", "cbebirr", "ebirr", "mpesa"], dynamic onPaymentFinished(String, String, String)?}) - Constructor
Properties
- amount → String
-
The payment amount to be charged.
final
-
availablePaymentMethods
↔ List<
String> -
List of available payment methods. If null, all methods are enabled.
getter/setter pair
-
Custom button color for the checkout.
final
- context → BuildContext
-
BuildContext
final
- currency → String
-
The currency for the payment, e.g., "ETB".
final
- desc → String
-
The description of the payment request.
final
- email → String
-
The email of the customer making the payment.
final
- firstName → String
-
The first name of the customer.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lastName → String
-
The last name of the customer.
final
- namedRouteFallBack → String
-
The route to navigate after payment is made.
final
- onPaymentFinished ↔ dynamic Function(String, String, String)?
-
Return the transaction status, reference, and response as arguments.
getter/setter pair
- phone → String
-
The phone number of the customer making the payment.
final
- publicKey → String
-
The public API key from Chapa for processing payments for Authenticating Merchant.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showPaymentMethodsOnGridView → bool?
-
Option to show payment methods in a grid view.
final
- title → String
-
The title of the payment.
final
- txRef → String
-
The unique transaction reference for the payment.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ChapaNativePayment> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited