1

I have created a dynamic link for the Flutter app using the Firebase console and I am trying to access that dynamic link data from within the app. But I am getting this message in the logs. The app is not using any authentication. I am using this method for the same:

  Future<void> initDynamicLink() async {
    dynamicLinks.onLink.listen((dynamicLinkData) {
      final Uri uri = dynamicLinkData.link;
      final queryParams = uri.queryParameters;
      if (queryParams.isNotEmpty) {
        String? productId = queryParams['id'];
        Navigator.pushNamed(context, dynamicLinkData.link.path,
            arguments: {"productId": int.parse(productId!)});
      } else {
        Navigator.pushNamed(context, dynamicLinkData.link.path);
      }
    }).onError((error) {
      if (kDebugMode) {
        print(error);
      }
    });
  }

P.S.: I am able to create new short and long dynamic links from the app.

Sweta Jain
  • 3,248
  • 6
  • 30
  • 50

1 Answers1

0

This warning will show up if you haven't setup the Firebase Analytics SDK on your app. Make sure you have configured it properly on your app.

To add the Analytics SDK:

  1. From the root of your Flutter project, run the following command to install the plugin:

enter image description here

  1. Once complete, rebuild your Flutter application:

flutter run

  1. Once installed, you can access the firebase_analytics plugin by importing it in your Dart code:

enter image description here

  1. Create a new Firebase Analytics instance by calling the instance getter on FirebaseAnalytics:

enter image description here

You could check this guide for your reference.

dani
  • 354
  • 7