AppErrorHandler constructor
AppErrorHandler({
- FlutterExceptionHandler? handler,
- ErrorWidgetBuilder? builder,
- ReportErrorHandler? report,
- bool allowNewHandlers = true,
Implementation
factory AppErrorHandler({
FlutterExceptionHandler? handler,
ErrorWidgetBuilder? builder,
ReportErrorHandler? report,
bool allowNewHandlers = true,
}) {
_this ??= AppErrorHandler._(builder);
/// Allows you to set an error handler more than once.
set(handler: handler, builder: builder, report: report);
// Once set to false, you can't assign different handlers anymore.
if (!allowNewHandlers) {
_allowNewHandlers = false;
}
return _this!;
}