StyledIcon
This is equivalent to the Icon widget in Flutter.
StyledIcon(
icon: Icons.star,
style: IconStyler()
.color(Colors.blue)
.size(30),
);
Constructor
Prop | Type | Required / Default Value |
---|---|---|
icon | IconData? | Optional |
semanticLabel | String? | Optional |
style | IconStyler | Optional, defaults to IconStyler.create() |
key | Key? | Optional |
Style API Reference
Mix provides an extension of Style<IconSpec> called IconStyler
for easily styling StyledIcon
widgets.
Method | Description |
---|---|
animate | Sets animation configuration |
modifier | Adds widget modifiers |
color | Sets icon color |
size | Sets icon size |
weight | Sets stroke weight for drawing the icon |
grade | Sets grade (granular stroke weight) for drawing the icon |
opticalSize | Sets optical size for drawing the icon |
fill | Sets fill for drawing the icon (0.0 to 1.0) |
applyTextScaling | Sets whether icon scales with text scale factor |
shadow | Sets single shadow effect |
shadows | Sets multiple shadow effects |
semanticsLabel | Sets semantic label for accessibility |
opacity | Sets icon opacity |
blendMode | Sets blend mode for icon rendering |
icon | Sets the icon data |
textDirection | Sets text direction for icon rendering |