Introduction
Every app on your phone was written in some programming language. For Android and iOS apps, one of the smartest choices today is Dart — the language — together with Flutter — Google's toolkit that turns Dart code into real apps. In this lesson you learn what each one is, how they work together, and you run your first lines of Dart before the lesson ends. (Roman Urdu: Dart zuban hai, Flutter us zuban ka auzaar — dono mil kar mobile app banate hain.)
Key points
- Dart is a programming language made by Google (first released in 2011). It is the language you write — variables, logic, decisions, everything.(Roman Urdu: Dart woh zuban hai jis mein aap code likhte hain.)
- Flutter is Google's UI toolkit — a ready box of screens, buttons and layouts. Flutter apps are written in Dart. Learn the language first (this Dart series), then the toolkit (the Flutter series after it).
- One codebase, two phones: you write the Dart code once, and Flutter builds a real Android app and a real iOS app from it. Companies do not write the app twice any more.
- Dart is friendly for beginners: its sentences look close to English, it checks your types (int, String…) so silly mistakes are caught early, and it runs both on a computer and inside apps.
- Your first tool is
print()— it shows text on the console (the result screen). Almost every Dart lesson in this series is practised withprint()first. - Real apps made with Flutter include Google Pay and many banking, shopping and delivery apps used by millions of people — this is an industry skill, not a toy.
Code examples
Example 1 — Your very first Dart lines
void main() {
print('Assalam o Alaikum!');
print('Main Dart seekh raha hoon.');
}What it does: main() is the starting point of every Dart program — Dart always begins there. Each print() shows one line on the console, top to bottom, in the order you wrote them.
What you will see: two lines on the console — Assalam o Alaikum! and then Main Dart seekh raha hoon. If these two lines appear, your Dart is running. Congratulations, you are a Dart programmer now.
Example 2 — Dart doing real work (marks total)
void main() {
int maths = 85;
int english = 78;
int total = maths + english;
print('Total marks: $total');
}What it does: Dart stores two numbers in labelled boxes (maths, english), adds them into a third box (total), and prints the answer. The $ inside the text means "put the value of this box here" — this is called string interpolation, and Lesson D.3 explains it fully.
What you will see: one line — Total marks: 163. Change 85 to any number, run again, and the total changes. This small thing — data in, answer out — is the heart of every app.
Example 3 — A first peek at Flutter (Dart wearing a uniform)
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('My First App')),
body: Center(child: Text('Assalam o Alaikum!')),
),
),
);
}What it does: This is still Dart — the same language — but now it describes a phone screen instead of console lines: an app with a title bar ("My First App") and one line of text in the centre. You do not need to understand every word today; the Flutter series (F.1 onwards) opens this code piece by piece.
What you will see: a real phone screen (in an emulator or on your own phone): a top bar with the title, and "Assalam o Alaikum!" in the middle. The jump from console to phone is exactly what this series walks you through, step by step.
Quick recap
- Dart = the language (by Google). Flutter = Google's UI toolkit. Flutter apps are written in Dart.
- One Dart codebase → a real Android app + a real iOS app. No double work.
- Every Dart program starts at
main();print()shows results on the console. $nameinside a string puts a value into the text (interpolation).- Series path: Dart first (D.1–D.11), then Flutter (F.1–F.5).
Common mistakes
- Thinking Dart and Flutter are the same thing — Dart is the language, Flutter is the toolkit that uses it. You cannot "write Flutter" without Dart, just like you cannot drive the car without the engine.
- Skipping Dart and jumping straight to Flutter — every Flutter screen is Dart code (classes, lists, null safety). A weak Dart base makes Flutter feel like magic instead of logic. This series order exists for a reason.
- Expecting the console program to look like an app —
print()output is plain text on purpose. It is the practice ground where the language is learned, before screens enter in the Flutter lessons.
Practice
- Open DartPad (dartpad.dev) in your browser, delete its sample code, and run Example 1. Then change the second line to your own name and city, and run again.
- In Example 2, add a third subject (urdu = 90) into the total and print all three subject names with their marks, one per line.