So you built your first Flutter application and released it on the AppStore for iOS devices and Google Play for Android devices. Then you wanted to reach a larger audience and targeted web, so you released it with static hosting. But you still want more. If you want the performance of mobile but the responsiveness of web, desktop is the answer.
With desktop, you have a couple of options for releasing — but all of them come with certain tradeoffs. Here, we will discuss why you may want to choose one over the other.
You may have heard of Electron before since most of the third party applications currently available on MacOS and Windows are released with it. Electron is a chromium-powered browser with Node.js to glue the web browser to the filesystem. You get the benefit of developing for the web but with the flexibility of desktop. It uses a lot of JS to do this so you lose out on AOT (Ahead of time compilation), which means that there is no tree shaking, optimization or general performance.
Check out different options for releasing a Flutter desktop application!The reason Flutter works so well on mobile is because of the AOT from release builds. You can release a Flutter application with Electron by adding a manifest file to the root and a few extra boilerplate scripts. You package up your Flutter Web application just like when deploying to static hosting.