2.12.0-alpha05
Added 3
- SavedStateHandle provides asContainer() to transform the handle into a SavedStateContainer
- SavedStateHandle provides getOrCreateContainer() to create a child SavedStateContainer inside the handle
- SavedStateHandle provides getOrCreateSavedStateHandle() to create a child SavedStateHandle inside the current handle
Changed 1
- Using getStateFlow and getLiveData together on a SavedStateHandle is no longer valid and now throws an IllegalArgumentException behavior changed · inferred, marked in the notes below
1 change to check, marked in the notes below
From AndroidX Lifecycle
API Changes SavedStateHandle now provides functions to integrate with SavedStateContainer. There is asContainer() to transform the SavedStateHandle as a SavedStateContainer, getOrCreateContainer() to make a child container inside of the handle, and getOrCreateSavedStateHandle() which creates a child SavedStateHandle inside of the current one. As part of the move to SavedStateContainer, it is also no longer valid to use getStateFlow and getLiveData together on a SavedStateHandle and doing so will throw an IllegalArgumentException ( I62f36) behavior changed · inferred