requestDeferredDeeplink static method
Requests a deferred deeplink.
Relevant only for Android. For iOS, it returns the unknown error.
Implementation
static Future<String> requestDeferredDeeplink() =>
_appMetrica.requestDeferredDeeplink().then((value) {
final error = value.error;
if (error != null &&
error.reason != AppMetricaDeferredDeeplinkReasonPigeon.NO_ERROR) {
throw AppMetricaDeferredDeeplinkRequestException(
_deferredDeeplinkErrorToDart(error.reason),
error.description,
error.message);
} else if (value.deeplink == null) {
throw AppMetricaDeferredDeeplinkRequestException(
AppMetricaDeferredDeeplinkErrorReason.unknown,
"Unable to retrieve deeplink from native library",
error?.message);
} else {
return value.deeplink!;
}
});