@protected bool isDuration() { return widget.duration != null && widget.duration!.inMilliseconds > 0; }