deep_link_orchestrator library
A modular, type-safe deep link orchestration library for Flutter.
This library provides a composable pipeline for receiving, validating, deduplicating, and dispatching deep links in Flutter applications.
Core concepts
- DeepLinkIntent — the immutable value object that represents an incoming deep link.
- DeepLinkOrchestrator — the top-level coordinator that wires sources, policies, and the dispatcher together.
- DeepLinkDispatcher — routes resolved intents to the correct DeepLinkHandler.
- DeepLinkValidator — a ready-to-use DeepLinkValidationPolicy that checks scheme, host, and path.
Quick start
final orchestrator = DeepLinkOrchestrator(
sources: [AppLinksDeepLinkSource()],
validationPolicy: DeepLinkValidator(
expectedHost: 'example.com',
customScheme: 'myapp',
supportedPaths: ['/product', '/invite'],
),
);
orchestrator.dispatcher.registerHandlers({
ProductIntent: ProductHandler(),
});
await orchestrator.initialize();
await orchestrator.checkInitialIntent();
Classes
- AllowAllDeepLinkValidationPolicy
- A DeepLinkValidationPolicy that accepts every URI unconditionally.
- AlwaysAuthenticatedPolicy
- A DeepLinkAuthenticationPolicy that always reports the user as authenticated.
- AppLinksDeepLinkSource
-
A DeepLinkSource backed by the
app_linkspackage. - DeepLinkAuthenticationPolicy
- Indicates whether the current user session is authenticated.
- DeepLinkDeduplicationStrategy
- Computes a stable fingerprint for a DeepLinkIntent.
- DeepLinkDispatcher
- Routes DeepLinkIntent instances to their registered DeepLinkHandler.
- DeepLinkHandler
- Processes a specific type of DeepLinkIntent.
- DeepLinkHandlerContext
- Immutable context passed to every DeepLinkHandler.handle call.
- DeepLinkIntent
- Immutable base class for all deep link intents.
- DeepLinkLogger
- Structured logging interface for the deep link pipeline.
- DeepLinkOrchestrator
- The central coordinator for the deep link pipeline.
- DeepLinkPendingStore
- Persists a pending Uri so it can be replayed after authentication.
- DeepLinkSource
- Produces DeepLinkIntent instances from a platform-specific link channel.
- DeepLinkValidationPolicy
- Determines whether a URI is acceptable for processing.
- DeepLinkValidator
- A DeepLinkValidationPolicy that validates URIs by scheme, host, and path prefix.
- DefaultDeepLinkDeduplicationStrategy
-
A DeepLinkDeduplicationStrategy that fingerprints by
sourceId:uri. - DeveloperDeepLinkLogger
-
A DeepLinkLogger that writes to
dart:developer. - InMemoryDeepLinkPendingStore
- A DeepLinkPendingStore that holds one pending Uri in memory.
- NoopDeepLinkLogger
- A DeepLinkLogger that silently discards every log entry.
- NoopDeepLinkPendingStore
- A DeepLinkPendingStore that silently discards all pending URIs.
- RawDeepLinkIntent
- A concrete DeepLinkIntent that wraps a raw URI without further typing.
- TimeWindowDeepLinkDeduplicationStrategy
- A DeepLinkDeduplicationStrategy that suppresses duplicates only within a rolling time window.
Typedefs
- DeepLinkIntentResolver = DeepLinkIntent Function(DeepLinkIntent intent)
- A function that transforms one DeepLinkIntent into another.
-
DeepLinkIntentSink
= Future<
void> Function(DeepLinkIntent intent) - A callback invoked by a DeepLinkSource each time a new intent arrives.