toText method

String toText()

Return duration string in '00:00' format

Implementation

String toText() {
  String twoDigits(int n) => n.toString().padLeft(2, '0');
  final twoDigitMinutes = twoDigits(inMinutes.remainder(60));
  final twoDigitSeconds = twoDigits(inSeconds.remainder(60));
  return '$twoDigitMinutes:$twoDigitSeconds';
}