AnimatedWidget({Key key, @required Animation<Object> animation })

Creates a widget that rebuilds when the given animation changes value.

The animation argument is required.

Source

AnimatedWidget({
  Key key,
  @required this.animation
}) : super(key: key) {
  assert(animation != null);
}