Closed joaomarccos closed 5 years ago
final child = YourCostyWidget();
return Animator(
tween: Tween<double>(begin: 0, end: 300),
cycles: 0,
child: SomeCostlyOrNotWidget() // <-----
builder: (anim,) => Center(
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
height: anim.value,
width: anim.value,
child: child, <--- No rebuild the entire widget
),
),
);
Yeah, actually I'm doing this way. But I think it should be possible directly inside the Animator Constructor.
Is there some way to provide a animator child like in animation controller to prevent rebuild expensive widgets??
Something like: