当前位置:网站首页>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;
边栏推荐
- ansible学习笔记02
- 二分查找的细节坑
- 11 pinia use
- Unity 之 图集属性详解和代码示例 -- 拓展一键自动打包图集工具
- ansible study notes 02
- The normal form of the database (first normal form, second normal form, third normal form, BCNF normal form) "recommended collection"
- C language "the third is" upgrade (mode selection + AI chess)
- Kubernetes常用命令
- 2020 WeChat applet decompilation tutorial (can applet decompile source code be used)
- mongo enters error
猜你喜欢
Getting Started with TextBlock Control Basic Tools Usage, Get Started
The new BMW 3 Series is on the market, with safety and comfort
i.MX6ULL驱动开发 | 33 - NXP原厂网络设备驱动浅读(LAN8720 PHY)
[MySQL] Mysql paradigm and the role of foreign keys
第05章 存储引擎【1.MySQL架构篇】【MySQL高级】
Implementing distributed locks based on Redis (SETNX), case: Solving oversold orders under high concurrency
2022年整理LeetCode最新刷题攻略分享(附中文详细题解)
基于ABP实现DDD
Graham‘s Scan法求解凸包问题
Kubernetes常用命令
随机推荐
Website vulnerability repair service provider's analysis of unauthorized vulnerability
2020微信小程序反编译教程(小程序反编译源码能用吗)
How Redis handles concurrent access
6. 使用 Postman 工具高效管理和测试 SAP ABAP OData 服务
第05章 存储引擎【1.MySQL架构篇】【MySQL高级】
对话庄表伟:开源第一课
Design and Implementation of Compiler Based on C Language
Foreign media right, apple on May be true in inventory
【Meetup预告】OpenMLDB+OneFlow:链接特征工程到模型训练,加速机器学习模型开发
Kubernetes common commands
How to switch remote server in gerrit
Delete the disk in good condition (recovery partition)
数据表插入数据insert into
MySQL基础篇【单行函数】
在资源管理类中提供对原始资源的访问——条款15
多主复制下处理写冲突(4)-多主复制拓扑
Oracle动态注册非1521端口
Browser's built-in color picker
第二届中国PWA开发者日
Why is the field of hacking almost filled with boys?