How to achieve expansion of a widget in both vertical (height) and horizontal (width) direction

前端 未结 4 1252
予麋鹿
予麋鹿 2021-02-18 15:30

The code below lays out a chart in which I\'d need to achieve for the chart to be expanded in both vertical (height) and horizontal (width) direction. The suggested method (e.g.

4条回答
  •  春和景丽
    2021-02-18 15:56

    Use SizedBox.expand:

    SizedBox.expand(
      child: YourWidget() // Could be anything like `Column`, `Stack`...
    )
    

提交回复
热议问题