I created a Flutter app with mobile support only:
flutter create --platforms=ios,android foo
I also have another Flutter project that I created before web was supported by Flutter, which is why it only contains support for mobile.
Now, I want to run my app on web and macOS, but I receive the following error when trying to use flutter run -d macos
:
Exception: No macOS desktop project configured. See https://flutter.dev/desktop#add-desktop-support-to-an-existing-app to learn about adding macOS support to a project.
flutter create . You can simply run this from the root of your Flutter project and it will add the required files for all platforms. If you only want to add support for specific enabled platforms, you can do that by supplying the --platforms argument: flutter create --platforms=web,macos .
Using the File > New > New Module… menu in Android Studio in your existing Android project, you can either create a new Flutter module to integrate, or select an existing Flutter module that was created previously. If you create a new module, you can use a wizard to select the module name, location, and so on.
You can go to the pubspec. yaml file and add dependencies ,under dependencies and then packages get will do the work. or you can run flutter pub get in the terminal.
You can add support for new plugins by recreating your project:
flutter create .
You can simply run this from the root of your Flutter project and it will add the required files for all platforms.
If you only want to add support for specific enabled platforms, you can do that by supplying the --platforms
argument:
flutter create --platforms=web,macos .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With