A mobile application for users to track and manage personal expenses.
• Add Expense : Users can input the amount, date, and a brief description.
• View Expenses: Display expenses in a list, sorted and filterable by date.
• Edit/Delete Expense : Modify or remove expense entries.
• Expense Summary : Show summaries categorized by type, on a weekly or monthly basis.
• Reminder Notifications: Set up reminders for users to record their daily expenses.
• Riverpod: used for state management
• Isar: used for local database.
• Mocktail: for unit testing, mock generation
• Flutter Flavor: for getting the flavor object.
This code uses clean architecture with domain, data and ui layer implementations to create the app. The key feature of app is to add/update/delete the expense and filter the expense monthly and weekly. The app displays a list of Expenses from the local database.
lib->
main.dart
splash_screen.dart
src->
core->
common->
api_result.dart
api_result.freezed.dart
usecase_result.dart
usecase_result.freezed.dart
constant->
theme->
light_theme.dart
font.dart
datasource->
local->
local_db.dart
dependency->
dependency_injection.dart
util->
alarm_schedule.dart
app_router.dart
flutter_toast.dart
widget->
text_widget.dart
textfield_widget.dart
feature->
expense->
data->
expense_repository.dart
domain->
interface->
i_expense_repository.dart
model->
expense.dart
expense.g.dart
usecase->
expense_usecase.dart
summary_usecase.dart
ui->
add_expense->
add_expense_screen.dart
add_expense_vm.dart
expense_list->
expense_list_screen.dart
expense_list_vm.dart
view_summary->
view_summary_screen.dart
view_summary_vm.dart
• main.dart file at the top, entry point for application.
• splash.dart file, which initializes the app.
• Displays the UI for add expense, expense list and view summary of expenses.
• UI folder also includes view models for all the above screens. View Model is responsible to displaying the data in the screen and state.
• Domain layer contains interface, model, and usecase defines business logic. It contains methods for getting expense data from the repository. Filtering expense, adding/updating and deleting the expense.
Data layer contain expense repository, it is responsible for fetching data from the Isar local database and convert to list of expenses.
Using mocktail library for testing.
Tests are located similarly to actual code, test/features folder contains all tests