Expense Tracker
A cross-platform expense tracking app built with Flutter and Material 3 — to finally understand where my money goes.
Expense Tracker
An expense tracker that works on Android, iOS, Web, and Desktop. Because tracking your spending shouldn’t require picking a platform.
The app lets you log expenses, categorize them, and see where your money actually goes. Interactive charts show spending patterns over time, and a Material 3 UI keeps it looking modern regardless of the platform.
What it does
Track expenses across five categories — Food, Travel, Leisure, Work, Utilities. Each entry gets a date, amount, category, and note. Edit or delete entries later. Everything persists locally on the device.
The analytics section renders charts showing spending by category and trends over time. Tap a category in the chart to filter the list.
Architecture
The app follows the MVVM pattern with Provider for state management. Three layers:
- Models (
data/models/) — theExpensedata class with category enum - ViewModels (
viewmodels/) —ExpenseViewModelthat owns all state and exposes streams to the UI - Views (
views/) — screens and widgets that listen to the ViewModel
lib/
├── main.dart # App entry point with Provider
├── theme.dart # Light/dark theme
├── data/
│ └── models/
│ └── expense.dart # Expense model + Category enum
├── viewmodels/
│ └── expense_viewmodel.dart # ChangeNotifier with CRUD operations
└── views/
├── screens/
│ └── expenses_screen.dart # Main list + summary
└── widgets/
├── chart/ # Spending analytics
├── expenses_list/ # List and individual items
└── new_expense.dart # Add/edit form
The ViewModel uses ChangeNotifier so the UI automatically updates when expense data changes. No manual state propagation, no setState in every widget. Provider wraps the app with a single ChangeNotifierProvider.
Platform support
Built once, runs everywhere Flutter supports:
- Android
- iOS
- Web (Chrome, Firefox, Safari)
- Windows, macOS, Linux
Flutter compiles to native code on mobile/desktop and WebAssembly for the web, so performance is comparable to platform-native apps.
State management
Provider with ChangeNotifier keeps the state logic separate from the UI. When you add, edit, or delete an expense, the ViewModel updates and all listening widgets rebuild automatically. Data persists locally using UUID-based identifiers so entries don’t collide across syncs.
Run it yourself
git clone https://github.com/spectari-code/expense-tracker.git
cd expense-tracker
flutter pub get
flutter run