首页 > 其他 > 详细

[Flutter] Flexible the Widget height to available space

时间:2019-11-16 09:49:03      阅读:87      评论:0      收藏:0      [点我收藏+]

Let‘s say you set widget height to 200, but to different screen, there might not be enough space for the widget to display, in this case, you can use Flexible widget:

              Flexible(
                child: Hero(
                  tag: ‘flash‘,
                  child: Container(
                    height: 200.0,
                    child: Image.asset(‘images/logo.png‘),
                  ),
                ),
              ),

It will display enough space for Widget which it wraps. Save space for other Widgets.

[Flutter] Flexible the Widget height to available space

原文:https://www.cnblogs.com/Answer1215/p/11870381.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!