AppErrorHandler constructor
AppErrorHandler({
- FlutterExceptionHandler? handler,
- ErrorWidgetBuilder? screen,
- ReportErrorHandler? report,
- bool? presentError,
- bool? allowNewErrorHandlers,
- ParagraphStyle? paragraphStyle,
- TextStyle? textStyle,
- EdgeInsets? padding,
- double? minimumWidth,
- Color? backgroundColor,
Singleton Pattern with only one instance of this Error Handler. Optionally supply the Error handler, Builder, and Report routines.
Implementation
factory AppErrorHandler({
FlutterExceptionHandler? handler,
ErrorWidgetBuilder? screen,
ReportErrorHandler? report,
bool? presentError, // Present error to user or not
bool? allowNewErrorHandlers,
i.ParagraphStyle? paragraphStyle,
i.TextStyle? textStyle,
EdgeInsets? padding,
double? minimumWidth,
Color? backgroundColor,
}) {
//
_this ??= AppErrorHandler._();
/// Allows you to set an error handler more than once.
set(
handler: handler,
screen: screen,
report: report,
presentError: presentError,
allowNewErrorHandlers: allowNewErrorHandlers,
paragraphStyle: paragraphStyle,
textStyle: textStyle,
padding: padding,
minimumWidth: minimumWidth,
backgroundColor: backgroundColor,
);
return _this!;
}