refactor: consolidate codebase into clean architecture
- Remove duplicate features structure from basura_app - Migrate recycling_guide feature to lib/ - Update main.dart to use new architecture - Clean up old views structure - Remove temporary directories (basura_app, basura_backend, wiki_hackathon)
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
// lib/features/recycling_guide/domain/entities/recycling_category.dart
|
||||
// Capa de dominio — cero dependencias de Flutter o paquetes externos.
|
||||
|
||||
class RecyclingItem {
|
||||
final String nombre;
|
||||
final String ejemplos;
|
||||
final bool acepta; // true = sí va aquí, false = NO va aquí
|
||||
|
||||
const RecyclingItem({
|
||||
required this.nombre,
|
||||
required this.ejemplos,
|
||||
required this.acepta,
|
||||
});
|
||||
}
|
||||
|
||||
class RecyclingCategory {
|
||||
final String id;
|
||||
final String nombre;
|
||||
final String descripcion;
|
||||
final String colorHex;
|
||||
final String icono;
|
||||
final String consejo;
|
||||
final List<RecyclingItem> items;
|
||||
|
||||
const RecyclingCategory({
|
||||
required this.id,
|
||||
required this.nombre,
|
||||
required this.descripcion,
|
||||
required this.colorHex,
|
||||
required this.icono,
|
||||
required this.consejo,
|
||||
required this.items,
|
||||
});
|
||||
|
||||
/// Items que SÍ van en esta categoría
|
||||
List<RecyclingItem> get itemsAceptados =>
|
||||
items.where((i) => i.acepta).toList();
|
||||
|
||||
/// Items que NO van en esta categoría
|
||||
List<RecyclingItem> get itemsRechazados =>
|
||||
items.where((i) => !i.acepta).toList();
|
||||
}
|
||||
Reference in New Issue
Block a user