Flutter:如何在 ListView 之后的页面底部添加锚定按钮

Flutter: how to add anchored button at the bottom of a page after a ListView

到目前为止,这是我的代码,我想将 Material 按钮锚定在屏幕底部,所以我希望我的专栏能够获取所有可用的 space屏幕,我不能为此使用 bottomsheet 之类的脚手架参数,因为它是另一个小部件,并且有一些单独的逻辑要求按钮与 listView

位于同一位置
Scaffold(
  body: Column(children[
    Container(),
    Container(),
    _myWidget(),
]));
Widget _myWidget(){
return Expanded(
  child: Column(
    children:[
      Container(),
      ListView.builder( /* more_code*/ ),
      Align(
        alignment: Alignment.bottomCenter,
        child: MaterialButton(/* more_code */)
      ),],),
);

这就是按钮现在的样子,我想把它固定在底部

用栈代替列写

Widget _myWidget(){
return Expanded(
  child: Stack(
    children:[
      Container(),
      ListView.builder( /* more_code*/ ),
      Align(
        alignment: Alignment.bottomCenter,
        child: MaterialButton(/* more_code */)
      ),],),
);