animate method

void animate(
  1. GlobalKey<AnimateFromState> key, {
  2. Duration duration = const Duration(milliseconds: 1000),
  3. Curve curve = Curves.easeInOut,
})

Triggers the animation from the AnimateFrom widget by key.

Implementation

void animate(
  GlobalKey<AnimateFromState> key, {
  Duration duration = const Duration(milliseconds: 1000),
  Curve curve = Curves.easeInOut,
}) {
  _streamController.add(AnimateToInput(
    key: key,
    duration: duration,
    curve: curve,
  ));
}