API Reference
API Reference

Moca provides a route observer to automatically track screen transitions. Add it to your app’s navigator:

MaterialApp(
  title: 'My App',
  navigatorObservers: [Moca.getNavigatorObserver()],
  home: HomeScreen(),
);

You must install the observer before you initialize Moca SDK.
Alternatively, manually track screens using:

await Moca.trackScreen("HomeScreen");