GestureNavigationDecorationFactory
actual fun GestureNavigationDecorationFactory(fallback: AnimatedNavDecorator.Factory, onBackInvoked: () -> Unit): AnimatedNavDecorator.Factory(source)
actual fun GestureNavigationDecorationFactory(fallback: AnimatedNavDecorator.Factory, onBackInvoked: () -> Unit): AnimatedNavDecorator.Factory(source)
expect fun GestureNavigationDecorationFactory(fallback: AnimatedNavDecorator.Factory = NavigatorDefaults.DefaultDecoratorFactory, onBackInvoked: () -> Unit): AnimatedNavDecorator.Factory(source)
Returns a AnimatedNavDecorator.Factory implementation which support navigation through appropriate gestures on certain platforms.
When running on Android 14 (or never) devices, this decoration supports Android's 'predictive back gesture'.
When running on iOS, this decoration simulates iOS's 'interative pop gesture'.
On other platforms, it defers to
NavigatorDefaults.DefaultDecoration
.
Parameters
fallback
The AnimatedNavDecorator.Factory which should be used when running on platforms which GestureNavigationDecorationFactory does not support.
onBackInvoked
A lambda which will be called when the user has invoked a 'back' gesture. Typically this should call Navigator.pop()
.
actual fun GestureNavigationDecorationFactory(fallback: AnimatedNavDecorator.Factory, onBackInvoked: () -> Unit): AnimatedNavDecorator.Factory(source)
actual fun GestureNavigationDecorationFactory(fallback: AnimatedNavDecorator.Factory, onBackInvoked: () -> Unit): AnimatedNavDecorator.Factory(source)