MODULES / 01 · DART & FLUTTER

Dart foundations and object-oriented programming

Prerequisites

Programming logic, functions and control flow.

Learning objectives

Work with types, null safety, collections, functions and classes. Model rules independently of the user interface.

Suggested activity

Build a small terminal inventory in your own study repository. Separate data from commands and handle invalid input.

Use Masmorra ASCII as a parallel learning path: study foundations and object-oriented programming before the advanced stages. The game uses a terminal rather than Flutter widgets. Use the current version of the chosen repository, synthetic data and its documented validation steps. Record the environment and distinguish real execution, emulation and a local demonstration. These activities are proposals for your own study repository.

Suggested reading

Masmorra ASCII: start with the foundations and object-oriented programming in the terminal.

Books & sites

Case studies and references

Labs for this module

These activities connect each laboratory to the lesson. Integration suggestions are adaptations for your own project.

Explore in the browser

Steering Engine

Observe an agent in the lab and identify position, velocity and target as domain values. Relate them to numbers and typed objects in Dart.

What to check: Describe the values in a scenario and explain the difference between the current position and the target without depending on widgets.

Explore in the browser

Decision Engine

Create a small scenario with alternatives and criteria. Separate names, numeric values and weights before discussing the ranking method.

What to check: Identify which data would be strings, numbers and collections in a Dart representation of the scenario.

Explore the laboratories

05 / EXERCISES

Exercises

  1. 01

    Types and validation

    Objective: Accept an item name and quantity.

    Completion criteria: Reject an empty name and a negative quantity without terminating the program.

  2. 02

    Collections

    Objective: Add items and look them up by name.

    Completion criteria: Demonstrate an empty collection, a successful search and a search with no result.

  3. 03

    Classes

    Objective: Represent an item as a typed value.

    Completion criteria: Make invalid construction impossible or reject it explicitly.

  4. 04

    Null safety

    Objective: Model a lookup that might not find an item.

    Completion criteria: Handle absence without using a non-null assertion to ignore it.

  5. 05

    Tests

    Objective: Verify the inventory rules.

    Completion criteria: Provide independent tests for adding items, looking them up and rejecting invalid data.