I have following Widget tree structure:
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Flexible(Text("Very very long text title", overflow: TextOverflow.ellipsis)),
getMenuAnchor(),
],
)),
IconButton(icon: 'share_icon.png')
],
);
If screen is having enough width it is displayed properly:
But if we switch from landscape to portrait mode, I want title to wrap and end with ellipses so share_icon
, menu_anchor
and text
can fit in single row without overflowing.
What should be widget tree so all elements can appear in a row without supressing share and menu icons?
2
Answers
Remove unused Container that wrap your Text and MenuAnchor:
Or if you really need the Container, then try wrap it with Flexible too:
Try this :