美文网首页
【Flutter】LayoutBuilder作为child获取父

【Flutter】LayoutBuilder作为child获取父

作者: DerekTime | 来源:发表于2021-07-20 20:13 被阅读0次
LayoutBuilder(
    builder: (context, constraints){
      /// constraints 

      /// The maximum width that satisfies the constraints.
      ///
      /// Might be [double.infinity].
      final double maxWidth;

      /// The maximum height that satisfies the constraints.
      ///
      /// Might be [double.infinity].
      final double maxHeight;
     } 
  )

相关文章

网友评论

      本文标题:【Flutter】LayoutBuilder作为child获取父

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