checkLocale static method

bool checkLocale(
  1. BuildContext context
)

Implementation

static bool checkLocale(BuildContext context) {
  Locale locale = Localizations.localeOf(context);
  bool isSupportedLocale = LiveKitLocalizations.delegate.isSupported(locale);
  if (!isSupportedLocale) LiveKitLogger.error("LiveKit not support the locale: $locale");
  LiveKitLocalizations? localizations = LiveKitLocalizations.of(context);
  if (localizations == null) LiveKitLogger.error("LiveKitLocalizations is null!");
  return isSupportedLocale && localizations != null;
}