Skip to main content
The Stac Icon allows you to build a Flutter icon widget using JSON. To know more about the icon widget in Flutter, refer to the official documentation.

Properties

PropertyTypeDescription
iconStringThe name of the icon to display.
iconTypeStacIconTypeThe type of the icon (material, cupertino). Defaults to material.
sizedoubleThe size of the icon.
colorStacColorThe color of the icon.
semanticLabelStringThe semantic label for the icon.
textDirectionStacTextDirectionThe text direction for the icon.
Note: To check the available icons, refer to Icon utils.

Example

StacIcon(
  icon: 'home',
  size: 24.0,
  color: StacColors.black,
  semanticLabel: 'Home Icon',
  textDirection: StacTextDirection.ltr,
)