StacNavigateAction class

A Stac action that performs navigation operations.

Can navigate using a local widgetJson, an assetPath, a routeName, or a request that fetches the destination JSON. The navigationStyle determines how the navigation is executed.

{@tool snippet} Dart Example:

const StacNavigateAction(
  routeName: '/details',
  navigationStyle: NavigationStyle.pushNamed,
  arguments: {'id': 42},
)

{@end-tool}

{@tool snippet} JSON Example:

{
  "type": "navigate",
  "routeName": "/details",
  "navigationStyle": "pushNamed",
  "arguments": {"id": 42}
}

{@end-tool}

Inheritance
Annotations
  • @JsonSerializable()

Constructors

StacNavigateAction.new({StacNetworkRequest? request, Map<String, dynamic>? widgetJson, String? assetPath, String? routeName, NavigationStyle? navigationStyle, Map<String, dynamic>? result, Map<String, dynamic>? arguments})
Creates a StacNavigateAction to navigate based on the provided inputs.
const
StacNavigateAction.fromJson(Map<String, dynamic> json)
Creates a StacNavigateAction from a JSON map.
factory

Properties

actionType String
Action type identifier.
no setteroverride
arguments Map<String, dynamic>?
Arguments to pass to the new route.
final
assetPath String?
Asset path containing widget JSON to navigate to.
final
hashCode int
The hash code for this object.
no setterinherited
jsonData Map<String, dynamic>?
The raw JSON data associated with this action.
finalinherited
How navigation should be performed.
final
request StacNetworkRequest?
Optional network request to load destination widget JSON.
final
result Map<String, dynamic>?
A result to pass back when popping.
final
routeName String?
Named route to push/pop.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
widgetJson Map<String, dynamic>?
Inline widget JSON to navigate to.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this StacNavigateAction instance to a JSON map.
override
toString() String
A string representation of this object.
inherited

Operators

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