How to install Flutter in Windows 10? - flutter

I am installing flutter in my windows 10 but when I check that is everything alright through flutter doctor command in cmd then there is some error shown in following picture.
Error image

As you can see at the bottom right corner, you don't have an internet connection and thus, it can't reach github.com, which it seemingly needs to run.

Download a fresh install of flutter sdk and follow the necessary steps from here.. https://docs.flutter.dev/get-started/install/windows
Be sure to register the path in the environmental variables
Be sure to install git
Be sure you are connected to the internet along the process
and it should work

Step 1: Download the Flutter SDK. We’ll have to download the Flutter SDK file in order to work with flutter. We can easily download it from the official website of Flutter.click for preview
Step 2: Set Environment variable path. After downloading Flutter SDK, extract the file and copy the path of the bin folder.
click for preview
Press WIN + R and paste the following: rundll32.exe sysdm.cpl,EditEnvironmentVariables
click for preview
Now click on new and paste the path that was copied earlier and save.
click for preview
Now We have to set up the Visual Studio Code for the Flutter. We have to install two extensions in order to use flutter. The very first extension is Flutter and 2nd is Dart. Note that Dart is the programming language that is used in flutter for the application development for both and android and iOS.
Step 3: Installing Flutter in Visual Studio Code
click for preview
Step 4: Now install Dart in Visual Studio Code
click for preview
Step 5: Now we have successfully added Flutter and Dart to the Visual studio code, now let’s check if flutter is installed or not. For this we will open a new terminal in Visual Studio Code and type the following “flutter –version”, if everything is fine then it will normally show the version of the installed flutter.
click for preview

Related

Avdmanager not found

I am trying to run my first flutter app emulator, which is having complications at various level, I have tried too much but could not make through it, here is what I have tried.
On trying to click on Create Android Emulator in Visual studio code, the dart extension shows following:-
link to img
I don't know why it is happening as on checking, it is present:-
link to img.
I would like to point out here that I am not able to understand what I have to put in flutter --android-sdk {path}.
Also on running flutter doctor, it shows the absence of visual studio despite the fact that I have it in place(that is why I could take the first screenshot). One thing I would like to point out here is that my vscode is in C drive while my flutter-test folder(which contains everything related to flutter) is in D drive:
link to img
Please help so that I can further follow along to create an android app. Also ask if any further information is needed.
You need to know that having Android Studio Installed will solve the majority of issues caused.
STEPS:
Clean out all your Flutter, Dart and Android installation
Download Android Studio from official website (the latest version is Android Studio Electric Eel)
After the installation of Android Studio, open it and add the flutter and dart plugins
Now download flutter and follow the installation steps.
After adding flutter, go to Edit the system environment on your PC and add JAVA_HOME variable with C:\Program Files\Android\Android Studio\jbr. Noticed I used jbr not jre because with Android Studio Electric Eel jbr replaced jre.
Afterward, open new terminal and run flutter doctor --android-licenses
WHAT DID WE DO ABOVE?
We cleaned our installation and downloaded the latest Flutter version which has Dart downloaded automatically. Next, we Installed Android Studio Electric Eel which has Java and Android settings in-build. This way we solve 99% of the problems here: The last thing is to create an Emulator using Android Studio not VSC.
For future help, please comment below. Bye

Flutter: Cannot parse result path string

Error I am getting:
When I am trying to build the app (Which is by default app by Flutter), I am facing this problem please someone help me out.
flutter doctor -v:
I also checked the problems but didn't get anything.
I was trying to build the app.
If you are using windows, it is selected windows build by default on VS Code. You can select device on top section for android studio and bottom corner for vs-code.
and then run the app again.
Also you can use command on terminal like
flutter run -d c
this will run on chrome(I am using c to select chrome).
If you like to build on Windows, you need to install Desktop development with C++. Check How to build release version of windows app?

How to deploy flutter example for the web?

https://pub.dev/packages/flutter_tex/example (want to run this code for Flutter Web)
Goal: Deploy flutter example on a simple web page for checking latex code output
Expected result: Simple web page where you type Latex on the left and it shows you rendered equations on the right
My experience: 1 day
Current installation: Flutter, Dart, Android Studio, Dart -> Able to "create new Flutter project"
What I have tried: Opened a new flutter project - pasted code in main.dart - did not work (no device device - need virtual device for web deployment?)
In order to run your Flutter project on the web, you must ensure that you have the latest version of Flutter (currently I am running v2.0.2). If you don't have the latest version, just run flutter upgrade in the terminal.
Secondly, you need to check whether the package that you are using also supports the web platform. You can check it by going into the "Scores" tab in the package.
Then, all you have to do is to run the command:
flutter run -d chrome
This will launch the flutter app in the Google chrome browser.

Flutter Windows option disabled in IntelliJ IDEA

Windows option is disabled while creating a new Flutter project in IntelliJ IDEA. I've upgraded my Flutter to Flutter 2 stable channel but getting Windows option disabled whereas I've also installed Visual Studio 2019 in my PC.
Here's my Flutter doctor results
Run the following commands
flutter config --enable-windows-desktop
flutter channel dev
flutter upgrade
flutter config --enable-windows-uwp-desktop
flutter doctor
Then as per the instruction of the above command, you may have to install required tools like Visual Studio...
Finally in IntelliJ
New Project -> Select Flutter -> Select SDK Location, Click Next
(Now if you still see Windows is disabled)
Press Back & Then press next... Now, I am seeing it can be enabled.
Even after that if you are not seeing, allow the project to finish without selecting the windows (or try to select web)
Then provide the following command on the project root directory
flutter create --platforms=windows

Grandlew bat file not found in windows 10

I have installed flutter and android studio. Followed some resources I have added path.(In windows)
But everytime I run the first project it is giving errors
like. Grandlew bat file not found.
sometimes : exception: exit with 1
Flutter doctor is always giving licenses unknown. I tried number of solutions in the YouTube and from here..but still getting same thing..
My dreams are going to stop in the first step.
you need to install flutter and dart plugin in your android studio/VS code.
to install a plugin in Android Studio follow these steps
Launch Android Studio application
Choose File -> Settings (For Mac Preference )
Search for Flutter then for dart(But dart will be installed automatically with flutter)
I just noticed you don't have Android SDK either, for that, you should go to your android studio and on the top right corner click on the SDK icon, and then install 28/29 version of android SDK hopefully it will solve your problem
alternatively, you can download SDK from here as well