MutableStateFlowSerializerKt

Added in 1.3.0-alpha07

public final class MutableStateFlowSerializerKt


Summary

Public methods

static final @NonNull <Error class: unknown class><@NonNull MutableStateFlow<@NonNull T>>

Creates a KSerializer for a MutableStateFlow containing a Serializable value of type T.

static final @NonNull <Error class: unknown class><@NonNull MutableStateFlow<@NonNull T>>

Creates a KSerializer for a MutableStateFlow containing a Serializable value of type T.

Public methods

MutableStateFlowSerializer

public static final @NonNull <Error class: unknown class><@NonNull MutableStateFlow<@NonNull T>> <T extends Object> MutableStateFlowSerializer()

Creates a KSerializer for a MutableStateFlow containing a Serializable value of type T.

This inline function infers the state type T automatically and retrieves the appropriate KSerializer for serialization and deserialization of MutableStateFlow.

Parameters
<T extends Object>

The type of the value stored in the MutableStateFlow.

Returns
@NonNull <Error class: unknown class><@NonNull MutableStateFlow<@NonNull T>>

A KSerializer for handling MutableStateFlow containing a Serializable type T.

MutableStateFlowSerializer

public static final @NonNull <Error class: unknown class><@NonNull MutableStateFlow<@NonNull T>> <T extends Object> MutableStateFlowSerializer(
    @NonNull <Error class: unknown class><@NonNull T> serializer
)

Creates a KSerializer for a MutableStateFlow containing a Serializable value of type T.

This function allows for explicit specification of the KSerializer for the state type T. It provides serialization and deserialization capabilities for MutableStateFlow objects.

Parameters
<T extends Object>

The type of the value stored in the MutableStateFlow.

@NonNull <Error class: unknown class><@NonNull T> serializer

The KSerializer for the Serializable type T.

Returns
@NonNull <Error class: unknown class><@NonNull MutableStateFlow<@NonNull T>>

A KSerializer for handling MutableStateFlow containing a Serializable type T.