I have exactly the same issue with vscode.
I need it to find the dart sdk.
I installed the dart-sdk but I cannot get vscode to find the directory it is in because of the sandbox.
Flatpak for deploying an application with fixed resources is fine but and IDE like IntelliJ or vscode cannot function in a sandbox unless you can define external resources. I looked at the flatpak documentation but could not get overrides or --filesystem=path-to-dart-sdk to work.
I also need the golang tools installed in vscode so that is more complexity again!
I have tried for hours to get vscode to find dart-sdk now I am uninstalling vscode and installing it outside of flatpak. I will have to do the same with IntilliJ, my normal IDE for Java development.
Does anyone have a solution that can be applied across all flatpak applications like this. We cannot be the first people to find this issue.
Stuart