SavedStateHandleFactoryKt

Added in 2.8.0-beta01

public final class SavedStateHandleFactoryKt


Summary

Public methods

static final @NonNull SavedStateHandle
invoke(
    @NonNull SavedStateHandle.Companion receiver,
    @NonNull Object route,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap
)

SavedStateHandle constructor to create a SavedStateHandle with a serializable object.

Public methods

public static final @NonNull SavedStateHandle invoke(
    @NonNull SavedStateHandle.Companion receiver,
    @NonNull Object route,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap
)

SavedStateHandle constructor to create a SavedStateHandle with a serializable object.

Returns a SavedStateHandle populated with arguments from route.

Parameters
@NonNull Object route

The route to extract argument values from

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

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