parseExtraOrNull

fun <T> Fragment.parseExtraOrNull(convert: Bundle.() -> T?): T?

Parses the Bundle of androidx.fragment.app.Fragment.getArguments into T using a convert method.

Return

The T value extracted from the Bundle or null if android.content.Intent.getExtras is null

Parameters

convert

The method for converting Bundle into T


fun <T> Intent?.parseExtraOrNull(convert: Bundle.() -> T?): T?

Parses the Bundle of Intent into T using a convert method.

Return

The T value extracted from the Bundle or null if android.content.Intent?.getExtras is null

Parameters

convert

The method for converting Bundle into T