configErrorOf static method

Object? configErrorOf(
  1. BuildContext context, {
  2. bool listen = true,
})

Returns configuration fetch error if loading failed.

Implementation

static Object? configErrorOf(BuildContext context, {bool listen = true}) {
  final scope = listen
      ? context.dependOnInheritedWidgetOfExactType<CupThreadThemeScope>()
      : (context.getInheritedWidgetOfExactType<CupThreadThemeScope>() ??
          context.dependOnInheritedWidgetOfExactType<CupThreadThemeScope>());
  return scope?.configError;
}