Source Code Management Guide
Follow these instructions for refactoring and maintaining the FoodSavr project.
- •
Refactor Complex Widgets and Services:
- •Break down large build methods into smaller, private widget classes.
- •Consolidate business logic into clear abstractions within services.
- •Extract common UI components into reusable widgets in
lib/widgets/common/.
- •
Manage Dependencies and Decoupling:
- •Always use the
getItservice locator to inject dependencies. - •Depend on repository interfaces, not concrete implementations.
- •Ensure a clean separation between UI, services, and data layers.
- •Always use the
- •
Organize According to Layers:
- •Maintain the standard directory structure (views, widgets, services, repositories, models, interfaces).
- •Use feature-based subdirectories for larger functional modules.
- •
Apply Engineering Principles:
- •Follow SOLID principles for maintainability and scalability.
- •Use DRY (Don't Repeat Yourself) to minimize code duplication.
- •Maintain idiomatic code quality as defined in the project's coding standards.