I have an animation that I want to be partially visible.
Basically the end of the screen should cut the animation in half. So the animation is overflowing but that's intended. How do I remove the overflowed message then ?
return ClipRect(
child: Container(
width: MediaQuery.of(context).size.width - 32,
child: Padding(
padding: const EdgeInsets.fromLTRB(spacingM, spacingM, 0, spacingM),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextInfo(
location: location, dateFormatter: dateFormatter, date: date),
Transform.translate(
offset: Offset(30, 0),
child: WeatherAnimation(),
),
],
),
),
),
);
Try using wrapping what is overflowing with a FittedBox. This will clip out what is overflowing.
In this scenario, I believe you should wrap the Padding
widget or perhaps the Row
widget with FittedBox
which would allow the FittedBox
to take shape of its parent and clip the children to fit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With