LayoutComponent constructor

LayoutComponent({
  1. required Vector2? position,
  2. required Vector2? size,
  3. Iterable<Component>? children,
  4. Anchor? anchor,
  5. int? priority,
})

Implementation

LayoutComponent({
  required super.position,
  required Vector2? size,
  super.children,
  super.anchor,
  super.priority,
}) {
  // use the size setter rather than invoke [layoutChildren] because the
  // latter needs the intent to shrinkwrap pre-set by [_shrinkWrapMode].
  // At the time of construction, [_shrinkWrapMode] only has its default
  // value.
  this.size = size;
}