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
aa6a27e8
Unverified
Commit
aa6a27e8
authored
Oct 03, 2018
by
Hans Muller
Committed by
GitHub
Oct 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the ColorScheme dartdoc: a11y (#22618)
parent
3a87b93f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
+27
-7
color_scheme.dart
packages/flutter/lib/src/material/color_scheme.dart
+27
-7
No files found.
packages/flutter/lib/src/material/color_scheme.dart
View file @
aa6a27e8
...
...
@@ -108,7 +108,7 @@ class ColorScheme extends Diagnosticable {
/// Create a color scheme from a [MaterialColor] swatch.
///
/// This constructor is used by [ThemeData] to create its default
\
/// This constructor is used by [ThemeData] to create its default
/// color scheme.
factory
ColorScheme
.
fromSwatch
({
MaterialColor
primarySwatch
=
Colors
.
blue
,
...
...
@@ -159,6 +159,9 @@ class ColorScheme extends Diagnosticable {
/// A darker version of the secondary color.
final
Color
secondaryVariant
;
/// The background color for widgets like [Card].
final
Color
surface
;
/// A color that typically appears behind scrollable content.
final
Color
background
;
...
...
@@ -166,24 +169,41 @@ class ColorScheme extends Diagnosticable {
/// [InputDecoration.errorText].
final
Color
error
;
/// The background color for widgets like [Card].
final
Color
surface
;
/// A color that's clearly legible when drawn on [primary].
///
/// To ensure that an app is accessibile, a contrast ratio of 4.5:1 for [primary]
/// and [onPrimary] is recommended. See
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
final
Color
onPrimary
;
/// A color that's clearly legible when drawn on [secondary].
///
/// To ensure that an app is accessibile, a contrast ratio of 4.5:1 for [secondary]
/// and [onSecondary] is recommended. See
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
final
Color
onSecondary
;
/// A color that's clearly legible when drawn on [surface].
///
/// To ensure that an app is accessibile, a contrast ratio of 4.5:1 for [surface]
/// and [onSurface] is recommended. See
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
final
Color
onSurface
;
/// A color that's clearly legible when drawn on [error].
final
Color
onError
;
/// A color that's clearly legible when drawn on [background].
///
/// To ensure that an app is accessibile, a contrast ratio of 4.5:1 for [background]
/// and [onBackground] is recommended. See
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
final
Color
onBackground
;
/// A color that's clearly legible when drawn on [error].
///
/// To ensure that an app is accessibile, a contrast ratio of 4.5:1 for [error]
/// and [onError] is recommended. See
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
final
Color
onError
;
/// The overall brightness of this color scheme.
final
Brightness
brightness
;
...
...
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