enqueue<T2> method Null safety

void enqueue<T2>(
  1. TextStyleHtml builder(
    1. TextStyleHtml tsh,
    2. T2 input
    ),
  2. [T2? input]
)

Enqueues a callback.

Implementation

void enqueue<T2>(
  TextStyleHtml Function(TextStyleHtml tsh, T2 input) builder, [
  T2? input,
]) {
  assert(_output == null, 'Cannot add builder after being built');
  _builders ??= [];
  _builders!.add(builder);

  _inputs ??= [];
  _inputs!.add(input);
}