InitializerViewModelFactoryKt

Added in 2.5.0

public final class InitializerViewModelFactoryKt


Summary

Public methods

static final void
<VM extends ViewModel> initializer(
    @NonNull InitializerViewModelFactoryBuilder receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull CreationExtras, @NonNull VM> initializer
)

Add an initializer to the InitializerViewModelFactoryBuilder

static final @NonNull ViewModelProvider.Factory

Creates an InitializerViewModelFactory with the initializers provided in the builder.

Public methods

public static final void <VM extends ViewModel> initializer(
    @NonNull InitializerViewModelFactoryBuilder receiver,
    @ExtensionFunctionType @NonNull Function1<@NonNull CreationExtras, @NonNull VM> initializer
)

Add an initializer to the InitializerViewModelFactoryBuilder

viewModelFactory

public static final @NonNull ViewModelProvider.Factory viewModelFactory(
    @ExtensionFunctionType @NonNull Function1<@NonNull InitializerViewModelFactoryBuilderUnit> builder
)

Creates an InitializerViewModelFactory with the initializers provided in the builder.