view method

  1. @override
String view()
override

Returns the view of the timer.

By default returns the timeout formatted as MM:SS. Override this method or use a custom formatter for different display.

Implementation

@override
String view() {
  final minutes = timeout.inMinutes;
  final seconds = timeout.inSeconds % 60;
  return '${minutes.toString().padLeft(2, '0')}:${seconds.toString().padLeft(2, '0')}';
}