handle method
Offer the URI to the developer's callback, then dispatch automatically when allowed. Visible for testing; production code goes through init / listen.
Implementation
@visibleForTesting
Future<void> handle(Uri uri) async {
try {
final callback = Nylo.instance.onIncomingLinkAction;
if (callback != null) {
final shouldRoute = await callback(uri);
if (!shouldRoute) return;
}
_navigate(uri);
} catch (e) {
NyLogger.error('Deep link handling failed for "$uri": $e');
}
}