Flutter new web project not showing in Visual Studio command palette - flutter

I have installed Visual Studio Code, Dart and Flutter correctly according to the tutorial step shown in docs. I have checked it 100 times but nothing is wrong, unable to find issue.
Expected result in Flutter:
New web project must be visible in in 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 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. The excuse was this was always supposed to be temporary and it broke with the latest release of 'Stagehand'. But removing it makes it harder to create a new web project. I followed the directions given in answer by #ALotLikeEss.

I tried this and it's working for me :
open terminal in project folder and execute this :
flutter config --enable-web
And restart your IDE

Run commando in terminal flutter config --enable-web, restart your vscode or android studio and try again..

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:New Project item will be displayed. Opening a folder solved my problem.

Simply select "Debug" and "Start Debugging" from the menu. After this, the command palette will appear.

Update your visual studio code to latest version (Version 1.35.0 (1.35.0)) and install Flutter and Dart plugin

Related

Cannot Create Flutter Project in Android Studio due to missing pubspec.yaml

Whenever I create the Create new Flutter Project in android studio,
It's always throwing out this error: Please help.
Could not find a file named "pubspec.yaml" in "/Users/<usrname>/AndroidStudioProjects/inventory_system". pub get failed (66; Could not find a file named "pubspec.yaml" in "/Users/<usrname>/AndroidStudioProjects/inventory_system".)
First of all make sure your flutter is properly installed on your system. Faced the same issue. Try checking your installation and make sure everything is installed properly. Use this link: https://flutter.dev/docs/get-started/install
Just uninstall android as well as flutter. Try installing them again. First download and install Flutter. Then download and install Android Studio. Follow the proper installation process. I guess your issue is because of the unproper installation.
After flutter installation, open the folder where you have installed it, and open the file flutter_console which is a batch . It will open a console and then type:
flutter doctor
This will show you whether all the installation is properly carried out or not. But a better way is to perform proper installation.
Also you need to set environment variable after the installation.
Here is what happened with me when I installed flutter and android. This is just to show you the issue I had faced after installation
I then followed what was been said as error and got my flutter and android studio working.
Open the terminal.
Create the folder for your project by typing the command:
mkdir my_awesome_project
Navigate to the created folder:
cd my_awesome_project
In the folder type the command for project creation:
flutter create myawesomeproject
Open the AndroidStudio and then open the created folder.
Now you are ready to run and develop your app.
the easiest and simplest way to create new flutter project is to add flutter plugin to android studio/vs code and selecting SDK dir and then you can simply create new flutter project by clicking on buttons
and you can check flutter official guide

Can not install Flutter on MacOs, Tells that the unzip process is not working

When I try to install
unzip ~/Downloads/flutter_macos_2.2.2-stable.zip
this message pops up
unzip: cannot find or open /Users/user/Downloads/flutter_macos_2.2.2-stable.zip, /Users/user/Downloads/flutter_macos_2.2.2-stable.zip.zip or /Users/user/Downloads/flutter_macos_2.2.2-stable.zip.ZIP.
I don't what to do to install Flutter to OSX (vscode)
I can obtain flutter for Android Studio with no problems.
Also can't access flutter by itself on iTerm or Terminal.
First, it seems that your archive has two extensions .zip.zip, but it's probably not the problem you're facing.
You may want to check if your iTerm has the necessary permissions to access the content of the folder "Download" since it's a special folder for MacOS.
Second, for creating a flutter project through VSCode, you need to run the command flutter create myprojectnamehere, you will not have a button to create a flutter project like on Android Studio.
If you still facing issues with the installation of Flutter, you may want to checkout Flutter_Installer which is a Flutter GUI Installer made with Flutter.

Can we open a flutter project created in Android Studio, in VS Code?

