Skip to content

DataStoreReadCallback

Xavier F. Gouchet edited this page Sep 4, 2024 · 1 revision

interface DataStoreReadCallback<T : Any>

Callback for asynchronous read operations on the datastore.

Parameters

T the datatype being retrieved.

Functions

onFailure

abstract fun onFailure()

Triggered on failing to read data from the datastore.

onSuccess

abstract fun onSuccess(dataStoreContent: DataStoreContent<T>?)

Triggered on successfully reading data from the datastore.

Parameters
dataStoreContent (nullable) contains the datastore content if there was data to fetch, else null.
Clone this wiki locally