📜  获取大小小部件渲染框 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:48.683000             🧑  作者: Mango

代码示例2
var myChildSize = Size.zero;

Widget build(BuildContext context) {
  return ...( 
    child: MeasureSize(
      onChange: (size) {
        setState(() {
          myChildSize = size;
        });
      },
      child: ...
    ),
  );
}