IconThemeData class Null safety

Defines the size, font variations, color, opacity, and shadows of icons.

Used by IconTheme to control those properties in a widget subtree.

To obtain the current icon theme, use IconTheme.of. To convert an icon theme to a version with all the fields filled in, use IconThemeData.fallback.

Mixed in types
Implementers
Annotations

Constructors

IconThemeData({double? size, double? fill, double? weight, double? grade, double? opticalSize, Color? color, double? opacity, List<Shadow>? shadows})
Creates an icon theme data.
const
IconThemeData.fallback()
Creates an icon theme with some reasonable default values.
const

Properties

color Color?
The default for Icon.color.
final
fill double?
The default for Icon.fill.
final
grade double?
The default for Icon.grade.
final
hashCode int
The hash code for this object.
read-onlyoverride
isConcrete bool
Whether all the properties (except shadows) of this object are non-null.
read-only
opacity double?
An opacity to apply to both explicit and default icon colors.
read-only
opticalSize double?
The default for Icon.opticalSize.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
shadows List<Shadow>?
The default for Icon.shadows.
final
size double?
The default for Icon.size.
final
weight double?
The default for Icon.weight.
final

Methods

copyWith({double? size, double? fill, double? weight, double? grade, double? opticalSize, Color? color, double? opacity, List<Shadow>? shadows}) IconThemeData
Creates a copy of this icon theme but with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
merge(IconThemeData? other) IconThemeData
Returns a new icon theme that matches this icon theme but with some values replaced by the non-null parameters of the given icon theme. If the given icon theme is null, simply returns this icon theme.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
resolve(BuildContext context) IconThemeData
Called by IconTheme.of to convert this instance to an IconThemeData that fits the given BuildContext.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(IconThemeData? a, IconThemeData? b, double t) IconThemeData
Linearly interpolate between two icon theme data objects.