AppErrorHandler constructor

AppErrorHandler({
  1. FlutterExceptionHandler? handler,
  2. ErrorWidgetBuilder? screen,
  3. ReportErrorHandler? report,
  4. bool? presentError,
  5. bool? allowNewErrorHandlers,
  6. ParagraphStyle? paragraphStyle,
  7. TextStyle? textStyle,
  8. EdgeInsets? padding,
  9. double? minimumWidth,
  10. 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,
  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!;
}