当前位置:网站首页>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;
边栏推荐
- MySQL的相关问题
- How to switch remote server in gerrit
- Qt practical cases (54) - using transparency QPixmap design pictures
- WPF project - basic usage of controls entry, you must know XAML
- The use of button controls
- .NET 20周年专访 - 张善友:.NET 技术是如何赋能并改变世界的
- 深度学习机器学习理论及应用实战-必备知识点整理分享
- Replication Latency Case (3) - Monotonic Read
- Tencent Cloud Deployment----DevOps
- SringMVC中个常见的几个问题
猜你喜欢

The 2nd China PWA Developer Day

"Autumn Recruitment Series" MySQL Interview Core 25 Questions (with answers)

基于ABP实现DDD

对话庄表伟:开源第一课

The use of border controls

6-22漏洞利用-postgresql数据库密码破解

C language - function

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

C语言”三子棋“升级版(模式选择+AI下棋)

Internet banking stolen?This article tells you how to use online banking safely
随机推荐
牛客 HJ18 识别有效的IP地址和掩码并进行分类统计
01 Encounter typescript, build environment
Stuck in sill idealTree buildDeps during npm installation, npm installation is slow, npm installation is stuck in one place
tooltips使用教程(鼠标悬停时显示提示)
gerrit中如何切换远程服务器
t-sne 数据可视化网络中的部分参数+
Foreign media right, apple on May be true in inventory
在资源管理类中提供对原始资源的访问——条款15
Matlab matrix basic operations (definition, operation)
Baidu cloud web speed playback (is there any website available)
Single-cell sequencing workflow (single-cell RNA sequencing)
MySQL multi-table union query
Replication Latency Case (3) - Monotonic Read
How to switch remote server in gerrit
Browser's built-in color picker
Unity中实现点选RenderTexture中的3D模型
长得很怪的箱图
Premiere Pro 2022 for (pr 2022)v22.5.0
[Meetup Preview] OpenMLDB+OneFlow: Link feature engineering to model training to accelerate machine learning model development
字符指针赋值[通俗易懂]