NavigateEvent class
Navigate to a new path.
Guards will be checked before navigation commits. If replace is true, replaces the current stack entry instead of pushing.
Example:
routingBloc.send(NavigateEvent(path: '/profile/123'));
// With extra data
routingBloc.send(NavigateEvent(
path: '/product',
extra: productData,
));
// Replace current route
routingBloc.send(NavigateEvent(
path: '/home',
replace: true,
));
- Inheritance
-
- Object
- RoutingEvent
- NavigateEvent
Constructors
Properties
- extra → Object?
-
Extra data to pass to the route builder
final
- fromPlatform → bool
-
True when this navigation is the PLATFORM reporting a location
(Router.setNewRoutePath — startup report, URL bar edit, deep link)
rather than the app asking to go somewhere. Platform reports that name
the current location are reconciled to a no-op instead of pushed: on
every cold start the OS reports the same initial path the bloc just
seeded, and pushing it duplicated the root page (a phantom back button
on launch). In-app navigations never set this, so an intentional
re-push of the current route (fresh extra, replace, ...) is untouched.
final
-
groupsToRebuild
↔ Set<
String> ? -
The set of widget rebuild groups this event should trigger.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- path → String
-
The path to navigate to
final
- replace → bool
-
If true, replace current entry instead of pushing
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transition → RouteTransition?
-
Override transition animation for this navigation
final
Methods
-
close(
) → Future< void> -
Called when the event is disposed.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited