RiveComponent constructor
RiveComponent({})
Implementation
RiveComponent({
required this.artboard,
bool antialiasing = true,
BoxFit fit = BoxFit.contain,
Alignment alignment = Alignment.center,
// position component arguments
super.position,
/// The logical size of the component.
/// Default value is ArtboardSize
Vector2? size,
super.scale,
super.angle = 0.0,
super.anchor = Anchor.topLeft,
super.children,
super.priority,
super.key,
}) : _renderer = RiveArtboardRenderer(
antialiasing: antialiasing,
fit: fit,
alignment: alignment,
artboard: artboard,
),
super(size: size ?? Vector2(artboard.width, artboard.height)) {
void updateRenderSize() {
_renderSize = this.size.toSize();
}
this.size.addListener(updateRenderSize);
updateRenderSize();
}