I am using VSCode for Flutter development but my team is using Android Studio. So when I tried to clone the repo which has Flutter Project created from Android Studio into VSCode, it is not even detecting import 'package: flutter/material.dart'; and throwing a lot of errors.
Is there a way possible or is it like we cannot use other code editors for projects created in Android.
Yes, It is possible. Just open your terminal and enter the following commands
cd my-project-folder/
#takes you to your project folder
then
code .
#this will open your project in vs code
Yes, but make sure VS Code is correctly set up. It needs to have Flutter and Dart Extensions installed.
Yes it's easy
Open VS Code
Open terminal ( press CTRL + ~ ) or ( from top bar press view >> command palette and select Create New Terminal )
Copy your project path and add it to terminal
To add the path to terminal type
cd type/your/path
then type code . in terminal to open your file

Flutter plugin mot installed still occurs even if I have installed it

I am working on Windows so the following command does not work.
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
Any idea?
The last command you mentioned is specifically for MAC users not for Windows.
Anyhow, try the below commands and check if it is working fine.
flutter channel dev
flutter upgrade
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"
flutter doctor -v
Note: Make sure to change commands based on your directory structure.
I solved the issue with the following ways.
Requirement: You have Git installed on your machine.
Create a folder, for example, src directly in a root path. This procedure is the same as what explained in the flutter official download page. So you now have d:\src for example.
Open powershell or cmd, navigate to d:\src and execute git clone -b master https://github.com/flutter/flutter.git. You need to select master branch here because the stable version still has your issue (as of the time of writing).
Once the cloning finishes, execute flutter doctor -v. The problem should vanish.
You might need to set write access to the flutter folder such that Android Studio can create Flutter project files, etc.

Setting up Flutter with Visual Studio Code

I am a C# developer, but have been tasked with developing a Flutter app, and I am discovering I have no idea what I am doing. I have a copy of Visual Studio Code and have installed the Flutter SDK, but they aren't working together. The Dart and Flutter extensions are installed, but when I CTRL+SHIFT P and select Flutter: New Project, the prompt disappears and I find myself with nothing changed on the screen. Earlier, I was getting an error that VSCode could not find my SDK.
I am going nuts. Can someone tell me where to start debugging this problem?
Seems that you don't have the SDK installed.
Navigate to the View option on vs code then select Command Palette.
type the word flutter in the palette; it should give you a list of commands, for
instance, creating a new project and flutter doctor.
Select either Flutter: Run flutter doctor of Flutter: run new project
You will get an option at the bottom|right side of vs code to select installation folder for SDK (if you don't have it). You will then be prompted with Project name and location.
To run your sample project, you can use flutter run command.
VS Studio is looking for flutter in predefined folders as indicated in the "View Logs" button. To fix this, Add the flutter\bin folder in your environment variable.
In Windows, right-click "This PC" -> "Properties" -> "Advanced System Settings" -> In "Advanced" Tab, click on "Environment Variables", In "System Variables" section select "Path"
Next click "Edit", click "New" and put the location of the bin folder where flutter is installed.
Restart VS Studio, and re-run flutter doctor.
If you're running Flutter: New Project and then seeing nothing at all, then this is certainly a bug in the extension. It's supposed to prompt you for a project name and location.
If you can still reproduce this, please raise a bug on GitHub and if possible attach an Extension log. There may also be useful information in the dev console (Help -> Toggle Developer Tools).
Flutter setup for VSCode windows
You Need to download flutter libraries either from flutter or git
a. From flutter
https://storage.googleapis.com/flutter_infra/releases/stable/windows/flutter_windows_v1.12.13+hotfix.9-stable.zip
b. From git clone (make sure git is installed in your system)
C:\src>git clone https://github.com/flutter/flutter.git -b stable
Extract or clone flutter libraries in following directory
C:\flutter
Add a new environment veritable path C:\flutter\bin
Run flutter version to check flutter installed correctly
Install VSCode
Install Flutter and Dark extensions in VSCode
Press Ctrl + Shift + P to open command palette. Type in the search bar Flutter and click on Flutter: New Project.
It will create a demo project.
Run flutter to run demo project
Note - You may need to install android studio as it will set android SDK and emulator