Migration to 1.0.0
Voyager 1.0.0 brings API stability and the first deprecation cycle.
ScreenModel
New Module
Now the ScreenModel API has its own module and no longer are available in voyager-core
, if you are using ScreenModel you should declare the dependency cafe.adriel.voyager:voyager-screenmodel
(see Setup).
Navigation level ScreenModel
Since 1.0.0-rc08 we have introduced the ScreenModel scoped at Navigator Lifecycle, now the API is no longer marked as Experimental.
Deprecation cycle
Since 1.0.0-rc08
we have renamed the extension coroutineScope
to screenModelScope
, now it was removed from 1.0.0, if you are still using it, just replace with screenModelScope.
AndroidScreen
The module voyager-androidx
and AndroidScreen
was removed! Since 1.0.0-rc06
we have introduced a new API called NavigatorScreenLifecycleProvider
that provides by default the previous behavior of AndroidScreenLifecycleOwner
on Android target for all Screen.
Important notice: AndroidScreen, different from Screen, it holds the Screen.key
as a uniqueScreenKey
, this is a pretty common requirement, to avoid issues and weird behaviors, we recommend continuing to specify a uniqueScreenKey
if you are not, we also recommend creating a abstract class UniqueScreen
to replace your AndroidScreen
implementation.
APIs promote to Stable
All Navigator scoped ScreenModels API
NavigatorLifecycleStore
andNavigatorDisposable
TabDisposable
Deprecation cycle
ScreenLifecycleStore.get
: Useregister
or newget
function instead.Stack.lastOrNull
: UselastItemOrNull
insteadNavigator.last
: UselastItem
insteadScreenModel.coroutineScope
: UsescreenModelScope
insteadScreenModelStore.remove
: UseonDispose
instead.Tab.title
: Useoptions
instead.Tab.icon
: Useoptions
instead.
Last updated