On this page11 sections
  1. Prerequisites
  2. Learning Objectives
  3. 1. What Dart Is
  4. 2. Why Use Dart
  5. 3. Where Dart Runs
  6. 4. Dart and Flutter
  7. Code Examples
  8. Common Beginner Mistakes
  9. Practice Questions
  10. Practice Answers
  11. Key Takeaways

Lecture 002 — What Is Dart?

Category2 — Getting Started
Lecture002 of 057
Estimated video length10 min
TargetDart 3.12
LevelBeginner

Before writing any code, we answer two questions: what kind of language Dart is, and why so many app developers pick it.

Contents

Prerequisites · Objectives · Lesson · Code Examples · Common Mistakes · Practice Questions · Answers · Takeaways


Prerequisites

Lecture 001.


Learning Objectives

  • Say in one sentence what Dart is
  • Name the main reasons developers choose Dart
  • Know where Dart code can run
  • Understand how Dart and Flutter are related

1. What Dart Is

Dart is a general-purpose programming language made by Google. You write instructions in plain text files ending in .dart, and the Dart tools turn them into a program that runs.

It is:

  • Typed — every value has a type (int, String, …), and many mistakes are caught before the program even runs.
  • Null safe — a variable can only be empty (null) if you say so, which removes a whole family of crashes.
  • Object-oriented — everything you work with is an object, built from a class.

2. Why Use Dart

ReasonWhat it means for you
FastWhile developing, changes show up in a second. For release, Dart compiles to fast native machine code.
Easy to readThe syntax looks like other popular languages (Java, C#, JavaScript), so it is quick to pick up.
FlutterFlutter, the toolkit for building apps for phones, web and desktop, uses Dart.
One codebaseThe same Dart code can run on Android, iOS, the web, Windows, macOS, Linux and servers.

3. Where Dart Runs

TargetHow
Your terminaldart run — command-line programs (this course)
Phones & desktopscompiled to native code, usually through Flutter
Browserscompiled to JavaScript or WebAssembly
Serversa compiled program or dart run on the server

4. Dart and Flutter

Flutter is not a language — it is a set of ready-made building blocks (buttons, lists, screens) written in Dart. Learning Dart first means that when you open Flutter, the only new thing is Flutter.


Code Examples

Example 1 — A Taste of Dart

You don't need to understand every line yet — just read it.

dart
void main() {
  String name = 'Ayesha';
  int lecturesDone = 2;

  print('Hello, $name!');
  print('You have finished $lecturesDone lectures.');
}

Output

code
Hello, Ayesha!
You have finished 2 lectures.

Even without training you can guess what this does — that readability is one of Dart's strengths. Lecture 004 explains every part of it.


Common Beginner Mistakes

1. Thinking Dart and Flutter are the same thing. Dart is the language; Flutter is a toolkit written in it.

2. Skipping the language and jumping to apps. Most Flutter problems beginners face are really Dart problems — types, null safety, functions. Learn those first.


Practice Questions

  1. Who created Dart?
  2. What does "null safe" mean, in your own words?
  3. Name three places Dart code can run.
  4. Is Flutter a programming language?

Practice Answers

  1. Google.
  2. A variable can't hold "nothing" (null) unless you declare that it may.
  3. Any three of: terminal, Android, iOS, web browsers, desktop, servers.
  4. No — Flutter is a toolkit written in Dart.

Key Takeaways

  • Dart is a typed, null-safe, object-oriented language from Google.
  • It is fast while developing and fast when released.
  • One Dart codebase can run almost everywhere; Flutter uses it for apps.
  • This course writes terminal programs to learn the language itself.