getBeginRatio method

double getBeginRatio(
  1. AnimationController controller,
  2. EffectEntry entry
)

Returns a ratio corresponding to the beginning of the specified entry.

Implementation

double getBeginRatio(AnimationController controller, EffectEntry entry) {
  int ms = controller.duration?.inMilliseconds ?? 0;
  return ms == 0 ? 0 : entry.begin.inMilliseconds / ms;
}