Created
February 12, 2021 13:08
-
-
Save safademirel07/53c635be19f65c4b9b8739af7f56af37 to your computer and use it in GitHub Desktop.
tutorial5.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void initDynamicLinks() async { | |
FirebaseDynamicLinks.instance.onLink( | |
onSuccess: (PendingDynamicLinkData dynamicLink) async { | |
final Uri deepLink = dynamicLink?.link; | |
if (deepLink != null) { | |
var deepLinkPath = deepLink.path; | |
var deepLinkQueryParameters = deepLink.queryParameters; | |
parseColorAndNavigate(deepLinkQueryParameters); | |
} | |
}, onError: (OnLinkErrorException e) async { | |
print('onLinkError'); | |
print(e.message); | |
}); | |
final PendingDynamicLinkData data = | |
await FirebaseDynamicLinks.instance.getInitialLink(); | |
final Uri deepLink = data?.link; | |
if (deepLink != null) { | |
var deepLinkPath = deepLink.path; | |
var deepLinkQueryParameters = deepLink.queryParameters; | |
parseColorAndNavigate(deepLinkQueryParameters); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment