DeepLinkHandler class

Handles deep linking for the router.

Integrates with app_links package for:

  • Initial link (app started via deep link)
  • Incoming links (app already running)

Example:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Get initial link before app starts
  final initialLink = await DeepLinkHandler.getInitialLink();

  runApp(
    MaterialApp.router(
      routerConfig: RedusRouterConfig(
        routes: routes,
        initialRoute: initialLink ?? '/',
      ),
    ),
  );

  // Listen for incoming links
  DeepLinkHandler.listenToIncomingLinks();
}

Constructors

DeepLinkHandler()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

Initialize the app links instance.
no setter

Static Methods

Get the initial link that started the app.
Start listening for incoming deep links.
stopListening() → void
Stop listening for incoming links.