PaynowBuilder class
Widget using the PaynowBloc to gracefully handle the payment workflow. It handles all the logic behind the scenes You are only required to plug in your UI. Each Builder provides ready to use information about your cart.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PaynowBuilder
Constructors
-
PaynowBuilder({Key? key, required PaynowConfig paynowConfig, required PaynowPaymentInfo paynowPaymentInfo, required CartRepository cartRepository, required Widget onInitial(BuildContext context, PaynowInitialState initialState, List<
PaynowCartItem> cart), required Widget onLoading(BuildContext context, PaynowLoadingState loadingState, List<PaynowCartItem> cart), required Widget onPending(BuildContext context, PaynowPendingState pendingState, List<PaynowCartItem> cart), required Widget onSuccess(BuildContext context, PaynowSuccessState successState, List<PaynowCartItem> cart), required Widget onFailed(BuildContext context, PaynowFailedState failedState, List<PaynowCartItem> cart), required Widget checkoutButtonBuilder(BuildContext context, PaynowBloc paynowBloc, CartRepository cartRepository), bool forceWebView = true, bool forceSafariVC = false})
Properties
- cartRepository ↔ CartRepository
-
Cart repository for managing your cart
latefinal
- checkoutButtonBuilder → Widget Function(BuildContext context, PaynowBloc paynowBloc, CartRepository cartRepository)
-
This is the button for starting the payment
Decorate it as you like but do not forget to call paynowBloc.startPayment
final
- forceSafariVC ↔ bool
-
latefinal
- forceWebView ↔ bool
-
WIP
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onFailed
↔ Widget Function(BuildContext context, PaynowFailedState failedState, List<
PaynowCartItem> cart) -
Shown when something goes wrong
latefinal
-
onInitial
↔ Widget Function(BuildContext context, PaynowInitialState initialState, List<
PaynowCartItem> cart) -
This is the initial widget. Use case would be to use this as a checkout confirmation
latefinal
-
onLoading
↔ Widget Function(BuildContext context, PaynowLoadingState loadingState, List<
PaynowCartItem> cart) -
Shown when there is work being done under the hood.
Place your fancy loaders here
latefinal
-
onPending
↔ Widget Function(BuildContext context, PaynowPendingState pendingState, List<
PaynowCartItem> cart) -
Showm when waiting for the user to complete the payment
latefinal
-
onSuccess
↔ Widget Function(BuildContext context, PaynowSuccessState successState, List<
PaynowCartItem> cart) -
Shown when user has successfully paid.
Place your success widgets here confirming transaction
latefinal
- paynowConfig ↔ PaynowConfig
-
Paynow Configurations
latefinal
- paynowPaymentInfo ↔ PaynowPaymentInfo
-
Information about the payment which includes the payment method
latefinal
- 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< StatefulWidget> -
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}) → 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