📌  相关文章
📜  singlechildscrollview 在列内不起作用 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:47.055000             🧑  作者: Mango

代码示例2
Widget build(BuildContext context) =>
Scaffold(
  body: Column(
    children: [
      Container(
        height: 100.0,
        color: Colors.blue,
      ),
      Expanded(
        child: SingleChildScrollView(
          child: Container(
            color: Colors.red,
            padding: EdgeInsets.all(20.0),
            child: Column(
              children: [
                Text('Red container should be scrollable'),
                Container(
                  width: double.infinity,
                  height: 700.0,
                  padding: EdgeInsets.all(10.0),
                  color: Colors.white.withOpacity(0.7),
                  child: Text('I will have a column here'),
                )
              ],
            ),
          ),
        ),
      ),
    ],
  ),
);