Topic 1
Variables
void main() {
String country = 'USA';
int age = 21;
double height = 5.9;
var name = 'John';
print(country);
print(age);
print(height);
print(name);
}This roadmap guides you through the core Dart ideas in a tree-like order, so you can grow from simple syntax into real app-building confidence.
Base roadmap
Start here
Build from syntax and values to reusable code and safe app logic.
Learn the language pieces that every Flutter app uses.
Teach your code when to take one path or another.
Start organizing logic so your apps stay readable.
Prepare for real projects with safer code and classes.
Topic 1
void main() {
String country = 'USA';
int age = 21;
double height = 5.9;
var name = 'John';
print(country);
print(age);
print(height);
print(name);
}Topic 2
void main() {
int age = 21;
double temp = 36.6;
String message = 'Hello';
bool isStudent = true;
List<String> fruits = ['Apple', 'Banana'];
Map<String, dynamic> person = {
'name': 'John',
'age': 21,
};
print(fruits);
print(person);
}Topic 3
void main() {
int marks = 75;
if (marks >= 80) {
print('Excellent');
} else if (marks >= 60) {
print('Good');
} else {
print('Try Again');
}
}Topic 4
void main() {
for (int i = 1; i <= 5; i++) {
print(i);
}
int j = 0;
while (j < 3) {
print(j);
j++;
}
}Topic 5
int add(int a, int b) {
return a + b;
}
void main() {
int result = add(5, 3);
print(result);
}Topic 6
void main() {
List<String> fruits = ['Apple', 'Banana', 'Mango'];
Map<String, dynamic> student = {
'name': 'John',
'age': 21,
};
print(fruits[0]);
print(student['name']);
}Topic 7
void main() {
String? name;
name = 'John';
print(name);
print(name!);
}Topic 8
class Person {
String name;
int age;
Person(this.name, this.age);
void introduce() {
print('Hi, I am $name');
}
}
void main() {
Person p = Person('John', 21);
p.introduce();
}Next Step
You've mastered Dart! Now it's time to learn Flutter foundations and start building real applications.