isSystemLocaleActive method

bool isSystemLocaleActive({
  1. bool nullOk = true,
})

Checks if preferred locale is loaded.

nullOk Returns true if no locale is set.

Implementation

bool isSystemLocaleActive({bool nullOk = true}) {
  if (_locale == null && nullOk) {
    return true;
  }

  final pref = getSystemLocale();

  return isActive && isLocaleEqual(pref, locale);
}