Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
5809a0cb
Commit
5809a0cb
authored
Jun 20, 2016
by
Todd Volkert
Committed by
GitHub
Jun 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Brightness back to the material library (#4635)
parent
3b9d8c5e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
18 deletions
+16
-18
theme.dart
packages/flutter/lib/src/material/theme.dart
+1
-1
theme_data.dart
packages/flutter/lib/src/material/theme_data.dart
+15
-2
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+0
-15
No files found.
packages/flutter/lib/src/material/theme.dart
View file @
5809a0cb
...
...
@@ -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
);
...
...
packages/flutter/lib/src/material/theme_data.dart
View file @
5809a0cb
...
...
@@ -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
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
5809a0cb
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment