小编dip*_*nsh的帖子

当我将 MediaQuery.of(context).padding.top 与 appBar 一起使用时,它返回 0.0。这是为什么?

当我MediaQuery.of(context).padding.top在小部件树中没有导航栏的情况下使用时,它会返回实际的真实值。

Reloaded 1 of 529 libraries in 637ms.
I/flutter (31730): 24.0
Run Code Online (Sandbox Code Playgroud)

但是当我将 appBar 放入小部件树中时,它仅返回 0.0。

Reloaded 1 of 529 libraries in 764ms.
I/flutter (31730): 0.0
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙解释一下为什么会发生这种情况吗?

android emulation ios dart flutter

8
推荐指数
1
解决办法
4699
查看次数

如何禁用模拟器中的串行控制台?

有人知道如何禁用这个串行控制台吗?我是移动开发新手,所以我不太确定这是什么。当它不存在时,模拟器运行速度非常快,但在它弹出之后,模拟器变得缓慢且滞后。请帮忙!对你的帮助表示感谢。

在此输入图像描述

mobile android emulation mobile-development

6
推荐指数
1
解决办法
2781
查看次数

标签 统计

android ×2

emulation ×2

dart ×1

flutter ×1

ios ×1

mobile ×1

mobile-development ×1