当前位置:网站首页>Flutter 获取状态栏statusbar的高度
Flutter 获取状态栏statusbar的高度
2022-07-31 16:14:00 【可口码农】
之所以发这篇短文是因为我使用网络上大量推荐的解决方案无法 获取到 statusbar的高度。
final double statusBarHeight = MediaQuery.of(context).padding.top;这代码无法获取得到真实的statusbar 高度。
如果你使用以上方法也获取不到真是的statusbar高度,推荐使用
//先引入
import 'dart:ui';
MediaQueryData.fromWindow(window).padding.top;
边栏推荐
- Design and Implementation of Compiler Based on C Language
- 动态规划之线性dp(上)
- Linux check redis version (check mongodb version)
- Kubernetes common commands
- Single-cell sequencing workflow (single-cell RNA sequencing)
- what exactly is json (c# json)
- C language - function
- tensorflow2.0 cnn(layerwise)
- 牛客 HJ16 购物单
- Visualize GraphQL schemas with GraphiQL
猜你喜欢

第二届中国PWA开发者日

C程序是如何跑起来的01 —— 普通可执行文件的构成

MySQL的相关问题

What is the difference between BI software in the domestic market?

复杂高维医学数据挖掘与疾病风险分类研究

OPPO在FaaS领域的探索与思考

Implementing distributed locks based on Redis (SETNX), case: Solving oversold orders under high concurrency

11 pinia use

type of timer

tooltips使用教程(鼠标悬停时显示提示)
随机推荐
mysql黑窗口~建库建表
Replication Latency Case (1) - Eventual Consistency
LevelSequence源码分析
mysql black window ~ build database and build table
Handling write conflicts under multi-master replication (4) - multi-master replication topology
type of timer
SringMVC中个常见的几个问题
更新数据表update
牛客 HJ20 密码验证合格程序
全新宝马3系上市,安全、舒适一个不落
form 表单提交后,使页面不跳转[通俗易懂]
Graham's Scan method for solving convex hull problems
Delete table data or clear table
牛客 HJ19 简单错误记录
Codeforces Round #796 (Div. 2) (A-D)
update data table update
i.MX6ULL driver development | 33 - NXP original network device driver reading (LAN8720 PHY)
Insert into data table to insert data
"Autumn Recruitment Series" MySQL Interview Core 25 Questions (with answers)
Snake Project (Simple)