← Back to Stormify Documentation

PagedListState

data class PagedListState(val filters: Map<String, String> = emptyMap(), val sorts: Map<String, String> = emptyMap(), val caseSensitive: Map<String, Boolean> = emptyMap(), val pageSize: Int = 15, val isDistinct: Boolean = false)

Serializable snapshot of a PagedListBase's user-controllable state — the per-column filters, sorts, case-sensitivity flags, the page size and the distinct flag.

Obtained via PagedListBase.saveState and re-applied via PagedListBase.restoreState. Use to persist a grid / picker screen's state across navigation.

All fields are plain data (primitives, strings, maps of primitives) so the state can be round-tripped through any serialization framework — JSON, Parcelable, Kotlinx Serialization, etc. — without extra annotations or custom type adapters.

Constraints, selection, input parsers and the columns themselves are not part of the state — they are structural.

Constructors

Link copied to clipboard
constructor(filters: Map<String, String> = emptyMap(), sorts: Map<String, String> = emptyMap(), caseSensitive: Map<String, Boolean> = emptyMap(), pageSize: Int = 15, isDistinct: Boolean = false)

Properties

Link copied to clipboard

Per-column case-sensitivity flags, keyed by the column's deterministic state key.

Link copied to clipboard

Per-column filter strings, keyed by the column's deterministic state key.

Link copied to clipboard

Whether the list was in DISTINCT mode.

Link copied to clipboard

The persisted page size.

Link copied to clipboard

Per-column sort directions, keyed by the column's deterministic state key. Values are PagedListSort.ASC or PagedListSort.DESC; other strings are ignored on restore.