animateTag method

void animateTag(
  1. Object targetTag, {
  2. Duration duration = const Duration(milliseconds: 1000),
  3. Curve curve = Curves.easeInOut,
})

Triggers the animation from the AnimateFrom widget by tag.

Implementation

void animateTag(
  Object targetTag, {
  Duration duration = const Duration(milliseconds: 1000),
  Curve curve = Curves.easeInOut,
}) {
  final key = _generatedKeys[targetTag];
  if (key == null) {
    throw FlutterError('No key found for the tag: $targetTag');
  }
  animate(key, duration: duration, curve: curve);
}