Flutter - Log Modal Bottom Sheet screen_view in analytics

Viewed 79

I've been tracking screen views by implementing RouteAware in stateful widgets that are stacked in the Navigator, together with a subscription in its Navigator RouteObserver. This is working fine.

Besides these PageRoutes, I also have a couple of Modals (eg BottomModalSheet) and Dialogs (eg InfoDialogBox) in my App. Would it be possible to have a similiar approach for modals & dialogs, so that I could track time spent on that screen without having to explicitly call setCurrentScreen?

Thanks for the help!

0 Answers
Related