duration property

  1. @override
double get duration
override

The duration of the effect.

If this is called before the effect has started, it might not have the correct duration when it is later used, for example if you're using a DelayedEffectController and then the component moves before the delay is over.

Implementation

@override
double get duration {
  return _initialized
      ? child.duration
      : (_parentEffect?.measure() ?? double.nan) / speed;
}