mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Fix some typos in icon_theme.dart (#9296)
This commit is contained in:
parent
ebe6da5b17
commit
a6eeaa5e34
@ -37,7 +37,7 @@ class IconTheme extends InheritedWidget {
|
|||||||
}) {
|
}) {
|
||||||
return new IconTheme(
|
return new IconTheme(
|
||||||
key: key,
|
key: key,
|
||||||
data: _getInheritedIconThemData(context).merge(data),
|
data: _getInheritedIconThemeData(context).merge(data),
|
||||||
child: child
|
child: child
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -56,11 +56,11 @@ class IconTheme extends InheritedWidget {
|
|||||||
/// IconThemeData theme = IconTheme.of(context);
|
/// IconThemeData theme = IconTheme.of(context);
|
||||||
/// ```
|
/// ```
|
||||||
static IconThemeData of(BuildContext context) {
|
static IconThemeData of(BuildContext context) {
|
||||||
final IconThemeData iconThemeData = _getInheritedIconThemData(context);
|
final IconThemeData iconThemeData = _getInheritedIconThemeData(context);
|
||||||
return iconThemeData.isConcrete ? iconThemeData : const IconThemeData.fallback().merge(iconThemeData);
|
return iconThemeData.isConcrete ? iconThemeData : const IconThemeData.fallback().merge(iconThemeData);
|
||||||
}
|
}
|
||||||
|
|
||||||
static IconThemeData _getInheritedIconThemData(BuildContext context) {
|
static IconThemeData _getInheritedIconThemeData(BuildContext context) {
|
||||||
final IconTheme iconTheme = context.inheritFromWidgetOfExactType(IconTheme);
|
final IconTheme iconTheme = context.inheritFromWidgetOfExactType(IconTheme);
|
||||||
return iconTheme?.data ?? Theme.of(context).iconTheme;
|
return iconTheme?.data ?? Theme.of(context).iconTheme;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ import 'dart:ui' as ui show lerpDouble;
|
|||||||
/// widget subtree.
|
/// widget subtree.
|
||||||
///
|
///
|
||||||
/// To obtain the current icon theme, use [IconTheme.of]. To convert an icon
|
/// To obtain the current icon theme, use [IconTheme.of]. To convert an icon
|
||||||
/// theme to a version with all the fields filled in, use [fallback].
|
/// theme to a version with all the fields filled in, use [new fallback].
|
||||||
class IconThemeData {
|
class IconThemeData {
|
||||||
/// Creates an icon theme data.
|
/// Creates an icon theme data.
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user