В Android мы можем сделать следующее, чтобы ImageView
заполнял как можно больше места в зависимости от размера TextView
.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
Как этого добиться в Flutter
? Предположим, мне нужно сделать Datetime
(зеленый), чтобы заполнить как можно больше.
new Column(
children: <Widget>[
new Text('Title',
style: new TextStyle(fontWeight: FontWeight.bold)
),
new Text('Datetime',
style: new TextStyle(color: Colors.grey)
),
],
)