How rama-anwar/task5 works
Project Type and Purpose
• Cross-platform Flutter mobile (and desktop/web) application.
• Presents a “Store” of courses and a “Favorites” page, using in-app sample data (no backend service).
• Key functionalities: display categories, list courses, add/remove favorites, search/filter courses.
High-Level Architectural Layers
a. Platform Layer
– Android, iOS, Web, Windows, macOS, Linux native shells
– Hosts the Flutter Engine
b. Flutter Engine
– Skia renderer, platform channels, text/layout, Dart VM
c. Flutter Framework (Dart)
– Widgets, Rendering, Foundation, Services
d. Application Code
– Data Layer – lib/data/*.dart (sampleStoreData, sampleFavData)
– Domain Models – lib/models/*.dart (CourseModel, CategoriesModel)
– Business Logic – lib/helperFunctions.dart (add/remove favorite, filters)
– Presentation Layer
• Screens – lib/screens/{storePage.dart, favoritesPage.dart}
• Widgets – lib/widgets/*.dart (CourseCard, SearchBar, etc.)
e. Configuration & Build
– pubspec.yaml (dependencies, assets)
– android/, ios/, web/, linux/, macos/, windows/ (platform build files)
Main Components & Their Relationships
↳ Embed → Flutter Engine
2. Flutter Engine
↳ Hosts → Dart VM & Skia Renderer
↳ Communicates via → Platform Channels (if Native plugins were used)
3. Flutter Framework
↳ Provides → Widgets Library, Rendering Tree, Gestures, etc.
4. Application Code
– main.dart → boots the app, initializes routes to StorePage & FavoritesPage
– StorePage / FavoritesPage → orchestrate UI composition
– Widgets → reusable UI components
– HelperFunctions → pure Dart functions for business rules
– Data Layer → in-memory lists of courses & favorites
– Models → typed data structures used by both functions & UI
5. Assets
↳ Rendered by → Widgets (e.g., CourseImage uses assets/courses)
Architectural Patterns & Design Principles
• Layered architecture: Presentation → Business Logic → Data → Models
• Separation of concerns:
– UI code stays within Screens/Widgets
– Business logic is isolated in helperFunctions
– Data is decoupled as sample data files
• Stateless components: most widgets are StatelessWidget, derive data via parameters
• No external network calls or databases in this iteration
Final Checklist
– Each layer clearly separated and labeled