EasyTimerCount constructor
EasyTimerCount({
- Key? key,
- required EasyTime duration,
- required FutureOr<
void> onTimerStarts(- BuildContext context
- required FutureOr<
void> onTimerEnds(- BuildContext context
- RankingType rankingType = RankingType.descending,
- SeparatorType? separatorType = SeparatorType.colon,
- bool resetTimer = false,
- Color? timerColor,
- FontWeight? timerTextWeight,
- double? fontSize,
- double? wordSpacing,
- double? letterSpacing,
- TextDecoration? decoration,
- Color? backgroundColor,
- TextDecorationStyle? textDecorationStyle,
- String? fontFamily,
- Locale? locale,
- TextOverflow? textOverflow,
- EasyTimerController? controller,
- bool reCountAfterFinishing = false,
- FutureOr<
void> onTimerRestart(- BuildContext context,
- int countOfRestart
Default constructor for EasyTimerCount.
Implementation
EasyTimerCount({
super.key,
required this.duration,
required this.onTimerStarts,
required this.onTimerEnds,
this.rankingType = RankingType.descending,
this.separatorType = SeparatorType.colon,
this.resetTimer = false,
this.timerColor,
this.timerTextWeight,
this.fontSize,
this.wordSpacing,
this.letterSpacing,
this.decoration,
this.backgroundColor,
this.textDecorationStyle,
this.fontFamily,
this.locale,
this.textOverflow,
this.controller,
this.reCountAfterFinishing = false,
this.onTimerRestart,
}) : builder = null,
assert(duration.seconds.isNotEqualZero || duration.minutes.isNotEqualZero || duration.hours.isNotEqualZero),
assert(
(reCountAfterFinishing && (onTimerRestart.isNotNull || onTimerRestart.isNull))
|| (!reCountAfterFinishing && onTimerRestart.isNull)
);