From 4681fa4d42ac58d1d911f08f09210e25e46f7968 Mon Sep 17 00:00:00 2001 From: Arkadii Ivanov Date: Mon, 30 Oct 2023 17:43:35 +0000 Subject: [PATCH] Updated predictive back gesture docs --- docs/extensions/compose.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/extensions/compose.md b/docs/extensions/compose.md index 511403d4c..bebb10fc0 100644 --- a/docs/extensions/compose.md +++ b/docs/extensions/compose.md @@ -480,8 +480,13 @@ actual fun backAnimation( predictiveBackAnimation( backHandler = backHandler, animation = stackAnimation(iosLikeSlide()), - exitModifier = { progress, _ -> Modifier.slideExitModifier(progress = progress) }, - enterModifier = { progress, _ -> Modifier.slideEnterModifier(progress = progress) }, + selector = { initialBackEvent, _, _ -> + predictiveBackAnimatable( + initialBackEvent = initialBackEvent, + exitModifier = { progress, _ -> Modifier.slideExitModifier(progress = progress) }, + enterModifier = { progress, _ -> Modifier.slideEnterModifier(progress = progress) }, + ) + }, onBack = onBack, )