on

fun <T> on(id: QueryId<T>, snapshot: () -> QueryState<T>)

Registers a preview state for the query with the specified ID.

Parameters

id

The query ID that identifies this query

snapshot

A function that provides the query state to be returned for this ID


fun <T> on(testTag: QueryTestTag<T>, snapshot: () -> QueryState<T>)

Registers a preview state for the query with the specified test tag.

Parameters

testTag

The test tag that identifies this query

snapshot

A function that provides the query state to be returned for this tag


fun <T, S> on(id: InfiniteQueryId<T, S>, snapshot: () -> QueryState<QueryChunks<T, S>>)

Registers a preview state for the infinite query with the specified ID.

Parameters

id

The infinite query ID that identifies this infinite query

snapshot

A function that provides the query state to be returned for this ID


fun <T, S> on(testTag: InfiniteQueryTestTag<T, S>, snapshot: () -> QueryState<QueryChunks<T, S>>)

Registers a preview state for the infinite query with the specified test tag.

Parameters

testTag

The test tag that identifies this infinite query

snapshot

A function that provides the query state to be returned for this tag