getInitialLink static method
Get the initial link that started the app.
Returns null if app was not started via deep link.
Call this before runApp().
Implementation
static Future<String?> getInitialLink() async {
try {
final uri = await appLinks.getInitialLink();
if (uri != null) {
return _uriToPath(uri);
}
} catch (e) {
debugPrint('DeepLinkHandler: Error getting initial link: $e');
}
return null;
}