When the user clicks on the button in my Flutter program, I want to open "E:Downloads1.fbx" file on the Windows 3D viewer (Default software – windows).
But the file location is not included in pubspec.yaml
file. I cannot find a way to do this. Is there any package or any way to do this?
2
Answers
@moulte answer is correct for normal software such as Chrome, Zoom, etc.
But, In my case, Windows 3D viewer is not normal software. It's a default one. Can't find the file location of the 3D viewer. (actually, we can find it but, If you use it, you just want to get administrator permissions for your Flutter windows.)
So, I found this method to do my task.
Created Function
Called it when user clicks the button,
Now, It's on with 3D viewer.
You could use the process class to run the executable you want, the seconds param is the list of args to pass to the executable.
Give it the file to open. For example something like this should work :