An expense tracker app built using Dart and Flutter that allows users to add, delete, and view expenses. The app supports both light and dark modes, validates user inputs, and provides a snackbar action to undo deleted expenses within 3 seconds. The theme adapts according to the system settings. Additionally, the app includes a chart bar to display expenses category-wise using the expensebucket
utility function.
- Add Expense: Add expenses with a category, date, and amount.
- Delete Expense: Swipe in any direction to delete an expense.
- Undo Deletion: Snackbar action to undo deleted expenses within 3 seconds.
- Input Validation: Validates inputs and shows warnings for incorrect or empty fields.
- Unique IDs: Uses the
uuid
package to generate unique IDs for each expense. - Light and Dark Mode: Supports both light and dark themes based on the system theme.
- Category-wise Chart: Displays expenses in a chart based on categories.
- Clone the repository:
git clone https://github.com/saumyasinha31/budget-buddy.git
- Navigate to the project directory:
cd budget-buddy
- Install dependencies:
flutter pub get
- Run the app:
flutter run
- Click the add button in the top-right corner.
- Enter the category, date, and amount.
- Click the 'Add' button to save the expense.
- Swipe an expense item in any direction.
- A snackbar will appear with an undo option.
- Click 'Undo' within 3 seconds to restore the deleted expense.
- Expenses are listed on the home screen.
- A chart displays expenses categorized by type.
The app adapts to the system theme automatically. However, you can manually set the theme by modifying the ThemeData
in the main Dart file.
*main.dart file* :
themeMode: ThemeMode.system, // system theme
themeMode: ThemeMode.dark, // dark theme
themeMode: ThemeMode.light, // light theme
- Fork the repository.
- Create your feature branch:
git checkout -b feature/YourFeature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/YourFeature
- Open a pull request.