当前位置:网站首页>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;
边栏推荐
- Implementing click on the 3D model in RenderTexture in Unity
- Vb how to connect mysql_vb how to connect to the database collection "advice"
- Baidu cloud web speed playback (is there any website available)
- Applicable Scenarios of Multi-Master Replication (1) - Multi-IDC
- LevelSequence源码分析
- ASP.NET Core generates continuous Guid
- Small program: Matlab solves differential equations "recommended collection"
- arm按键控制led灯闪烁(嵌入式按键实验报告)
- jeecg主从数据库读写分离配置「建议收藏」
- How C programs run 01 - the composition of ordinary executable files
猜你喜欢
T - sne + data visualization parts of the network parameters
Internet banking stolen?This article tells you how to use online banking safely
01 Encounter typescript, build environment
[MySQL] Mysql paradigm and the role of foreign keys
"Autumn Recruitment Series" MySQL Interview Core 25 Questions (with answers)
gerrit中如何切换远程服务器
第05章 存储引擎【1.MySQL架构篇】【MySQL高级】
Grafana安装后web打开报错
研发过程中的文档管理与工具
C language "the third is" upgrade (mode selection + AI chess)
随机推荐
EF Core 2.2中将ORM框架生成的SQL语句输出到控制台
6-22漏洞利用-postgresql数据库密码破解
Small program: Matlab solves differential equations "recommended collection"
Summary of the implementation method of string inversion "recommended collection"
Graham's Scan method for solving convex hull problems
软件实现AT命令操作过程
牛客 HJ17 坐标移动
Implementing DDD based on ABP
Internet banking stolen?This article tells you how to use online banking safely
Deployment application life cycle and Pod health check
SHELL内外置命令
tooltips使用教程(鼠标悬停时显示提示)
Qt practical cases (54) - using transparency QPixmap design pictures
ansible study notes 02
国内市场上的BI软件,到底有啥区别
牛客网刷题(二)
[7.28] Code Source - [Fence Painting] [Appropriate Pairs (Data Enhanced Version)]
基于ABP实现DDD
【7.29】代码源 - 【排列】【石子游戏 II】【Cow and Snacks】【最小生成数】【数列】
基于Redis(SETNX)实现分布式锁,案例:解决高并发下的订单超卖,秒杀