ClockWidget.stopwatch constructor
const
ClockWidget.stopwatch({
- Key? key,
- double clockSize = 20.0,
- double? height,
- ClockColors colors = const ClockColors(),
- double borderWidth = 2.0,
- double handWidth = 2.0,
- required ClockController? controller,
- bool showControls = false,
- bool showStartButton = true,
- bool showPauseButton = true,
- bool showResetButton = true,
- String startButtonText = 'Start',
- String pauseButtonText = 'Pause',
- String resetButtonText = 'Reset',
- double? buttonWidth,
- double? buttonHeight,
- double? buttonFontSize,
- EdgeInsets? buttonPadding,
- bool showPeriodIndicator = true,
- bool showHours = true,
- bool showMinutes = true,
- 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;