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
21ee1a25
Unverified
Commit
21ee1a25
authored
Feb 03, 2018
by
Ian Hickson
Committed by
GitHub
Feb 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explain MaterialColor's constructor better. (#14407)
Fixes
https://github.com/flutter/flutter/issues/14393
parent
c02b6a8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
colors.dart
packages/flutter/lib/src/material/colors.dart
+5
-0
colors.dart
packages/flutter/lib/src/painting/colors.dart
+5
-0
No files found.
packages/flutter/lib/src/material/colors.dart
View file @
21ee1a25
...
...
@@ -17,6 +17,11 @@ import 'package:flutter/painting.dart';
/// * [Colors], which defines all of the standard material colors.
class
MaterialColor
extends
ColorSwatch
<
int
>
{
/// Creates a color swatch with a variety of shades.
///
/// The `primary` argument should be the 32 bit ARGB value of one of the
/// values in the swatch, as would be passed to the [new Color] constructor
/// for that same color, and as is exposed by [value]. (This is distinct from
/// the specific index of the color in the swatch.)
const
MaterialColor
(
int
primary
,
Map
<
int
,
Color
>
swatch
)
:
super
(
primary
,
swatch
);
/// The lightest shade.
...
...
packages/flutter/lib/src/painting/colors.dart
View file @
21ee1a25
...
...
@@ -205,6 +205,11 @@ class HSVColor {
/// * [material.Colors], which defines all of the standard material design colors.
class
ColorSwatch
<
T
>
extends
Color
{
/// Creates a color that has a small table of related colors called a "swatch".
///
/// The `primary` argument should be the 32 bit ARGB value of one of the
/// values in the swatch, as would be passed to the [new Color] constructor
/// for that same color, and as is exposed by [value]. (This is distinct from
/// the specific index of the color in the swatch.)
const
ColorSwatch
(
int
primary
,
this
.
_swatch
)
:
super
(
primary
);
@protected
...
...
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