StacIcon class
A Stac model representing Flutter's Icon
widget.
Displays a graphical symbol that represents an application, file type, or action.
StacIcon(
icon: 'home',
iconType: StacIconType.material,
size: 24.0,
color: StacColors.black,
)
{
"type": "icon",
"icon": "home",
"iconType": "material",
"size": 24.0,
"color": "#000000"
}
- Inheritance
-
- Object
- StacElement
- StacWidget
- StacIcon
- Annotations
-
- @JsonSerializable()
Constructors
-
StacIcon.new({required String icon, StacIconType iconType = StacIconType.material, double? size, double? fill, double? weight, double? grade, double? opticalSize, String? color, List<
StacShadow> ? shadows, String? semanticLabel, StacTextDirection? textDirection, bool? applyTextScaling, StacBlendMode? blendMode}) -
Creates an icon widget with the specified properties.
const
-
StacIcon.fromJson(Map<
String, dynamic> json) -
Creates a StacIcon from JSON.
factory
Properties
- applyTextScaling → bool?
-
Whether to apply text scaling to the icon.
final
- blendMode → StacBlendMode?
-
Blend mode for the icon.
final
- color → String?
-
Color of the icon.
final
- fill → double?
-
Fill for the icon.
final
- grade → double?
-
Grade for the icon.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → String
-
The name/key of the icon (as defined in icon utils maps).
final
- iconType → StacIconType
-
The icon library to use.
final
-
jsonData
→ Map<
String, dynamic> ? -
Raw JSON data for this widget
finalinherited
- opticalSize → double?
-
Optical size for the icon.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
Semantic label for accessibility.
final
-
shadows
→ List<
StacShadow> ? -
Shadows for the icon.
final
- size → double?
-
Size of the icon in logical pixels.
final
- textDirection → StacTextDirection?
-
The text direction to use for resolving certain icons.
final
- type → String
-
Widget type identifier.
no setteroverride
- weight → double?
-
Weight for the icon.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this StacIcon to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited