emptyable_timer library
A handy timer that can be empty rather than nullable.
Classes
- EmptyableTimer
-
A convenient timer which can be empty (instead of nullable).
It can be canceled and can be checked for cancellation by using
isCancel
property. It implements Timer and have the same constructors: default and periodic EmptyableTimer.periodic and the same behavior except below. Also there is EmptyableTimer.empty constructor which creates an empty timer which isActive property is false andisCancel
is false as well. Then one needs it can be canceled by calling cancel as a result the property isCanceled will be true.
Typedefs
- TimerCallback = void Function(Timer timer)
- VoidCallback = void Function()