Creates a widget that rebuilds when the given animation changes value.
The animation argument is required.
AnimatedWidget({ Key key, @required this.animation }) : super(key: key) { assert(animation != null); }