简体   繁体   English

Flutter 新 web 项目未显示在 Visual Studio 命令面板中

[英]Flutter new web project not showing in Visual Studio command palette

I have installed Visual Studio Code, Dart and Flutter correctly according to the tutorial step shown in docs.我已根据文档中显示的教程步骤正确安装了 Visual Studio Code、Dart 和 Flutter。 I have checked it 100 times but nothing is wrong, unable to find issue.我已经检查了 100 次,但没有任何问题,无法找到问题。

Expected result in Flutter: Flutter 中的预期结果:

New web project must be visible in in Visual Studio Code.新的 web 项目必须在 Visual Studio Code 中可见。

I was not able to get 'Flutter: New Web Project", but following https://flutter.dev/docs/get-started/web from the Flutter Docs got me running the app on the web. Hope it helps. Below are the commands that I entered in Visual Studio Code's terminal我无法获得“Flutter:新 Web 项目”,但遵循 Flutter Docs 中的https://flutter.dev/docs/get-started/web让我在网络上运行该应用程序。希望它有所帮助。以下是我在 Visual Studio Code 的终端中输入的命令

$ flutter channel dev
$ flutter upgrade
$ flutter config --enable-web
$ mkdir <new_project_directory_name>
$ cd <into new_project_directory>
$ flutter create .
$ flutter run -d chrome

Flutter: New Web Project was removed from the VS Code extension. Flutter:从 VS Code 扩展中删除了新的 Web 项目。 The excuse was this was always supposed to be temporary and it broke with the latest release of 'Stagehand'.借口是这总是应该是暂时的,它与最新版本的“Stagehand”中断了。 But removing it makes it harder to create a new web project.但是删除它会使创建新的 Web 项目变得更加困难。 I followed the directions given in answer by @ALotLikeEss.我按照@ALotLikeEss 在回答中给出的指示进行操作。

Simply select "Debug" and "Start Debugging" from the menu.只需从菜单中选择“调试”和“开始调试”。 After this, the command palette will appear.在此之后,将出现命令面板。

开始调试

Try using with stagehand templates 尝试与stagehand模板一起使用

https://github.com/dart-lang/stagehand https://github.com/dart-lang/stagehand

I tried this and it's working for me :我试过这个,它对我有用:

open terminal in project folder and execute this :在项目文件夹中打开terminal并执行:

flutter config --enable-web

And restart your IDE并重新启动您的 IDE

在终端flutter config --enable-web运行 commando,重启你的 vscode 或 android studio 并重试..

I had the same problem.我有同样的问题。 if flutter plugin is installed, direct visual studio code to a folder (open a folder) then select view>command palette> or press ctrl+shift+p short cut keys, then write flutter.如果安装了 flutter 插件,将 Visual Studio 代码指向文件夹(打开文件夹)然后 select 视图>命令面板> 或按 ctrl+shift+p 快捷键,然后写入 flutter。 Flutter:New Project item will be displayed. Flutter:将显示新项目项目。 Opening a folder solved my problem.打开一个文件夹解决了我的问题。

将您的 Visual Studio 代码更新到最新版本(版本 1.35.0 (1.35.0))并安装 Flutter 和 Dart 插件

Heyy!!! 嘿! I had the same problem, maybe it can help you: https://flutter.dev/docs/get-started/web 我有同样的问题,也许它可以为您提供帮助: https : //flutter.dev/docs/get-started/web

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM