isConfigLoading static method

bool isConfigLoading(
  1. BuildContext context, {
  2. bool listen = true,
})

Whether app configuration is currently being fetched.

Implementation

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