We’re implementing a custom Switch component, and noticed that we have to do some math with the `Swi...
z
We’re implementing a custom Switch component, and noticed that we have to do some math with the
SwipeableState.offset
when the layout direction is Rtl to draw the thumb on the right side. The gesture direction is correct though. Should
SwipeableState.offset
return inverted values in Rtl mode? If so, I can file a bug.
c
A toggle like one of these?
z
no, like a switch. I updated my original message to be more clear
a
localizing bidi is surprisingly nuanced. We initially had
Placeable.place
work the way you're describing but shifted to having the mirroring
placeRelative
not be the default instead
should be like a 4-liner with
Modifier.layout
using
placeRelative
though
z
Yea it’s very easy to get the correct behavior we’re looking for inside a
DrawScope
too, even without a
placeRelative
equivalent. I’m very satisfied with the answer “no, swipeable state does the right thing,” I just wanted to check. Thanks!