No option for adding New flutter Web Project in IntelliJ Dart Templates !!! Also tried Vs code, is asking for Which Dart template

纵然是瞬间 提交于 2020-06-17 01:50:28

问题


I'm trying to start a new Flutter project in Intellij as well as Vs code. Intellij there is no option provided to add a new flutter web project in Dart templates. Vs code whenever I select New flutter Web Project after accepting the stagehand it asks for the Dart template which is why I'm stuck.?? Please help soon??


回答1:


Since flutter 1.9 flutter_web is merged inside flutter, Follow the below steps to create and run your first flutter web App through IntelliJ IDEA.

  1. Create a new flutter project.
  2. Now change your flutter channel to master using flutter channel master
  3. Upgrade flutter flutter upgrade
  4. Install the flutter_web build tools flutter pub global activate webdev
  5. Enable flutter web using flutter config --enable-web
  6. Check available devices flutter devices and you will get a result like:

    Chrome     • chrome     • web-javascript • Google Chrome 81.0.4044.92    
    Web Server • web-server • web-javascript • Flutter Tools
    
  7. Inside your flutter project create myapp using flutter create myapp

  8. Navigate inside myapp using cd myapp
  9. Finally, run flutter run -d chrome

And you will be able to run your flutter web app into chrome. Hurray 🤟🏽🤟🏽🥳

Reference links: Building a web application with Flutter , flutter_web




回答2:


It seems that the support for Flutter Web Apps was dropped in stagehand (that contains the dart templates). From this commit on github: (Dropping Flutter Web sample). Instead, this wikipage shows how to migrate/create a web package in flutter from command line.




回答3:


  • Create your project from command-line.
    Check out this tutorial. flutter.dev/docs/get-started/web
  • Then just open the project in IntelliJ IDE.



回答4:


Install or Update the dart and flutter plugins in Intellij and/or VS Code

For Intellij

  • Go to [mac] Preferences>Plugins>Marketplace and search for Dart and Flutter, install it.

For VS Code

  • Go to View > Command Pallet and type in Extensions: Install Extensions

  • then type flutter and install it

Its well documented in this link Setup Flutter



来源:https://stackoverflow.com/questions/58016974/no-option-for-adding-new-flutter-web-project-in-intellij-dart-templates-also

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!