didPushRouteInformation method
Called when the host tells the application to push a new RouteInformation and a restoration state onto the router.
Observers are expected to return true if they were able to handle the notification. Observers are notified in registration order until one returns true.
This method exposes the pushRouteInformation notification from
SystemChannels.navigation.
The default implementation is to call the didPushRoute directly with the string constructed from RouteInformation.uri's path and query parameters.
Implementation
@override
Future<bool> didPushRouteInformation(
RouteInformation routeInformation,
) async {
if (!Digia.isDebugSettingsDeepLink(routeInformation.uri)) return false;
if (isEligible()) {
// Not awaited: the open future resolves only when the screen is popped.
unawaited(openDebugSettings());
} else {
DigiaLog.log(
'debug-settings deeplink consumed but ignored — '
'not a debug-eligible build.',
);
}
return true;
}