animations property

Map<T, SpriteAnimation>? animations

Returns the map of animation state and their corresponding animations.

Implementation

Map<T, SpriteAnimation>? get animations => _animations;
void animations=(Map<T, SpriteAnimation>? value)

Sets the given value as new animation state map.

Implementation

set animations(Map<T, SpriteAnimation>? value) {
  if (_animations != value) {
    _animations = value;

    _animationTickers = _animations != null
        ? Map.fromEntries(
            _animations!.entries
                .map((e) => MapEntry(e.key, e.value.createTicker()))
                .toList(),
          )
        : null;
    _resizeToSprite();
  }
}