animation property
String?
get
animation
A start animation. We will use it for calculate bounds by frames.
Implementation
String? get animation {
if (_animation != null) {
return _animation;
}
if (skeleton.data.animations.isNotEmpty) {
return skeleton.data.animations.first.name;
}
return null;
}
set
animation
(String? value)
Implementation
set animation(String? value) {
if (_animation == value) {
return;
}
_animation = value;
if (_skeleton != null && animation != null) {
skeleton.state.setAnimation(0, animation!, true);
bounds = _calculateBounds();
}
}