How to Disable Web and Desktop Support in Flutter
If you only want to develop mobile apps using Flutter, you can turn off anything related to the web and desktop.
Of course, if you later decide that you want to expand your app to other platforms, you can always enable those features again. But for now, if you’re only interested in mobile development, there’s no need to clutter up your project with code for other platforms.
Disable Web and Desktop Support
You can open the terminal in Android Studio and run the following commands to disable web and desktop for future projects
flutter config --no-enable-web flutter config --no-enable-macos-desktop flutter config --no-enable-windows-desktop flutter config --no-enable-linux-desktop //or all-in-one command flutter config --no-enable-macos-desktop --no-enable-windows-desktop --no-enable-linux-desktop --no-enable-web
Enable Web and Desktop Support
In case you want to add the support back to your projects, you can execute the following commands:
flutter config --enable-web flutter config --enable-macos-desktop flutter config --enable-windows-desktop flutter config --enable-linux-desktop