我有一张罗子,内有2个灵活文本。
Row(
children: [
Flexible(child: Text( blah )),
Flexible(child: Text( blah )),
],
);
我想说明如何做到:
- When both items are short, align item 1 to start and item 2 to end.
- When item 1 is long and wants to take up more width than its flex bound - allow this as long as item 2 is not taking up that space (and vice versa)
- When both items are long, respect the flex bound and maintain the 1:1 flex ratio.
I ve 尝试了Expand
、Flexible
和MainAxisAlignment
等各种组合: 罗代码>,但似乎无法说明如何照搬上述要求。
任何帮助都将受到高度赞赏。