build method

  1. @override
Widget build()
override

The child widget this element shows now.

Implementation

@override
Widget build() {
  final outer = _current;
  _current = this;
  _index = 0;
  try {
    final built = super.build();
    if (_index < _hooks.length) {
      assert(
        !_built,
        '$this stopped calling hooks before its hook ${_index + 1}, '
        '${_hooks[_index]?.hook.debugLabel}, which its last build called: '
        '$_rule',
      );
      _disposeFrom(_index);
    }
    _built = true;
    return built;
  } finally {
    _current = outer;
  }
}