errorWidgetChild method

Widget errorWidgetChild({
  1. Key? key,
  2. FlutterErrorDetails? details,
  3. String? message,
  4. Object? error,
  5. ParagraphStyle? paragraphStyle,
  6. TextStyle? textStyle,
  7. EdgeInsets? padding,
  8. double? minimumWidth,
  9. Color? backgroundColor,
  10. CustomPainter? customPainter,
})

Implementation

Widget errorWidgetChild({
  Key? key,
  FlutterErrorDetails? details,
  String? message,
  Object? error,
  ui.ParagraphStyle? paragraphStyle,
  ui.TextStyle? textStyle,
  EdgeInsets? padding,
  double? minimumWidth,
  Color? backgroundColor,
  CustomPainter? customPainter,
}) {
  //
  if (details != null) {
    //
    error ??= details.exception;
  }

  // Default
  customPainter ??= _ErrorSymbol();

  //
  const double WIDTH = 30;

  return ErrorRenderObjectWidget(
    key: key,
    message: message,
    error: error,
    paragraphStyle: paragraphStyle,
    textStyle: textStyle,
    padding: padding,
    minimumWidth: minimumWidth,
    backgroundColor: backgroundColor,
    child: CustomPaint(
      size: Size(WIDTH, (WIDTH * 1).toDouble()),
      painter: customPainter,
    ),
  );
}