I am new to developing mobile apps and wanted to try Flutter but I use Windows. Because Flutter doesn\'t support Windows yet I had the idea to use a virtual machine running
You should check out MacOS cloud solutions like MacInCloud. There are CI/CD solution that will support it (e.g. CircleCI and BitRise) however these are not suited for development.
Services like MacInCloud allow you to remote desktop into a Mac where you could conceivably use XCode remotely.