Adds the onNext callback to the animated widget.
Will be called right before the next text, after the pause parameter
final void Function(int, bool)? onNext;