- 01Setting up (what you'll need)
- 02Your first output (print)
- 03Variables and types (var and annotations)
- 04Null safety (? and !)
- 05Branching (the if statement)
- 06Repeating (the for loop)
- 07Writing your own function
- 08Repeating (the while loop)
- 09Working with lists (List)
- 10Working with maps (Map)
- 11Classes (object orientation)
- 12Constructors
- 13Inheritance
- 14Named arguments
- 15Asynchronous work (Future, async, await)
- 16Working with strings
- 17The switch statement
- 18The ternary operator
- 19Extension methods
- 20[Project] Build a small inventory system
[Project] Build a small inventory system
In this lesson you combine the classes, inheritance, lists, and maps covered so far into a simple inventory system. It is the capstone of this Dart introduction.
In real Flutter development the basic pattern is exactly this: represent something like a product with a class, manage many of them together in a list, and display them on screen.
The sample code represents a product (name and quantity) with class Item, manages the product listing with a list inside class Inventory, and prints a message according to each item's status.
Null safety, classes, and asynchronous work — everything covered in these lessons — are the foundations of real Flutter development too. Getting into the habit of writing small programs while paying attention to Dart's type system is the shortest path to using Dart and Flutter professionally.
๐งช This site can't compile or run Dart directly, so it checks on the spot whether what you typed matches the reference code (scoring happens entirely in your browser โ nothing is sent anywhere).
