instanceFor static method
- @Deprecated('Note: Firebase Dynamic Links is deprecated and the service will shut down on August 25, 2025. ' 'Please see our Dynamic Links Deprecation FAQ documentation > for guidance on alternative solutions and migration options: ' 'https://firebase.google.com/support/dynamic-links-faq')
- required FirebaseApp app,
Returns an instance using a specified FirebaseApp
.
Note; multi-app support is only supported on android.
Implementation
@Deprecated(
'Note: Firebase Dynamic Links is deprecated and the service will shut down on August 25, 2025. '
'Please see our Dynamic Links Deprecation FAQ documentation > for guidance on alternative solutions and migration options: '
'https://firebase.google.com/support/dynamic-links-faq')
static FirebaseDynamicLinks instanceFor({required FirebaseApp app}) {
if (defaultTargetPlatform == TargetPlatform.android ||
app.name == defaultFirebaseAppName) {
return _cachedInstances.putIfAbsent(app.name, () {
return FirebaseDynamicLinks._(app: app);
});
}
throw UnsupportedError(
'FirebaseDynamicLinks.instanceFor() only supports non-default FirebaseApp instances on Android.',
);
}