Defines route lifecycle method
routerCanReuse, which is called by the
router to determine whether a component should be reused across routes, or
whether to destroy and instantiate a new component.
routerCanReuse hook is called with two ComponentInstructions as
parameters, the first representing the current route being navigated to,
and the second parameter representing the previous route.
routerCanReuse returns or resolves to
true, the component instance
will be reused and the OnDeactivate hook will be run. If
returns or resolves to
false, a new component will be instantiated, and the
existing component will be deactivated and removed as part of the navigation.
routerCanReuse throws or rejects, the navigation will be cancelled.
@override FutureOr<bool> routerCanReuse(next, prev) => true;
See the router documentation for details.
ComponentInstruction nextInstruction, ComponentInstruction prevInstruction) → dynamic
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
) → String
Returns a string representation of this object.