canDeactivate method
Called before navigating AWAY from a route.
Return true to allow leaving, false to block.
Use for "unsaved changes" confirmation dialogs.
Implementation
Future<bool> canDeactivate(
RouteLocation to,
RouteLocation from,
) async =>
true;