it's flutter I don't want to see textwidget4. A row widget is at most one line.
I don't want to show the passed textwidget when the length of the row exceeds the SizedBox What should I do?
it's flutter I don't want to see textwidget4. A row widget is at most one line.
I don't want to show the passed textwidget when the length of the row exceeds the SizedBox What should I do?
plaese look at https://pub.dev/packages/visibility_detector
I think with this library you can Understand which widget is not Completely Visible . (visiblePercentage
)
@override
Widget build(BuildContext context) {
return VisibilityDetector(
key: Key('my-widget-key'),
onVisibilityChanged: (visibilityInfo) {
var visiblePercentage = visibilityInfo.visibleFraction * 100;
debugPrint(
'Widget ${visibilityInfo.key} is ${visiblePercentage}% visible');
},
child: someOtherWidget,
);
}