SavedStateHandleKt

Added in 2.8.0

public final class SavedStateHandleKt


Summary

Public methods

static final @NonNull T
<T extends Object> toRoute(
    @NonNull <Error class: unknown class> receiver,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap
)

Returns route as an object of type T

Public methods

public static final @NonNull T <T extends Object> toRoute(
    @NonNull <Error class: unknown class> receiver,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap
)

Returns route as an object of type T

Extrapolates arguments from SavedStateHandle and recreates object T

Parameters
<T extends Object>

the entry's NavDestination.route as a KClass

@NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap

A mapping of KType to custom NavType<*> in T. May be empty if T does not use custom NavTypes.

Returns
@NonNull T

A new instance of this entry's NavDestination.route as an object of type T