Can I delete the android and ios folders in Flutter?

Viewed 2970

I am writing for desktop, so windows, linux, and mac directories are all I need. But I am not sure if I should delete the android and ios folders or not.

2 Answers

Yes, because unless you are compiling your code for this platform, its contents are useless to you, as they are only a boilerplate code for you.

Example, if you enable web support for Flutter, but decide not to compile for web, then removing the folder does literally nothing to your code if you're (for example) developing for Android and iOS only.

You can use the command line to delete or create folders of flutter env.

For example, to delete android:

rm -r android

and if you want to deploy for android in the future you can use:

flutter create --platforms=android .

so feel free to delete or create any env.

Related