IconComponent constructor
IconComponent(
{ - IconData? icon,
- double iconSize = 64,
- Paint? paint,
- Vector2? position,
- Vector2? size,
- Vector2? scale,
- double? angle,
- double nativeAngle = 0,
- Anchor? anchor,
- Iterable<Component>? children,
- int? priority,
- 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.