I write the code to AnimatedContainer and while it s expanding it give me gradual overflow but at full extent it s no more a overflow error. I tried the code on several screens and I don t have any problems. I want.
child: GestureDetector(
onTap: () {
setState(() {
arr[index] = !arr[index];
});
},
child: Center(
child: AnimatedContainer(
width: arr[index] ? 300.0 : 300.0,
height: arr[index] ? 80.0 : 85.0+60.0*clase[index].clase,
alignment:
arr[index] ? Alignment.center : AlignmentDirectional
.center,
duration: Duration(seconds: 1),
curve: Curves.fastOutSlowIn,
child: arr[index] ? Inchis(index) :Deschis(index),//these are the classes
),
),
),
Everything is fine but I want to escape of that little error. Here is a video https://imgur.com/0HXoIZN