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<double> animation = listenable as Animation<double>;
return AnimatedBuilder(
animation: animation,
builder: (context, child) => Container(
padding: EdgeInsets.only(left: animation.value + end, right: end - animation.value),
child: widget,
),
);
}