Summary
Full Transcript
Flutter Mobile App Development – Lecture 05: Practical Session: Expense Tracker App Development (Part 1) 🎓 Course: Flutter Mobile App Development 👨🏫 Instructor: Dr. Abbas Malik 🏛 University: Prince Sultan University – College of Computer & Information Sciences 💡 Perfect for beginners in Flutter or anyone looking to strengthen their UI/UX layout skills in mobile development! 🔹 Course GitHub Repository: 📂 All course materials, code examples, and projects: https://github.com/mgmalik/flutterappdev In this hands-on coding session, we begin building a complete Expense Tracking Application from scratch! Follow along as we set up the foundation for a real-world finance management app with proper architecture, state management, and local data persistence. 🔹 What We Build in Part 1: • Project Setup & Dependencies: o Adding essential packages: flutter_riverpod, shared_preferences, intl, uuid o Configuring pubspec.yaml for production-ready development • Data Model Classes: o Expense Model: Tracking amount, description, date, category, and tags o Category Model: Organizing expenses into logical groups (Food, Transport, Entertainment, etc.) o Tag Model: Adding customizable labels for detailed expense classification • Local Storage Service: o Implementing SharedPreferencesService for persistent data storage o Saving and retrieving List of Expense, List of Category, and List of Tag o JSON serialization/deserialization for complex objects • State Management with Riverpod: o Creating AsyncNotifier classes for reactive state: ExpenseNotifier – Manages all expense records CategoryNotifier – Handles expense categories TagNotifier – Controls expense tags o Implementing CRUD operations (Create, Read, Update, Delete) o Building provider architecture for scalable state management 🔹 Key Features Implemented: • Data Persistence: Expenses survive app restarts • Reactive UI: Real-time updates when data changes • Clean Architecture: Separation of concerns between models, services, and state • Type Safety: Full Dart type system utilization 🔹 Code Structure Created: text lib/ ├── models/ │ ├── expense.dart │ ├── category.dart │ └── tag.dart ├── services/ │ └──local_storage_service.dart ├── providers/ │ ├── expense_notifier.dart │ ├── category_notifier.dart │ └── tag_notifier.dart └── main.dart 🔹 Technical Stack: • State Management: flutter_riverpod with AsyncNotifier • Local Storage: shared_preferences for key-value persistence • Date Handling: intl package for date formatting • Architecture: Clean separation with models, services, providers 🔹 Coming in Part 2: • Building the complete UI • Implementing category and tag management screens • Adding expense filtering and sorting 💡 Perfect for developers learning professional Flutter app architecture, Riverpod state management, and building data-intensive applications with local persistence! ________________________________________ #Flutter #Riverpod #ExpenseTracker #StateManagement #LocalStorage #SharedPreferences #FlutterTutorial #AppDevelopment #MobileDevelopment #Dart #Programming #PSU #IS487 #CodingTutorial #FinanceApp
