nextLocale property

String? get nextLocale

The locale after the current one (cycling), the default locale if none is current, or null.

Implementation

String? get nextLocale => _currentLocale == null
    ? _defaultLocale
    : _locales[(_locales.indexOf(_currentLocale!) + 1) % _locales.length];