我已经把我的AppBar下移了,但是现在它的高度太大了。我想知道如何从AppBar的高度中减去状态栏的高度,如下所示: ? 下面是如何设置AppBar的高度: Flutter: Setting the height of the AppBar 下面是获取状态栏高度的方法: How or where do I change thesystem status bar Flutter</em
我找到了一些关于在flutter中计算高度的主题,但没有一个回答我的问题。我正在尝试计算颤动中的100% of device height。第一个是AppBar高度,所以我通过创建变量appBar和获取属性preferredSize.height来计算它。第二个是appBar上面的工具栏(它包含电池状态、通知等内容)。这是最简单的例子:Widget build(BuildContext context) {
var appBar