'How to track screen on firebase analytics flutter

I'm trying to add a firebase analytics track screen to my app. I tried to enter it in the menu like in the picture below but it always doesn't read

menu for tracking screen

I've tried some code but it doesn't work. For now, the code I'm using is as follows:

      FirebaseAnalyticsObserver(analytics: analytics);

 onGenerateRoute: widget.appRouter.onGenerateRoute,
          builder: EasyLoading.init(),
          initialRoute: splashScreenRoute,
          navigatorObservers: <NavigatorObserver>[
            // FirebaseAnalyticsObserver(analytics: _analytics),
            observer
          ] 

and on each screen I add code like this below on each initState()

analytics.setCurrentScreen(screenName: 'Page Detail Mobil');

i have re-run the app but it doesn't work track screen and put in firebase analytic. please help me thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source