recordScreenExit method

int? recordScreenExit(
  1. String screenName
)

Records when a screen was exited and returns time spent in seconds.

Implementation

int? recordScreenExit(String screenName) {
  final stopwatch = _screenStopwatches.remove(screenName);
  if (stopwatch == null) return null;

  stopwatch.stop();

  return stopwatch.elapsed.inSeconds;
}