Budget Tracker

Loading preview

Starting the Flutter app

A showcase of Flutter's budget tracking functionality

Get the source

Add it to your project

Copies the Dart source into your app, so you own it. Flutter SDK only, no extra packages.

First time? Run dart pub global activate fluttertemplates_dev, or read the CLI guide.

How it works

For each entry in _categories, pct is spent / limit; past 1 the text and bar turn red and the bar value is capped, as the over-limit Shopping row shows, and a Wrap stacks the row’s labels when text is large. The header uses the same data: totalSpent and totalLimit are summed in build, formatted by _usd, and drive the top progress bar, giving $1,025 of $1,250.

Adapting it

  • The pct > 1 check only fires after overspending; add an amber state at around 0.8 if users need early warning.
  • Load _categories from your API, and use cents if int whole dollars are too coarse.