{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

MutableCreationExtras

class MutableCreationExtras : CreationExtras

kotlin.Any
   ↳ androidx.lifecycle.viewmodel.CreationExtras
     ↳ androidx.lifecycle.viewmodel.MutableCreationExtras

Mutable implementation of CreationExtras

Summary

Public constructors

Public functions

open operator T?
<T : Any?> get(key: CreationExtras.Key<T>)

Returns an element associated with the given key

operator Unit
<T : Any?> set(key: CreationExtras.Key<T>, t: T)

Associates the given key with t

Public constructors

MutableCreationExtras

MutableCreationExtras(initialExtras: CreationExtras = Empty)
Parameters
initialExtras: CreationExtras = Empty

extras that will be filled into the resulting MutableCreationExtras

Public functions

get

open operator fun <T : Any?> get(key: CreationExtras.Key<T>): T?

Returns an element associated with the given key

set

operator fun <T : Any?> set(key: CreationExtras.Key<T>, t: T): Unit

Associates the given key with t