diff --git a/packages/flutter/lib/src/material/theme.dart b/packages/flutter/lib/src/material/theme.dart index befafaa0f7..b591a47867 100644 --- a/packages/flutter/lib/src/material/theme.dart +++ b/packages/flutter/lib/src/material/theme.dart @@ -7,7 +7,7 @@ import 'package:meta/meta.dart'; import 'theme_data.dart'; -export 'theme_data.dart' show ThemeData; +export 'theme_data.dart' show Brightness, ThemeData; /// The duration over which theme changes animate. const Duration kThemeAnimationDuration = const Duration(milliseconds: 200); diff --git a/packages/flutter/lib/src/material/theme_data.dart b/packages/flutter/lib/src/material/theme_data.dart index 63237dcec4..1d9f4c663e 100644 --- a/packages/flutter/lib/src/material/theme_data.dart +++ b/packages/flutter/lib/src/material/theme_data.dart @@ -4,12 +4,25 @@ import 'dart:ui' show Color, hashValues; -import 'package:flutter/widgets.dart'; - import 'colors.dart'; import 'icon_theme_data.dart'; import 'typography.dart'; +/// Describes the contrast needs of a color. +enum Brightness { + /// The color is dark and will require a light text color to achieve readable + /// contrast. + /// + /// For example, the color might be dark grey, requiring white text. + dark, + + /// The color is light and will require a dark text color to achieve readable + /// contrast. + /// + /// For example, the color might be bright white, requiring black text. + light, +} + // Deriving these values is black magic. The spec claims that pressed buttons // have a highlight of 0x66999999, but that's clearly wrong. The videos in the // spec show that buttons have a composited highlight of #E1E1E1 on a background diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 01f22a0260..bee8a49285 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -382,21 +382,6 @@ class ClipPath extends SingleChildRenderObjectWidget { } } -/// Describes the contrast needs of a color. -enum Brightness { - /// The color is dark and will require a light text color to achieve readable - /// contrast. - /// - /// For example, the color might be dark grey, requiring white text. - dark, - - /// The color is light and will require a dark text color to achieve readable - /// contrast. - /// - /// For example, the color might be bright white, requiring black text. - light, -} - // POSITIONING AND SIZING NODES