data class LocaleSettingsState( val localeList: List<Locale>, val searchedLocaleList: List<Locale>, val selectedLocale: Locale, ) : State fun createInitialLocaleSettingsState(context: Context): LocaleSettingsState { val supportedLocales = LocaleManager.getSupportedLocales() return LocaleSettingsState( supportedLocales, supportedLocales, selectedLocale = LocaleManager.getSelectedLocale(context), ) }
The state of the language selection page