ViewModelStoreNavEntryDecoratorDefaults


public static class ViewModelStoreNavEntryDecoratorDefaults


Holds the default functions for the ViewModelStoreNavEntryDecorator.

Summary

Public methods

final @NonNull Function0<@NonNull Boolean>

Controls whether the ViewModelStoreNavEntryDecorator should clear the ViewModelStore scoped to a NavEntry when NavEntryDecorator.onPop is invoked for that NavEntry's NavEntry.contentKey

Public fields

Public methods

removeViewModelStoreOnPop

Added in 2.10.0-beta01
@Composable
public final @NonNull Function0<@NonNull BooleanremoveViewModelStoreOnPop()

Controls whether the ViewModelStoreNavEntryDecorator should clear the ViewModelStore scoped to a NavEntry when NavEntryDecorator.onPop is invoked for that NavEntry's NavEntry.contentKey

The ViewModelStore is cleared if this returns true. The store is retained if false.