current property

T? get current

Returns the current group state.

Implementation

T? get current => _current;
set current (T? value)

The group state to given state.

Will update size if autoResize is true.

Implementation

set current(T? value) {
  assert(_animations != null, 'Animations not set');
  assert(
    _animations!.keys.contains(value),
    'Animation not found for key: $value',
  );

  final changed = value != current;
  _current = value;
  _resizeToSprite();

  if (changed) {
    if (autoResetTicker) {
      animationTicker?.reset();
    }
    _currentAnimationNotifier?.value = value;
  }
}