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
2e0beb84
Commit
2e0beb84
authored
Oct 20, 2016
by
Ian Hickson
Committed by
Seth Ladd
Oct 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more docs regarding color. (#6439)
Based on observations of usability study participant P1.
parent
fdb76da5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
0 deletions
+56
-0
colors.dart
packages/flutter/lib/src/material/colors.dart
+15
-0
divider.dart
packages/flutter/lib/src/material/divider.dart
+6
-0
flat_button.dart
packages/flutter/lib/src/material/flat_button.dart
+10
-0
icon.dart
packages/flutter/lib/src/material/icon.dart
+9
-0
icon_button.dart
packages/flutter/lib/src/material/icon_button.dart
+8
-0
raised_button.dart
packages/flutter/lib/src/material/raised_button.dart
+8
-0
No files found.
packages/flutter/lib/src/material/colors.dart
View file @
2e0beb84
...
...
@@ -6,6 +6,21 @@ import 'dart:ui' show Color;
/// [Color] constants which represent Material design's
/// [color palette](http://www.google.com/design/spec/style/color.html).
///
/// To select a specific color from one of the swatches, index into the swatch
/// using an integer for the specific color desired, as follows:
///
/// ```dart
/// Colors.green[400] // Selects a mid-range green.
/// ```
///
/// Most swatches have colors from 100 to 900 in increments of one hundred, plus
/// the color 50. The smaller the number, the more pale the color. The greater
/// the number, the darker the color. The accent swatches (e.g. [redAccent]) only
/// have the values 100, 200, 400, and 700.
///
/// In addition, a series of blacks and whites with common opacities are
/// available. For example, [black54] is a pure black with 54% opacity.
class
Colors
{
Colors
.
_
();
...
...
packages/flutter/lib/src/material/divider.dart
View file @
2e0beb84
...
...
@@ -46,6 +46,12 @@ class Divider extends StatelessWidget {
///
/// Defaults to the current theme's divider color, given by
/// [ThemeData.dividerColor].
///
/// ```dart
/// new Divider(
/// color: Colors.deepOrange[500],
/// ),
/// ```
final
Color
color
;
@override
...
...
packages/flutter/lib/src/material/flat_button.dart
View file @
2e0beb84
...
...
@@ -70,6 +70,16 @@ class FlatButton extends StatelessWidget {
/// The color of the button, as printed on the [Material]. Defaults to null,
/// meaning that the color is automatically derived from the [Theme].
///
/// Typically, a material design color will be used, as follows:
///
/// ```dart
/// new FlatButton(
/// color: Colors.blue[500],
/// onPressed: _handleTap,
/// child: new Text('DEMO'),
/// ),
/// ```
final
Color
color
;
/// The color of the button when the button is disabled. Buttons are disabled
...
...
packages/flutter/lib/src/material/icon.dart
View file @
2e0beb84
...
...
@@ -65,6 +65,15 @@ class Icon extends StatelessWidget {
///
/// The given color will be adjusted by the opacity of the current
/// [IconTheme], if any.
///
/// Typically, a material design color will be used, as follows:
///
/// ```dart
/// new Icon(
/// icon: Icons.widgets,
/// color: Colors.blue[400],
/// ),
/// ```
final
Color
color
;
@override
...
...
packages/flutter/lib/src/material/icon_button.dart
View file @
2e0beb84
...
...
@@ -92,6 +92,14 @@ class IconButton extends StatelessWidget {
/// The icon is enabled if [onPressed] is not null.
///
/// See also [disabledColor].
///
/// ```dart
/// new IconButton(
/// color: Colors.blue[500],
/// onPressed: _handleTap,
/// icon: Icons.widgets,
/// ),
/// ```
final
Color
color
;
/// The color to use for the icon inside the button, if the icon is disabled.
...
...
packages/flutter/lib/src/material/raised_button.dart
View file @
2e0beb84
...
...
@@ -56,6 +56,14 @@ class RaisedButton extends StatelessWidget {
/// The color of the button, as printed on the [Material]. Defaults to null,
/// meaning that the color is automatically derived from the [Theme].
///
/// ```dart
/// new RaisedButton(
/// color: Colors.blue[500],
/// onPressed: _handleTap,
/// child: new Text('DEMO'),
/// ),
/// ```
final
Color
color
;
/// The color of the button when the button is disabled. Buttons are disabled
...
...
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