Flutter 有没有办法将appbar放置在颤振的底部?

Flutter 有没有办法将appbar放置在颤振的底部?,flutter,dock,appbar,Flutter,Dock,Appbar,有没有办法将appbar停靠在颤振的底部 谢谢。AppBar和其他任何小部件一样,只是一个小部件。你可以把它放在任何你想放的地方 甚至在Scaffold的bottomNavigationBar字段中 final appBar = new AppBar(title: new Text("data")); return new Scaffold( body: new Center( child: new FlatButton( child: new Text("data"),

有没有办法将appbar停靠在颤振的底部


谢谢。

AppBar
和其他任何小部件一样,只是一个小部件。你可以把它放在任何你想放的地方

甚至在
Scaffold
bottomNavigationBar
字段中

final appBar = new AppBar(title: new Text("data"));
return new Scaffold(
  body: new Center(
    child: new FlatButton(
      child: new Text("data"),
    ),
  ),
  bottomNavigationBar: new SizedBox(
    height: appBar.preferredSize.height,
    child: appBar,
  ),
);

虽然在这种情况下您也可以使用
BottomAppBar

我尝试了bottomNavigationBar,但它所做的是将appBar的底部边缘一直拉到底部,现在它填充了整个屏幕。这是我正在使用的示例,我试图将其放在底部,因为BottomAppBar与AppBar没有相同的属性,所以它无法工作。