What is Dart?
- Dart course
- Beginner
- Lesson 1/116
- 4 min
Learn that Dart is a language developed by Google.
What is Dart?
Dart is a modern programming language developed by Google. It is designed for client-side applications: web, server and especially mobile apps with Flutter.
Dart 3 ships null safety, records and pattern matching as standard. This lets you write safer and more readable code.
Dart is strongly typed but also infers types. So writing code is fast, and the compiler catches errors early.
Dart 3 features
Dart 3 is the modern version of the language and uses null safety by default. A variable cannot be null; you must say so explicitly.
The new records feature lets you return multiple values as a single bundle. Pattern matching makes destructuring and matching data easy.
This course uses Dart 3 syntax. Old code may handle null differently; we learn the modern usage.
Practice Write your first output
Use print to print Hello Dart to the screen.
Starter code
// Write your message hereSample solution
print("Hello Dart");Expected output
Hello Dart
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 Who develops Dart?
- Mozilla
- Microsoft
- Apple
- Google Correct answer
Explanation: Dart is developed by Google.
2 Entry point
void ____() { print('Hello'); }
void main() { print('Hello'); }
Explanation: Every Dart program starts from the main function.
3 Match the concepts
| Term | Meaning |
|---|---|
main |
Program entry point |
print |
Writes output to screen |
Dart |
Google's language |
dart run |
Runs the program |