userTokenOf static method

String userTokenOf(
  1. BuildContext context
)

Accesses current anonymous user token.

Implementation

static String userTokenOf(BuildContext context) {
  final scope = context.getInheritedWidgetOfExactType<CupThreadThemeScope>() ??
      context.dependOnInheritedWidgetOfExactType<CupThreadThemeScope>();
  return scope?.userToken ?? UserTokenStore.shared.token;
}