IconSpec class final

Specification for icon styling properties.

Provides comprehensive icon styling including color, size, weight, optical properties, text direction, scaling behavior, and shadow effects.

Implemented types
Annotations
  • @MixableSpec.new(target: StyledIcon.new)
  • @immutable

Constructors

IconSpec({Color? color, double? size, double? weight, double? grade, double? opticalSize, List<Shadow>? shadows, TextDirection? textDirection, bool? applyTextScaling, double? fill, String? semanticsLabel, double? opacity, BlendMode? blendMode, IconData? icon})
const

Properties

applyTextScaling → bool?
Whether to scale the icon according to the textScaleFactor.
final
blendMode → BlendMode?
The blend mode to apply when drawing the icon.
final
color → Color?
The color to use when drawing the icon.
final
fill → double?
The fill variant (0.0-1.0) for supported icon fonts.
final
grade → double?
The grade variant (-25 to 200) for supported icon fonts.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
The icon data to display.
final
opacity → double?
The opacity to apply to the icon.
final
opticalSize → double?
The optical size variant (20-48) for supported icon fonts.
final
props → List<Object?>
The properties based on which equality and hash code are computed.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel → String?
Semantic description for accessibility.
final
shadows → List<Shadow>?
A list of shadows to paint behind the icon.
final
size → double?
The size of the icon in logical pixels.
final
stringify → bool
Whether to use a detailed string representation of the object.
no setterinherited
textDirection → TextDirection?
The text direction to use for rendering the icon.
final
type → Type
no setterinherited
weight → double?
The font weight variant (100-900) for supported icon fonts.
final

Methods

copyWith({Color? color, double? size, double? weight, double? grade, double? opticalSize, List<Shadow>? shadows, TextDirection? textDirection, bool? applyTextScaling, double? fill, String? semanticsLabel, double? opacity, BlendMode? blendMode, IconData? icon}) → IconSpec
Creates a copy of this spec with the given fields replaced by the non-null parameter values.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
getDiff(Equatable other) → Map<String, String>
Returns a map of properties that differ between this object and another.
inherited
lerp(covariant IconSpec? other, double t) → IconSpec
Linearly interpolates with another Spec object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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.
inherited