onDeepLink property
Optional callback to determine route and payload based on deep link URL. If provided, this callback will be called when the app is launched from a deep link or when a deep link is received while the app is running. Return a SwiftRouting object with route and payload, or null to skip navigation.
Example:
onDeepLink: ({required url, required route, required queryParams}) {
if (route == '/product') {
return SwiftRouting(
route: '/product',
payload: {'productId': queryParams['id']},
);
}
return null; // Skip navigation
}
Implementation
final DeepLinkCallback? onDeepLink;