RtDeepLinking class

A singleton service for handling deep linking in Flutter applications.

Intercepts platform messages for navigation events (deep links/universal links) and delegates them to a custom handler function. This enables apps to respond to external URL schemes and handle app-to-app navigation.

The service preserves the original platform message handler to ensure unhandled messages are processed correctly by the Flutter framework.

Example usage:

// Initialize deep linking in main()
RtDeepLinking.instance.initDeepLinkListener((uri) {
  print('Deep link received: $uri');

  // Handle different routes
  if (uri.path == '/product') {
    final productId = uri.queryParameters['id'];
    Get.toNamed('/product-detail', arguments: productId);
  } else if (uri.path == '/profile') {
    Get.toNamed('/profile');
  }
});

Supported URL formats:

  • Custom schemes: myapp://path?param=value
  • Universal links: https://example.com/path?param=value

See also:

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

initDeepLinkListener(dynamic handleDeepLink(Uri)?) → void
Initializes the deep link listener to intercept navigation messages.
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

instance RtDeepLinking
The single shared instance of RtDeepLinking
final