parseTypeOf

fun <T> Activity.parseTypeOf(serializer: KSerializer<T>): T

Parses the Bundle of android.app.Activity.getIntent into T. Requires that the Bundle is described by a SingleValueNavigationSpec matching the NavigationBundleSpecType.SerializedType with serializer

Return

The T stored in the bundle.

Parameters

serializer

The KSerializer to deserialize T from the bundle.

Throws


fun <T> Fragment.parseTypeOf(serializer: KSerializer<T>): T

Parses the Bundle of androidx.fragment.app.Fragment.getArguments into T. Requires that the Bundle is described by a SingleValueNavigationSpec matching the NavigationBundleSpecType.SerializedType with serializer

Return

The T stored in the bundle.

Parameters

serializer

The KSerializer to deserialize T from the bundle.

Throws


fun <T> Intent?.parseTypeOf(serializer: KSerializer<T>): T

Parses the Bundle of Intent into T. Requires that the Bundle is described by a SingleValueNavigationSpec matching the NavigationBundleSpecType.SerializedType with serializer

Return

The T stored in the bundle.

Parameters

serializer

The KSerializer to deserialize T from the bundle.

Throws