Package-level declarations

Types

Link copied to clipboard
sealed interface Setting

A sealed interface that represents a setting. These are the types of Settings:

Link copied to clipboard
data class SettingCategory(val title: String, val key: String, val items: List<Setting>) : Setting

A category of settings. The UI will group the items with the following title.

Link copied to clipboard
data class SettingItem(val title: String, val key: String, val summary: String? = null) : Setting

A Setting item that can be used to show some data in the UI or as a Button with the help of SettingsChangeListenerClient.

Link copied to clipboard
data class SettingList(val title: String, val key: String, val summary: String? = null, val entryTitles: List<String>, val entryValues: List<String>, val defaultEntryIndex: Int? = null) : Setting

A setting that allows the user to select a single string from a list of options. Value can be accessed from Settings.getString

Link copied to clipboard
data class SettingMultipleChoice(val title: String, val key: String, val summary: String? = null, val entryTitles: List<String>, val entryValues: List<String>, val defaultEntryIndices: Set<Int>? = null) : Setting

A setting that allows the user to select multiple items from a list of options. Values can be accessed from Settings.getStringSet

Link copied to clipboard
data class SettingOnClick(val title: String, val key: String, val summary: String? = null, val onClick: suspend () -> Unit) : Setting

Represents a setting that can be clicked to perform an action. The SettingsProvider.getSettingItems will be called again after the action is performed.

Link copied to clipboard
interface Settings

Interface to provide settings to the extension. This can be used to store data that needs to be persisted. (Recommended to not store sensitive data)

Link copied to clipboard
data class SettingSlider(val title: String, val key: String, val summary: String? = null, val defaultValue: Int? = null, val from: Int, val to: Int, val steps: Int? = null, val allowOverride: Boolean = false) : Setting

A slider that allows the user to select a value from a range. Use allowOverride to allow the user to use values outside the range. Value can be accessed from Settings.getInt

Link copied to clipboard
data class SettingSwitch(val title: String, val key: String, val summary: String? = null, val defaultValue: Boolean) : Setting

A switch that allows the user to toggle a setting on or off. Value can be accessed from Settings.getBoolean

Link copied to clipboard
data class SettingTextInput(val title: String, val key: String, val summary: String? = null, val defaultValue: String? = null) : Setting

A setting that allows the user to input a string. Value can be accessed from Settings.getString, recommended to use String.isNullOrBlank.