CurrentUserStyleRepository

public final class CurrentUserStyleRepository


In memory storage for the current user style choices represented as a MutableStateFlow<UserStyle>.

Summary

Public constructors

Public methods

final @NonNull UserStyleSchema

The UserStyleSchema for this CurrentUserStyleRepository which describes the available style categories.

final @NonNull StateFlow<@NonNull UserStyle>

The current UserStyle.

Public constructors

CurrentUserStyleRepository

Added in 1.0.0
public CurrentUserStyleRepository(@NonNull UserStyleSchema schema)
Parameters
@NonNull UserStyleSchema schema

The UserStyleSchema for this CurrentUserStyleRepository which describes the available style categories.

Public methods

getSchema

Added in 1.0.0
public final @NonNull UserStyleSchema getSchema()

The UserStyleSchema for this CurrentUserStyleRepository which describes the available style categories.

getUserStyle

Added in 1.0.0
public final @NonNull StateFlow<@NonNull UserStylegetUserStyle()

The current UserStyle. If accessed from java, consider using androidx.lifecycle.FlowLiveDataConversions.asLiveData to observe changes.