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(_sprites != null, 'Sprites not set');
  assert(_sprites!.keys.contains(value), 'Sprite not found for key: $value');

  final changed = _current != value;
  _current = value;
  _resizeToSprite();
  if (changed) {
    _currentSpriteNotifier?.value = value;
  }
}