isDebugSettingsDeepLink static method
Whether uri is the SDK's debug-settings deeplink.
Matches the raw string, not Uri.path: for myapp://_digia/debug-settings,
URI parsing treats _digia as the host, not the path, so a path-only
check would never match a custom scheme.
Since the SDK registers its own internal route observer during
initialize, a matching route push is consumed by the SDK itself — no
host-side handler is needed. A host that already wired one keeps
working; it simply never fires for this link anymore, because the SDK's
observer registered first and consumes it. This helper remains for
hosts routing through their own linking setup (app_links, go_router
redirects, cold-start initial links on iOS, …).
if (Digia.isDebugSettingsDeepLink(uri)) {
Digia.openDebugSettings(context);
return;
}
Implementation
static bool isDebugSettingsDeepLink(Uri uri) {
final raw = uri.toString();
final afterScheme =
raw.contains('://') ? raw.substring(raw.indexOf('://') + 3) : raw;
final trimmed = afterScheme.replaceAll(RegExp(r'^/+|/+$'), '');
return trimmed == debugSettingsDeepLinkPath ||
trimmed.endsWith('/$debugSettingsDeepLinkPath');
}