screen method

  1. @override
void screen({
  1. required String name,
  2. Map<String, dynamic> attributes = const {},
})
override

Track screen events to record the screens a user visits

Implementation

@override
void screen(
    {required String name,
    Map<String, dynamic> attributes = const {}}) async {
  try {
    final payload = {
      TrackingConsts.eventName: name,
      TrackingConsts.attributes: attributes
    };
    methodChannel.invokeMethod(MethodConsts.screen, payload);
  } on PlatformException catch (exception) {
    handleException(exception);
  }
}