From b96939a67b1874b6b2f98a3f832d429837378217 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Tue, 9 Feb 2016 11:51:38 -0800 Subject: [PATCH] removed kStatusBarHeight constant --- packages/flutter/lib/src/material/constants.dart | 3 --- packages/flutter/lib/src/material/drawer_header.dart | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/flutter/lib/src/material/constants.dart b/packages/flutter/lib/src/material/constants.dart index 3ad1a04d6d6..b546a959ea1 100644 --- a/packages/flutter/lib/src/material/constants.dart +++ b/packages/flutter/lib/src/material/constants.dart @@ -4,9 +4,6 @@ import 'package:flutter/widgets.dart'; -// TODO(ianh): Figure out actual specced height for status bar -const double kStatusBarHeight = 50.0; - // TODO(eseidel) Toolbar needs to change size based on orientation: // http://www.google.com/design/spec/layout/structure.html#structure-app-bar // Mobile Landscape: 48dp diff --git a/packages/flutter/lib/src/material/drawer_header.dart b/packages/flutter/lib/src/material/drawer_header.dart index 11e1e29d305..bb265dbb2ad 100644 --- a/packages/flutter/lib/src/material/drawer_header.dart +++ b/packages/flutter/lib/src/material/drawer_header.dart @@ -18,8 +18,9 @@ class DrawerHeader extends StatelessComponent { Widget build(BuildContext context) { assert(debugCheckHasMaterial(context)); + final double statusBarHeight = (MediaQuery.of(context)?.padding ?? EdgeDims.zero).top; return new Container( - height: kStatusBarHeight + kMaterialDrawerHeight, + height: statusBarHeight + kMaterialDrawerHeight, decoration: new BoxDecoration( backgroundColor: Theme.of(context).cardColor, border: const Border(