美文网首页
Flutter 设置AppBar高度

Flutter 设置AppBar高度

作者: Codepgq | 来源:发表于2020-05-28 20:36 被阅读0次

使用脚手架Scaffold可以设置AppBar,想要设置高度,在AppBar外包一层PreferredSize,设置preferredSize的属性为想要的高度即可。

   Scaffold( 
        appBar: PreferredSize(
        child: AppBar(
        ),
        preferredSize: Size.fromHeight(screenSize.height * 0.07))
  );

相关文章

网友评论

      本文标题:Flutter 设置AppBar高度

      本文链接:https://www.haomeiwen.com/subject/inlzahtx.html