PhasedState<T> constructor

PhasedState<T>({
  1. required List<T> values,
  2. bool autostart = true,
  3. T? initialValue,
  4. Duration? ticker,
})

Holds the state of a Phased widget.

Implementation

PhasedState({
  required List<T> values,
  bool autostart = true,
  T? initialValue,
  this.ticker,
})  : _values = values,
      _autostart = autostart {
  _value = initialValue ?? values.first;
  _index = _values.indexOf(_value);
}