renderSafely<T> method

T renderSafely<T>(
  1. T render()
)

Implementation

T renderSafely<T>(T Function() render) {
  if (hasError) {
    _reportError();
  }

  try {
    return render();
  } catch (e, s) {
    hasError = true;
    error = e;
    stackTrace = s;
    _reportError();
  }
}