A programming language is a way to write instructions for a computer. Dart is the language we will later use to build Flutter interfaces. We start with text output so you need neither a phone nor knowledge of interfaces. For now, a program consists of one file. The .dart extension tells tools which language it contains.
01Install the tool
Install the Flutter SDK using the official instructions for your operating system. It includes Dart. Then open a terminal, a window for commands. dart --version must display a version number. If the command is unknown, add the SDK bin directory to PATH and reopen the terminal.
02Write a file
Create a new folder and a file called hello.dart inside it. Copy the example exactly. main is the entry point. Curly braces mark its contents. print outputs text. Text goes inside quotation marks. The semicolon ends the statement.
void main() {
print('Hello, AppFabrik!');
}
Run / check
dart run hello.dart03See the result
In the terminal, move into the folder and run dart run hello.dart. One line appears. Change the text and run the command again. Saving changes the file. Running it again shows the changed program.
Output: Hello, AppFabrik!
Your exercise
Add a second output containing your first name. Which line appears first?
Show the solution and explanation
Write another print call containing your name beneath the first one. Instructions in main run from top to bottom here. The greeting appears first, then your name.
Project context and sources
The example is simplified for learning. The linked source version shows its use in the project and the checks applied there.