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