getInitialLink static method
Checks for initial deep link when app is launched.
Returns the initial deep link URL if available, or null.
Implementation
static Future<String?> getInitialLink() async {
try {
// Use platform channel to get initial link
const platform = MethodChannel('screen_launch_by_notfication/deep_link');
final String? initialLink = await platform.invokeMethod('getInitialLink');
return initialLink;
} catch (e) {
// Platform may not support deep linking or method not implemented
debugPrint('[DeepLinkHandler] Error getting initial link: $e');
return null;
}
}