Chapter 02 — Variables, Constants, and Types
Part 1A — Learn Dart · Chapter 02 of 62 · 3 hrs
Chapter 02 — Variables, Constants, and Types
Level: beginner Estimated time: 3 hrs Prerequisites: Chapter 01 — Learn Dart from Scratch What you'll be able to do by the end: declare, type, modify, and display Dart variables (
String,int,double,bool,num), choose betweenvar,dynamic,final,const, andlate, use string interpolation, and convert between types.
02.0 — Chapter Objectives
By the end of this chapter, you will be able to:
- create a variable;
- store text;
- store whole numbers;
- store decimal numbers;
- use Boolean values;
- understand the difference between
varand an explicit type; - understand
dynamic; - use
final; - use
const; - understand
late; - change the value of a variable;
- use string interpolation;
- perform simple conversions between types;
- correctly follow Dart naming conventions.
02.1 — What Is a Variable?
A variable is a location used to store a piece of information.
Picture a box:
+-------------------+
| nom |
|-------------------|
| "Alex" |
+-------------------+
Comments
Comments are powered by GitHub Discussions
Sign in with GitHub to join the discussion