防止Row中的東西Overflow

這裡使用Expanded或Flexible都可以

1
2
3
4
5
6
7
child: Row(
children: <Widget>[
Expanded(
child: Text(...),
)
],
),

防止Column中的東西Overflow

這裡使用SingleChildScrollView

1
2
3
4
5
6
7
8
9
child: SingleChildScrollView(
child: Column(
children: <Widget>[
SomeWidget(),
SomeWidget(),
SomeWidget(),
],
),
),