SizeFSerializer


public final class SizeFSerializer implements KSerializer


A serializer for SizeF. This serializer uses SavedState's API directly to save/load a SizeF.

Note that this serializer should be used with SavedStateEncoder or SavedStateDecoder only. Using it with other Encoders/Decoders may throw IllegalArgumentException.

import androidx.savedstate.serialization.serializers.SizeFSerializer

@Serializable
data class MyModel(@Serializable(with = SizeFSerializer::class) val sizeF: android.util.SizeF)

Summary

Public constructors

Public constructors

SizeFSerializer

Added in 1.3.0-alpha06
public SizeFSerializer()

Public methods

deserialize

Added in 1.3.0-alpha06
public @NonNull SizeF deserialize(@NonNull Decoder decoder)

getDescriptor

Added in 1.3.0-alpha06
public @NonNull SerialDescriptor getDescriptor()

serialize

Added in 1.3.0-alpha06
public void serialize(@NonNull Encoder encoder, @NonNull SizeF value)