Unverified Commit 10d18651 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Clarify the IconTheme documentation (#83677)

parent 563da628
......@@ -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 design color will be used, as follows:
/// Typically, a Material Design color will be used, as follows:
///
/// ```dart
/// Icon(
......
......@@ -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:
///
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment