logStopwatch method Null safety

void logStopwatch(
  1. String task,
  2. Stopwatch stopwatch
)

After a task has completed, log time to completion.

Implementation

void logStopwatch(String task, Stopwatch stopwatch) {
  final elapsedSeconds = stopwatchToSeconds(stopwatch);
  logger.info('$task, took $elapsedSeconds');
}