Hey everyone! How do you preview both light and da...
# compose
r
Hey everyone! How do you preview both light and dark mode in compose multiplatform? Unlike the android annotation the multiplatform one doesnt support any params
w
It's currently not possible. At this moment the workaround is to place such preview in your android sources.
👍 1
r
I have added it in the android source set but there is no preview available (no gutter icon)
w
Ah I am sorry, in Fleet Android previews are under a feature flag atm (they are under construction). You can set this flag in your project settings file. This setting can be found in
.fleet/settings.json
. If you can not find it, go to settings, click on VIBESYNC, and then click on any of the "Edit in settings.json" buttons, it will create the file for you. In this settings file, you can set the feature flag:
compose.previews.android.enabled
i
just wanted to add on to what Wout said: these flags work only from Fleet 1.39+
alphabet white o 1
alphabet yellow o 1
alphabet white p 1
alphabet white s 1
🙈 1
r
ahh okay thanks for pointing that out! My current version is
1.38.89
Let me try in newer versions
Fleet 1.39+
is this available? Toolbox says mine is the latest one available 😛
w
Yeah sorry, I messed up, I accidentally gave you a sneak peak! I'll let you know when I know that it will be released :)
r
hehehe thanks! Looking forward to it! Btw do you plan to provide similar functionality in the cmp preview?
i
also please note that Android Previews in 1.39 will still be in an early development stage. It can have some significant issues. We are aiming to make it stable and release in 1.40 or even 1.41. It will also allow you to preview code from common source sets (I mean, pretending it's Android).
😅 1
👌 1
w
provide similar functionality in the cmp preview
(Assuming that you mean the annotation customisations) This requires coordination with quite some teams, it's already an annoyance that there are 3 different @Preview annotations, so we should be careful with further changes around these declarations. So how exactly you will be able to customize your common previews is being discussed :)
👍 1
gratitude thank you 1
1.39 has been released! Let us know what you think :)
r
Thanks for the update! I'll give it a try and let you know! 🙂
thank you color 2