PayEngine class
Shows a PayEngine web component (for example boarding) in a WebView.
The component authenticates with a merchant session token from the callback registered with PayEngineNative.setFetchAccessTokenCallback, which must be registered before the widget is created. Without it the widget shows nothing and sends this event to onEvent after its first frame:
{'type': 'error', 'detail': {'code': 'MISSING_ACCESS_TOKEN',
'message': PayEngineNative.missingAccessTokenMessage, 'reason': 'noCallback'}}
It sends the same event, with reason callbackFailed or emptyToken,
when the callback throws, takes longer than 10 seconds, or returns a blank
token while the component is loaded. The widget is supported on Android
and iOS only; on Flutter web it shows nothing and sends an error event
with code WIDGET_UNSUPPORTED.
onEvent also receives the component's own events as
{'type': <event type>, 'detail': <event detail>}.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PayEngine
- Implemented types
Constructors
Properties
- config → PayEngineConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onEvent
→ dynamic Function(Map<
String, dynamic> )? -
final
-
params
→ Map<
String, String> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< PayEngine> -
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