To be able to create your app in Dart & Flutter, you have to set up your environment first.
Flutter
Download here: https://flutter.dev/docs/development/tools/sdk/releases
- Extract the ZIP file to your computer (do not put them in any system directory like Program Files).
- Register your new directory with extracted files in your system PATH environment.
- On the Windows desktop, right-click My Computer.
- In the pop-up menu, choose Properties.
- In the System Properties window, click the Advanced tab, and then choose Environment Variables.
- In the System Variables window, select Path, and click Edit.
- Open Command Line
- Navigate to the directory with extracted files.
- Run command “flutter doctor”
- This command checks your system and reports every possible problem or missing requirement.
- Resolve all reported problems except missing Android studio and missing Extensions for Dart or Flutter (will be described later in this article)
Android Studio
The Android Studio must be installed in order to develop apps in Flutter even if you use a different editor (such as Visual Studio Code that I prefer). Download here: https://developer.android.com/studio
- Install the Android studio using downloaded Wizard.
- Install Android SDK Command-line Tools & SDK Build-Tools
- Install Android SDKs (I personally recommend to install all SKDs from 4.0),
- If the SDKs were not installed during the installation (or you want to change SDKs that are available) run the Android Studio and select “Configure” -> “SDK Manager”.
Editor (personally prefer Visual Studio Code)
Even if we already installed Android Studio (that was a necessary step) I personally prefer Visual Studio Code for both Business Central and Flutter & Dart development, so next, we will look how to set up Visual Studio Code.
- In the left menu choose “Extensions”
- In the search pane, type “Flutter” and select the packed “Flutter” from author “Dart Code”. Both Flutter & Dart will be installed.
- Reload the Visual Studio Code.
- Run “Command Palette…” from “View” menu (or using Ctrl + Shift + P) and type “Flutter: Run Flutter Doctore” to check the installation. The result should be without any errors. You might see a warning about Android Studio but it is not really important right now.
We have successfully installed and configured all necessities for Dart & Flutter development. In the next article, we will look at Android Emulator and Hello World example.