build method
Override this method to build widgets that depend on the state of the listenable (e.g., the current value of the animation).
Implementation
@override
Widget build(BuildContext context) {
final animation = listenable as Animation<double>;
return Sprite(
image: image,
frameWidth: frameWidth,
frameHeight: frameHeight,
frame: frameStart + (animation.value * frameCount).floor(),
color: color,
flipHorizontally: flipHorizontally,
);
}