颤动 - 如何在顶部和底部对齐(这是问题) - 和列中间部分

flutter - how to align at the top and at the bottom (this is the issue) - and column middle part

我想在小部件的底部对齐一个容器(假设顶部已经有容器,中间有一些列)

到目前为止,我可以在顶部对齐,然后使用 Alignment.topCenter 和列对齐一些容器。

  body: Align(
    alignment: Alignment.topCenter,
    child: Column(
      mainAxisSize: MainAxisSize.min,
      children: [

然后我怎样才能在小部件的底部再放置一个容器。

这样做的原因是我希望广告横幅出现在顶部和底部。中间才是真正的内容。

在 Align Widget 的顶部添加 Column,并在其容器的底部添加 Expanded

  Expanded(
        child: Align(
          alignment: Alignment.bottomCenter,
          child: Container(
            height: 100,  // Give height of banner
            color: Colors.green,
          ),
        ),
      ),