IconComponent constructor

IconComponent({
  1. IconData? icon,
  2. double iconSize = 64,
  3. Paint? paint,
  4. Vector2? position,
  5. Vector2? size,
  6. Vector2? scale,
  7. double? angle,
  8. double nativeAngle = 0,
  9. Anchor? anchor,
  10. Iterable<Component>? children,
  11. int? priority,
  12. ComponentKey? key,
})

Creates an IconComponent that renders _icon as a Flame component.

  • _icon: The IconData to render (e.g., Icons.star).
  • iconSize: The resolution at which to rasterize the icon (default 64).
  • paint: Optional paint for rendering effects.
  • size: The display size of the component. Defaults to Vector2.all(iconSize) if not specified.