NavBackStackEntryKt

Added in 2.8.0

public final class NavBackStackEntryKt


Summary

Public methods

static final @NonNull T
<T extends Object> toRoute(@NonNull NavBackStackEntry receiver)

Returns route as an object of type T

static final @NonNull T
<T extends Object> toRoute(
    @NonNull NavBackStackEntry receiver,
    @NonNull KClass<@NonNull ?> route
)

Returns route as an object of type T

Public methods

public static final @NonNull T <T extends Object> toRoute(@NonNull NavBackStackEntry receiver)

Returns route as an object of type T

Extrapolates arguments from NavBackStackEntry.arguments and recreates object T

Parameters
<T extends Object>

the entry's NavDestination.route as a KClass

Returns
@NonNull T

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

public static final @NonNull T <T extends Object> toRoute(
    @NonNull NavBackStackEntry receiver,
    @NonNull KClass<@NonNull ?> route
)

Returns route as an object of type T

Extrapolates arguments from NavBackStackEntry.arguments and recreates object T

Parameters
@NonNull KClass<@NonNull ?> route

the entry's NavDestination.route as a KClass

Returns
@NonNull T

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