build method Null safety

TextStyleHtml build(
  1. BuildContext context
)

Builds a TextStyleHtml by calling queued callbacks.

Implementation

TextStyleHtml build(BuildContext context) {
  final parentOutput = parent?.build(context);
  if (parentOutput == null || parentOutput != _parentOutput) {
    _parentOutput = parentOutput;
    _output = null;
  }

  if (_output != null) {
    return _output!;
  }

  if (_builders == null) {
    // TODO: remove lint ignore
    // ignore: unnecessary_null_checks
    return _output = _parentOutput!;
  }

  _output = _parentOutput?.copyWith(parent: _parentOutput);
  final l = _builders!.length;
  for (var i = 0; i < l; i++) {
    final builder = _builders![i];
    _output = builder(_output, _inputs![i]) as TextStyleHtml;
    assert(_output?.parent == _parentOutput);
  }

  return _output!;
}