SDUIAction class

Descriptor of a widget behavior. This class can be used to:

  • Handle the screen navigation
  • Handle the page navigation
  • Execute commands

JSON Attributes

  • type: Type of action. The supported values are:
    • Route: To redirect to another route
    • Page: To redirect to another page, in the context of PageView
    • Command: To execute a command on the server
    • Share: Share content
    • Navigate: To navigate users to URLs
  • url: Action URL. This URL represent either the route or a command to execute
    • route:/..: redirect users to previous route
    • route:/~: redirect users to 1st route
    • URL starting with route:/<ROUTE_NAME> redirect user the a named route. (Ex: route:/checkout)
    • URL starting with http:// or https redirect user to a server driven page
    • page:/<PAGE_NUMBER>: redirect users to a given page. <PAGE_NUMBER> is the page index (starting with 0).
  • replacement: For type=route, this indicate if we replace the current view or navigate.
  • parameters: Parameters to add to the URL where to redirect to
  • message: Message to share

Constructors

SDUIAction()

Properties

hashCode int
The hash code for this object.
no setterinherited
inDialog bool
getter/setter pair
message String?
getter/setter pair
pageController PageController?
controller associated with the action
getter/setter pair
parameters Map<String, dynamic>?
getter/setter pair
prompt SDUIDialog?
getter/setter pair
replacement bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screen SDUIWidget?
getter/setter pair
trackEvent String?
getter/setter pair
trackProductId String?
getter/setter pair
type String?
getter/setter pair
url String
getter/setter pair

Methods

execute(BuildContext context, Map<String, dynamic>? data) Future<String?>
fromJson(Map<String, dynamic>? attributes) SDUIAction
handleResult(BuildContext context, String? result) Future<String?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited