IconComponent constructor
IconComponent({})
Creates an IconComponent that renders icon as a Flame component.
Implementation
IconComponent({
this._icon,
this._iconSize = 64,
Paint? paint,
super.position,
Vector2? size,
super.scale,
super.angle,
super.nativeAngle,
super.anchor,
super.children,
super.priority,
super.key,
}) : super(size: size ?? Vector2.all(_iconSize)) {
if (paint != null) {
this.paint = paint;
}
_dstRect = this.size.toRect();
this.size.addListener(_updateDstRect);
}