formatter method

String formatter(
  1. Duration duration
)

Implementation

String formatter(Duration duration) => [
  duration.inMinutes.remainder(60).toString().padLeft(2, '0'),
  duration.inSeconds.remainder(60).toString().padLeft(2, '0')
].join(":");