kErrorHandler function

Widget kErrorHandler(
  1. BuildContext context,
  2. Object? err,
  3. StackTrace? stack
)

Implementation

Widget kErrorHandler(BuildContext context, Object? err, StackTrace? stack) {
  _log.severe(
      "Error rendering snapshot!: $err", err, stack ?? StackTrace.current);
  // analytics.encounteredError(err, stack, "Rendering snapshot ${X}");
  return Layout.container().alignCenter.padAll(sunnySpacing * 2).single(
        context.richText(
          (_) => _
              .center()
              .color(sunnyColors.red)
              .softWrap()
              .body1("There was a problem loading"),
        ),
      );
}