Skip to content

HiltViewModel does not support custom CreationExtras as it is not exposed to ViewModelComponentBuilder #3523

Closed
@Zhuinden

Description

Currently, ViewModelComponentBuilder is only able to create a SavedStateHandle for a ViewModel, but the idea of CreationExtras is to provide general purpose extras to the ViewModel on creation.

If the idea is that CreationExtras are part of public API and not just an internal helper for Google code, then it would make sense to make a CreationExtras available to ViewModelComponent, as even ViewModels that have no creation extras (old infra) could easily see an empty one.

ViewModelComponentBuilder savedStateHandle(@BindsInstance SavedStateHandle handle);

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions