Tagged articles
3 articles
Page 1 of 1
Sohu Tech Products
Sohu Tech Products
Aug 14, 2024 · Mobile Development

Understanding Flutter Status Bar Height: Why MediaQuery.padding.top Returns 0

In Flutter, MediaQuery.of(context).padding.top reports the system UI inset rather than the actual status‑bar height, and when a Scaffold (especially with an AppBar) consumes this padding the value becomes zero, so developers must read the raw view padding via WidgetsBinding or MediaQueryData.fromView to reliably obtain the status‑bar height.

AndroidDARTFlutter
0 likes · 5 min read
Understanding Flutter Status Bar Height: Why MediaQuery.padding.top Returns 0
政采云技术
政采云技术
Mar 25, 2022 · Mobile Development

Low-Cost Screen Adaptation Solutions in Flutter

This article explores low-cost screen adaptation techniques in Flutter, analyzing physical vs logical pixels, evaluating existing solutions like flutter_screenutil, and proposing two approaches—modifying engine-level ViewConfiguration and customizing WidgetsFlutterBinding—to achieve consistent UI across devices without invasive code changes.

FlutterMediaQueryUI consistency
0 likes · 12 min read
Low-Cost Screen Adaptation Solutions in Flutter