ViewModelStoreNavEntryDecoratorDefault


public static class ViewModelStoreNavEntryDecoratorDefault


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

@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.