isAnonymous static method

bool isAnonymous(
  1. BuildContext context
)

Whether current session is using an unauthenticated/anonymous token.

Implementation

static bool isAnonymous(BuildContext context) {
  final scope = context.getInheritedWidgetOfExactType<CupThreadThemeScope>() ??
      context.dependOnInheritedWidgetOfExactType<CupThreadThemeScope>();
  return scope?.isAnonymous ?? true;
}