play method

  1. @override
Future<void> play({
  1. Duration? initialDelay,
  2. AnimationCallback? callback,
})
override

Plays CSS animation.

  • initialDelay An initial delay, before start transitions.
  • callback Callback to be called after transition and set of _finalProperties.

NOTE: Should return null if isNotValid.

Implementation

@override
Future<void> play({Duration? initialDelay, AnimationCallback? callback}) {
  var plays = _configs
      .map((c) => c.play(initialDelay: initialDelay, callback: callback))
      .whereType<Future<void>>()
      .toList();
  return Future.wait(plays);
}