ClockWidget.stopwatch constructor

const ClockWidget.stopwatch({
  1. Key? key,
  2. double clockSize = 20.0,
  3. double? height,
  4. ClockColors colors = const ClockColors(),
  5. double borderWidth = 2.0,
  6. double handWidth = 2.0,
  7. required ClockController? controller,
  8. bool showControls = false,
  9. bool showStartButton = true,
  10. bool showPauseButton = true,
  11. bool showResetButton = true,
  12. String startButtonText = 'Start',
  13. String pauseButtonText = 'Pause',
  14. String resetButtonText = 'Reset',
  15. double? buttonWidth,
  16. double? buttonHeight,
  17. double? buttonFontSize,
  18. EdgeInsets? buttonPadding,
  19. bool showPeriodIndicator = true,
  20. bool showHours = true,
  21. bool showMinutes = true,
  22. bool showSeconds = true,
})

Creates a ClockWidget that functions as a stopwatch.

Implementation

const ClockWidget.stopwatch({
  super.key,
  this.clockSize = 20.0,
  this.height,
  this.colors = const ClockColors(),
  this.borderWidth = 2.0,
  this.handWidth = 2.0,
  required this.controller,
  this.showControls = false,
  this.showStartButton = true,
  this.showPauseButton = true,
  this.showResetButton = true,
  this.startButtonText = 'Start',
  this.pauseButtonText = 'Pause',
  this.resetButtonText = 'Reset',
  this.buttonWidth,
  this.buttonHeight,
  this.buttonFontSize,
  this.buttonPadding,
  this.showPeriodIndicator = true,
  this.showHours = true,
  this.showMinutes = true,
  this.showSeconds = true,
})  : mode = ClockMode.stopwatch,
      shadow = true,
      twelveHourFormat = false,
      initialTimerDuration = null,
      staticTime = null,
      animateToPosition = false;