getAnimationDurationByName method

  1. @override
Future<double> getAnimationDurationByName(
  1. ThermionEntity entity,
  2. String name
)

Implementation

@override
Future<double> getAnimationDurationByName(
    ThermionEntity entity, String name) async {
  var animations = await getAnimationNames(entity);
  var index = animations.indexOf(name);
  if (index == -1) {
    throw Exception("Failed to find animation $name");
  }
  return getAnimationDuration(entity, index);
}