append<T extends BuildBit> method

T append<T extends BuildBit>(
  1. T bit
)

Appends bit.

See also: prepend.

Implementation

T append<T extends BuildBit>(T bit) {
  final child = bit.parent == this ? bit : bit.copyWith(parent: this);
  final scopedChildren = _children ??= [];
  scopedChildren.add(child);
  return bit;
}