asTypeOf

fun <T> Bundle.asTypeOf(serializer: KSerializer<T>): T

Converts a Bundle to T. Requires that the Bundle is described by a SingleValueNavigationSpec matching the NavigationBundleSpecType.SerializedType with serializer

Return

The T stored in the bundle.

Parameters

T

the type of serialized property stored in the bundle

serializer

The KSerializer to deserialize T from the bundle.

Throws