🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101

Habit tracker in Flutter

Track daily habits with streaks and a calendar heat map, on Android and iOS from one codebase.

Beginner⏱ 10–14 hoursđŸĒœ 7 stepsFlutterDartLocal storage

What you'll learn

  • ◆Flutter widgets and layout
  • ◆State management with Provider or Riverpod
  • ◆Saving data locally

What you'll build

  • ✓Add habits with an icon and colour
  • ✓Tick today's habits
  • ✓Current and best streak
  • ✓Monthly heat map

Step-by-step guide

  1. 1

    Create

    flutter create habits; run on an emulator or your phone.

  2. 2

    Model

    class Habit { String id; String name; int color; Set<String> doneDays; } where days are "2026-11-28" strings.

  3. 3

    State

    A ChangeNotifier HabitStore with add, toggleToday, delete; provide it with Provider at the root.

  4. 4

    Storage

    Save the list as JSON with shared_preferences (or use a local database like Hive/Isar for more data).

  5. 5

    Streaks

    Count back from today while the day is in doneDays; best streak = longest run in the sorted list.

  6. 6

    Heat map

    A GridView of the month's days, colour opacity by done/not done.

  7. 7

    Reminders

    Daily local notification with flutter_local_notifications.

🚀 Make it stand out

  • +Weekly goals (3 times a week)
  • +Charts
  • +Cloud sync with login