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
10d18651
Unverified
Commit
10d18651
authored
Jun 02, 2021
by
Ian Hickson
Committed by
GitHub
Jun 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify the IconTheme documentation (#83677)
parent
563da628
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
7 deletions
+17
-7
icon.dart
packages/flutter/lib/src/widgets/icon.dart
+5
-4
icon_theme.dart
packages/flutter/lib/src/widgets/icon_theme.dart
+11
-2
image_icon.dart
packages/flutter/lib/src/widgets/image_icon.dart
+1
-1
No files found.
packages/flutter/lib/src/widgets/icon.dart
View file @
10d18651
...
...
@@ -100,21 +100,22 @@ class Icon extends StatelessWidget {
///
/// Defaults to the current [IconTheme] color, if any.
///
/// The given color will be adjusted by the opacity of the current
/// The color (whether specified explicitly here or obtained from the
/// [IconTheme]) will be further adjusted by the opacity of the current
/// [IconTheme], if any.
///
///
/// In material apps, if there is a [Theme] without any [IconTheme]s
/// specified, icon colors default to white if the theme is dark
/// and black if the theme is light.
///
/// If no [IconTheme] and no [Theme] is specified, icons will default to black.
/// If no [IconTheme] and no [Theme] is specified, icons will default to
/// black.
///
/// See [Theme] to set the current theme and [ThemeData.brightness]
/// for setting the current theme's brightness.
///
/// {@tool snippet}
/// Typically, a
material d
esign color will be used, as follows:
/// Typically, a
Material D
esign color will be used, as follows:
///
/// ```dart
/// Icon(
...
...
packages/flutter/lib/src/widgets/icon_theme.dart
View file @
10d18651
...
...
@@ -49,9 +49,18 @@ class IconTheme extends InheritedTheme {
final
IconThemeData
data
;
/// The data from the closest instance of this class that encloses the given
/// context.
/// context
, if any
.
///
/// Defaults to the current [ThemeData.iconTheme].
/// If there is no ambient icon theme, defaults to [IconThemeData.fallback].
/// The returned [IconThemeData] is concrete (all values are non-null; see
/// [IconThemeData.isConcrete]). Any properties on the ambient icon theme that
/// are null get defaulted to the values specified on
/// [IconThemeData.fallback].
///
/// The [Theme] widget from the `material` library introduces an [IconTheme]
/// widget set to the [ThemeData.iconTheme], so in a Material Design
/// application, this will typically default to the icon theme from the
/// ambient [Theme].
///
/// Typical usage is as follows:
///
...
...
packages/flutter/lib/src/widgets/image_icon.dart
View file @
10d18651
...
...
@@ -51,7 +51,7 @@ class ImageIcon extends StatelessWidget {
/// Defaults to the current [IconTheme] color, if any. If there is
/// no [IconTheme], then it defaults to not recolorizing the image.
///
/// The image will
additionally be
adjusted by the opacity of the current
/// The image will
be additionally
adjusted by the opacity of the current
/// [IconTheme], if any.
final
Color
?
color
;
...
...
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