AttributeSerializer

class AttributeSerializer<T>(val key: <Error class: unknown class><T>, val saver: Saver<T, Any>)

Defines how to serialize and deserialize custom AttributeKey values for RichTextState.Saver.

Parameters

T

The type of the attribute value.

Constructors

Link copied to clipboard
constructor(key: <Error class: unknown class><T>, saver: Saver<T, Any>)

Properties

Link copied to clipboard
val key: <Error class: unknown class><T>

The AttributeKey to be serialized.

Link copied to clipboard
val saver: Saver<T, Any>

The Compose Saver used to save and restore values of type T.