findDeviceLocale static method

TDeskAppLocale findDeviceLocale([
  1. String? locale,
  2. bool isStore = false
])

Implementation

static TDeskAppLocale findDeviceLocale([String? locale, bool isStore = false]) {
  final String deviceLocale = locale ?? WidgetsBinding.instance.platformDispatcher.locale.toLanguageTag();

  if (isStore) {
    deviceLocaleStored = deviceLocale;
    deviceLocaleStoredInLocale = selectLocale(deviceLocale);
  }

  return selectLocale(deviceLocale) ?? TDeskAppLocale.en;
}