flutter获取状态栏高度

获取状态栏高度

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;
    原文作者:温酒睡黄昏
    原文地址: https://blog.csdn.net/u013034413/article/details/82629944
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