Benjamin
Benjamin

Reputation: 6161

How can I disable web support in Flutter?

I recently ran this command to try web support out in Flutter:

flutter config --enable-web

Now, every project I make has a web folder and inside is an index.html. Is there any way I can disable that for future projects and is it safe for me to just delete the folder and carry on?

Upvotes: 44

Views: 35502

Answers (2)

RITTIK
RITTIK

Reputation: 846

Here are the list of useful commands to enable and disable platforms in flutter:

flutter config --list (TO CHECK LIST OF ENABLED DEVICES)

WEB:

flutter config --no-enable-web
flutter config --enable-web

WINDOWS:

flutter config --no-enable-windows-desktop
flutter config --enable-windows-desktop

LINUX:

flutter config --no-enable-linux-desktop
flutter config --enable-linux-desktop

MACOS:

flutter config --no-enable-macos-desktop
flutter config --enable-macos-desktop

ANDROID:

flutter config --no-enable-android
flutter config --enable-android

iOS:

flutter config --no-enable-ios
flutter config --enable-ios

Upvotes: 0

user10539074
user10539074

Reputation:

flutter config --no-enable-web

if you try to type flutter config in terminal you will see all options

Upvotes: 130

Related Questions