Skip to Content
Mix 2.0 is in development! You can access the Mix 1.0 docs here.

StyledIcon

This is equivalent to the Icon widget in Flutter.

StyledIcon( icon: Icons.star, style: IconStyler() .color(Colors.blue) .size(30), );

Constructor

PropTypeRequired / Default Value
iconIconData?Optional
semanticLabelString?Optional
styleIconStylerOptional, defaults to IconStyler.create()
keyKey?Optional

Style API Reference

Mix provides an extension of Style<IconSpec> called IconStyler for easily styling StyledIcon widgets.

MethodDescription
animateSets animation configuration
modifierAdds widget modifiers
colorSets icon color
sizeSets icon size
weightSets stroke weight for drawing the icon
gradeSets grade (granular stroke weight) for drawing the icon
opticalSizeSets optical size for drawing the icon
fillSets fill for drawing the icon (0.0 to 1.0)
applyTextScalingSets whether icon scales with text scale factor
shadowSets single shadow effect
shadowsSets multiple shadow effects
semanticsLabelSets semantic label for accessibility
opacitySets icon opacity
blendModeSets blend mode for icon rendering
iconSets the icon data
textDirectionSets text direction for icon rendering