How to setup flutter in windows
1. You have a PowerShell
2. Git for Windows
3. download flutter SDK and extract the desired location
4. set environment variable in flutter (C:\src\flutter\bin)
5. open cmd and types commands
flutter
or
flutter doctor - Show information about the installed tooling.
or
flutter --version
basic flutter command:
flutter create <output directory>
Create a new Flutter project in the specified directory.
flutter run [options]
Run your Flutter application on an attached device or in an emulator.
Run "flutter help <command>" for more information about a command.
Run "flutter help -v" for verbose help output, including less commonly used options.
6. download and install the android studio ide
7. open cmd and go your project file location then types the commands:
my project location is:
E:\Practicals\Flutter
and create flutter project:
flutter create first_app
8. open the project 'first_app' in android studio.
9. create an android virtual device
10. update the plugins (flutter and dart plugins) and restart the ide.
11. open sdk manager and install google usb intaller in androis studio ide.
12. create environment variables
a) new user variable: (sdk user variable)
variable name: ANDROID_HOME
variable value: C:\Android\Sdk
b) new user variable: (path)
%ANDROID_HOME%\tools
c) new user variable: (path)
%ANDROID_HOME%\platform-tools
13. first run on emulator first
14. run the application
--------------------------------------
you can also run the application without android studio ide.
1. close the android studio ide but don't close the Android emulator.
2. open cmd and go your project location
3. and type the command 'flutter run'
4. done.
No comments:
Post a Comment