completed property

Future<void> get completed

A future that will complete when the animation completes.

An animation is considered to be completed if it reaches its isLastFrame and is not looping.

Implementation

Future<void> get completed {
  if (_done) {
    return Future.value();
  }

  completeCompleter ??= Completer<void>();

  return completeCompleter!.future;
}