美文网首页
Flutter Row Column 布局溢出的问题

Flutter Row Column 布局溢出的问题

作者: Coding的大雄 | 来源:发表于2021-08-20 16:19 被阅读0次

    大家在学习Flutter的时候,刚刚开始学习布局应该会各种遇到溢出。比如在用到Row或者Column经常会遇到布局溢出的问题。

    Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the RenderFlex to fit within the available space instead of being sized to their natural size.

    This is considered an error condition because it indicates that there is content that cannot be seen. If the content is legitimately bigger than the available space, consider clipping it with a ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex, like a ListView.

    SingleChildScrollView和Expanded做为布局防止布局溢出

    相关文章

      网友评论

          本文标题:Flutter Row Column 布局溢出的问题

          本文链接:https://www.haomeiwen.com/subject/lrtmyltx.html