onCompleted method

void onCompleted(
  1. String id,
  2. AnimatableProperty property,
  3. void callback()
)

Called when an animation completes.

Implementation

void onCompleted(
  String id,
  AnimatableProperty property,
  void Function() callback,
) {
  onWindowEvent(id, 'complete', (event) {
    if (event.data['property'] == property.name) {
      callback();
    }
  });
}