获取状态栏高度
import 'dart:ui';
MediaQueryData.fromWindow(window).padding.top
系统默认的appBar等高度
位于Dart Packages/flutter/src/material/constans.dart
/// The height of the toolbar component of the [AppBar].
const double kToolbarHeight = 56.0;
/// The height of the bottom navigation bar.
const double kBottomNavigationBarHeight = 56.0;
/// The height of a tab bar containing text.
const double kTextTabBarHeight = 48.0;
本文介绍了如何使用Dart语言获取设备状态栏的高度,并提供了默认的AppBar、底部导航栏及包含文本的TabBar的标准高度。
1万+

被折叠的 条评论
为什么被折叠?



