PopUntilEvent class
Pop routes until a condition is met.
Bypasses guards. Pops entries from the stack until predicate returns true. The entry where predicate returns true remains on the stack.
Example:
// Pop until we find '/dashboard'
routingBloc.send(PopUntilEvent(
predicate: (entry) => entry.path == '/dashboard',
));
- Inheritance
-
- Object
- RoutingEvent
- PopUntilEvent
Constructors
- PopUntilEvent({required bool predicate(StackEntry entry)})
Properties
-
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
- predicate → bool Function(StackEntry entry)
-
Predicate to test each stack entry.
Popping stops when this returns true (that entry stays).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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