Dart4Flutter-01 — variables, types, and functions

Dart4Flutter — 02 — Control flow and anomalies

Dart4Flutter — 03 — Classes and generics

Dart4Flutter — 04 — async and library

Dart 4FLUTTER – gLEANer 01- Flutter- DART environment setup

System conditions

  • The best operating system is Windows 10, which affects PowerShell
  • PowerShell above 5.0: Mainly run the flutter command. Note that git console is not used
  • git

Configuration Flutter SDK

  • Download SDK address
  • Unzip it and put it on drive D
  • Double click in the next directoryflutter_console.batFile to execute flutter commands
  • If you want to execute the flutter command on any other path, configure path.flutter\binAdd to path
  • performflutter doctorView the installation report and install as prompted. Currently you only need to install Android Studio below and the rest will be installed together.

Install the Android Studio

  • Download address

  • Android Studio is installed by default

  • Configure Android Studio. The dart SDK configures the flutter SDK on disk D, and the DART SDK configures the flutter SDK on disk D:\flutter\bin\cache. The dart SDK configures the load on the flutter and dart, and the other defaults.

  • Equip Android devices. Open the mobile developer mode, open the USB debug mode, link the mobile phone to the computer. Check whether the device is connected successfully by flutter Devices. If information similar to the following is displayed, the connection is successful.

PS C:\Users\Administrator> flutter devices
1 connected device:

Redmi Note 3 • JNY969CI99999999 • android-arm64 • Android 5.0.2 (API 21)
Copy the code
  • Create the Menu for creating the Flutter project

    Create a project interface. The first one is to create a FLUTTER project, the second one is to create a Flutter plugin, and the third one is to create a flutter library. Let’s create the first one.

    Briefly describe the project directory you created

  • Run Click on the green triangle in the upper right corner to run the Flutter application on your phone. If the Flutter application is opened, the whole Flutter environment has been successfully set up and the DART environment has been successfully set up.

  • Create the DART File and run the DART program in the bin folder, right-click, choose New ->Dart File, and add the File name test.dart.

    Add the following code to the file:

main() {
  print("hello world");
}
Copy the code

Right-click in the file and select Run ‘test.dart’.

Observatory listening on http://127.0.0.1:52457/

hello world

Process finished with exit code 0
Copy the code

conclusion

It’s a long process

  • Download and configure the Flutter SDK
  • Android Studio configuration

But developing apps with Flutter requires the DART language, so the DART SDK is integrated with the FLUTTER SDK. So now it is necessary to learn how to configure the FLUTTER environment.