KhaltiScope class
The widget that initializes Khalti Payment Gateway and handles received deeplink.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- KhaltiScope
Constructors
- KhaltiScope({Key? key, required String publicKey, required KhaltiScopeBuilder builder, bool enabledDebugging = false, })
- Creates KhaltiScope with the provided properties.
Properties
- enabledDebugging → bool
-
Whether to print network logs or not.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- publicKey → String
-
The publicKey can be either test or live public key provided to Khalti merchant account.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< KhaltiScope> -
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
-
pay(
{required PaymentConfig config, required ValueChanged< PaymentSuccessModel> onSuccess, required ValueChanged<PaymentFailureModel> onFailure, VoidCallback? onCancel, List<PaymentPreference> preferences = PaymentPreference.values}) → Future<void> - Launches the Khalti Payment Gateway interface.
-
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}) → 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
Static Methods
-
of(
BuildContext context) → KhaltiScope -
Returns the KhaltiScope instance for the widget tree
that corresponds to the given
context
.