getSupportParcelable

fun <T> Bundle.getSupportParcelable(key: String, clazz: Class<T>): T?

Gets parcelable with the value associated to the given key using appropriate API for Android Tiramisu and upwards.

Note: [Bundle.getParcelable(String)] has been deprecated starting with [Build.VERSION_CODES#TIRAMISU].

Return

A Parcelable value, or null.

Parameters

key

A String, or null.

clazz

The type of the object expected.