Package-level declarations

Persisting recently selected countries: the RecentCountryStore interface and its file-backed, in-memory and no-op implementations. Only ISO codes are ever stored.

Persisting recently selected countries: the RecentCountryStore interface and its file-backed, in-memory and no-op implementations. Only ISO codes are ever stored.

Persisting recently selected countries: the RecentCountryStore interface and its file-backed, in-memory and no-op implementations. Only ISO codes are ever stored.

Types

Link copied to clipboard
Link copied to clipboard
class InMemoryRecentCountryStore(initial: List<String> = emptyList(), maxEntries: Int = DefaultRecentCountryStore.DEFAULT_MAX_ENTRIES) : RecentCountryStore

An in-memory RecentCountryStore that survives recomposition but not process death.

Link copied to clipboard

A store that remembers nothing.

Link copied to clipboard

Persists the countries a user has recently chosen, so the sheet can offer them first.

Functions

Link copied to clipboard
fun DefaultRecentCountryStore(context: Context, maxEntries: Int = DefaultRecentCountryStore.DEFAULT_MAX_ENTRIES, fileName: String = DefaultRecentCountryStore.DEFAULT_FILE_NAME): DefaultRecentCountryStore

Creates a DefaultRecentCountryStore backed by a private SharedPreferences file.

fun DefaultRecentCountryStore(maxEntries: Int = DefaultRecentCountryStore.DEFAULT_MAX_ENTRIES, fileName: String = DefaultRecentCountryStore.DEFAULT_FILE_NAME): DefaultRecentCountryStore

Creates a DefaultRecentCountryStore backed by the app's standard NSUserDefaults.

Link copied to clipboard
fun rememberDefaultRecentCountryStore(maxEntries: Int = DefaultRecentCountryStore.DEFAULT_MAX_ENTRIES, fileName: String = DefaultRecentCountryStore.DEFAULT_FILE_NAME): RecentCountryStore

Creates and remembers the platform's persistent DefaultRecentCountryStore.