Best / Cleanest Way to have platform specific scre...
# decompose
s
Best / Cleanest Way to have platform specific screens/overlays in between a flow using decompose ?
a
Can you please elaborate?
s
Lets say in onbaording childstack, I have to present an installer screen which will request user to install vlc and ffmpeg if not avlbl already, but this will only appear in desktop platforms.
a
One of the options: create separate expect/actual parent (flow) components and also expect/actual UI. Another option could be: have one parent (flow) component in commonMain, plus an expect/actual component for those installations on desktop. Pass an optional factory of InstallComponent into the parent component, which is only supplied on desktop. When it's time to show InstallComponent, check the factory first. If it's not null, show the component, otherwise skip it and proceed to the next step.
s
I was thinking something same along the likes of second approach, thanks.
👍 1