NavigationAction class final
An action configuration for handling navigation within the application.
Features:
- Local route navigation
- External URL handling
- CMS route navigation
- Different navigation types (push, replace, go)
- Loading states during navigation
- Error handling
Example:
// Navigate to a local route
final action = NavigationAction(
linkType: LinkType.url,
url: '/home',
navigationType: NavigationType.push,
);
// Navigate to a CMS route
final action = NavigationAction(
linkType: LinkType.route,
route: ObjectReference('route-id'),
navigationType: NavigationType.replace,
);
// Navigate to external URL
final action = NavigationAction(
linkType: LinkType.url,
url: 'https://example.com',
);
- Inheritance
-
- Object
- ActionConfiguration
- NavigationAction
- Annotations
-
- @JsonSerializable()
Constructors
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAwaited → bool?
-
Whether to await this configuration's execution.
finalinherited
- linkType → LinkType
-
final
-
final
- route → ObjectReference?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schemaType → String
-
The schema type of this configuration.
finalinherited
- title → String?
-
Optional title for this configuration.
finalinherited
- url → String?
-
final
Methods
-
execute(
BuildContext context, {Map< String, dynamic> ? arguments}) → void -
Executes this configuration.
override
-
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
Static Properties
-
typeDescriptor
→ TypeDescriptor<
NavigationAction> -
final
Constants
- schemaName → const String