Install the following before you get started with this recipe:
- DartPad:
- In your browser, navigate to https://dartpad.dartlang.org.
- Visual Studio Code:
- Double-check that the DartCode plugin has been installed. If you followed the steps in the previous chapter, you should be good to go.
- Press Command + N to create a new file and save it as main.dart.
- IntelliJ:
- Double-check that you have the Dart plugin installed.
- Select Create new project. The following dialog will appear, asking what language and configuration you want to use:
-
- Pick Dart as your language and then select Console Application. This effectively runs the same commands as the command-line instructions but wraps everything in a nice GUI.
When working with the code samples in this book, it is strongly discouraged that you copy and paste them into your IDE. Instead, you should transcribe the samples manually. The act of writing code, not copying/pasting, will allow your brain to absorb the code and see how tools such as code completion and DartFmt make it easier for you to type code. If you copy and paste, you'll get a working program, but you will also learn nothing.