ShapeComponent constructor

ShapeComponent({
  1. Vector2? position,
  2. Vector2? size,
  3. Vector2? scale,
  4. double? angle,
  5. Anchor? anchor,
  6. Iterable<Component>? children,
  7. int? priority,
  8. ComponentKey? key,
  9. Paint? paint,
  10. List<Paint>? paintLayers,
})

Implementation

ShapeComponent({
  super.position,
  super.size,
  super.scale,
  super.angle,
  super.anchor,
  super.children,
  super.priority,
  super.key,
  Paint? paint,
  List<Paint>? paintLayers,
}) {
  this.paint = paint ?? this.paint;
  // Only read from this.paintLayers if paintLayers not null to prevent
  // unnecessary creation of the paintLayers list.
  if (paintLayers != null) {
    this.paintLayers = paintLayers;
  }
}