Flutter navigation
Map DeferredLink onto go_router.
LIVE SPECIMEN
Universal & Deferred Link SimulatorURL
https://taqlyn.com/shop/checkout?cartId=cart_9841&promo=WELCOME20&aff=partner_8Optional package taqlyn_nav_go_router. Hold the pending route across splash, navigate once, then consume.
final pending = PendingDeepLink();
final router = GoRouter(
refreshListenable: pending,
redirect: (context, state) => taqlynRedirect(
pending: pending,
matchedLocation: state.matchedLocation,
splash: '/splash',
),
);
TaqlynSdk.observePlatformLinks().listen((link) async {
if (navigateDeferredLink(
link,
go: router.go,
idOf: (l) => (l as DeferredLink).linkId,
)) {
await TaqlynSdk.consume(link.linkId);
}
});
await TaqlynSdk.setReadyForNavigation(true);
pending.setReady(true);If go_router already handles https, set linkProcessingMode to deferredOnly.
For warm short codes, call TaqlynSdk.resolveIncomingUrl (or the go_router expand helper) before the first route — short-link expand.