NavArgsLazy

public final class NavArgsLazy<Args extends NavArgs>


An implementation of Lazy used by android.app.Activity.navArgs and androidx.fragment.app.Fragment.navArgs.

argumentProducer is a lambda that will be called during initialization to provide arguments to construct an Args instance via reflection.

Summary

Public fields

@NonNull Args

Public constructors

<Args extends NavArgs> NavArgsLazy(
    @NonNull KClass<@NonNull Args> navArgsClass,
    @NonNull Function0<@NonNull Bundle> argumentProducer
)

Public methods

boolean

Public fields

value

@NonNull
public @NonNull Args value

Public constructors

public final <Args extends NavArgs> NavArgsLazy(
    @NonNull KClass<@NonNull Args> navArgsClass,
    @NonNull Function0<@NonNull Bundle> argumentProducer
)

Public methods

isInitialized

@NonNull
public boolean isInitialized()