reportScreenOpened static method

Future<void> reportScreenOpened(
  1. String? screenName, {
  2. Map<String, Object>? attributes,
})

Report screen change to implement Heatmaps functionality in UserX It removes all chars since ? and # (keep just path without queue and anchor)

Implementation

static Future<void> reportScreenOpened(String? screenName, {Map<String, Object>? attributes}) async {
  final sn = _normalizeScreenName(screenName);
  if (_previousScreenName == sn) return;
  _previousScreenName = sn;
  _screenNames.add(sn);
  reportEvent('$sn, screen opened', attributes: attributes);
  unawaited(FlutterUxcam.tagScreenName(sn));
}