void resetAnimation(String name, {int? fromFrame}) { paused = false; _state = name; if (fromFrame != null) { index = fromFrame; } }