handleCGDeepLink static method
Future<void>
handleCGDeepLink(
)
Implementation
static Future<void> handleCGDeepLink() async {
try {
final initialLink = await getInitialLink();
_sub = uriLinkStream.listen((Uri? uri) async {
return await _channel.invokeMethod('handleCGDeepLink', uri.toString());
// Use the uri and warn the user, if it is not correct
}, onError: (err) {
// Handle exception by warning the user their action did not succeed
});
if (initialLink != null) {
return await _channel.invokeMethod(
'handleCGDeepLink', initialLink.toString());
}
} on Exception {}
// NOTE: Don't forget to call _sub.cancel() in dispose()
}