Free

To-Do App in Flutter

setState does not update the screen — it marks a subtree dirty, and the difference is the whole model.

  • Flutter
  • Dart

About this project

A to-do app in Flutter: add, complete, edit, delete, filter and reorder tasks, saved to disk so they survive a restart. It runs on Android, on Windows and in a browser from the same source.

The idea it is built around is what setState actually does. It does not update the interface — it marks the element dirty so the framework rebuilds that subtree on the next frame. That distinction is the whole Flutter mental model, and it explains why rebuilding is cheap when your build method is pure and expensive when it is not. The project counts its own builds, so you can watch a const constructor stop one rather than take it on trust.

The second theme is lifting state up. It starts with state living inside a task tile, shows that the filter and the counter cannot see it, then lifts it into one store the whole tree reads from. That is the same conclusion the JavaScript to-do project in this catalogue reaches from the other direction, and the README says so — meeting an idea twice in two languages is how it stops being framework trivia and starts being a principle.

What you will learn

  • Know what setState actually does, and why a rebuild is cheap when build() is pure
  • Choose between StatelessWidget and StatefulWidget for a real reason
  • Lift state out of a tile into a store the whole tree can read
  • Use const constructors to stop rebuilds, and prove it by counting them
  • Write widget tests that assert real behaviour, including layout at 360px

Before you start

  • Some programming experience — Dart is picked up as you go
  • Flutter 3.19 or newer, and any one target: Android, Windows, or just Chrome

Academic integrity notice

These projects are provided for learning, experimentation and reference. Understand the code, modify it for your own requirements, and acknowledge external work according to your institution’s academic policies. Priodemy does not supply work to be submitted as your own.