chore: bump versione a 2.1.0 e aggiorna CLAUDE.md
versionCode 10300 → 10400. CLAUDE.md aggiornato con i nuovi servizi shared (UpdateService, UrlLauncherService, update_dialog), il MethodChannel in MainActivity.kt e il pattern di mock per widget test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,13 +43,17 @@ bash docker/build/build.sh --release # release → dist/biteplan-re
|
|||||||
```
|
```
|
||||||
lib/
|
lib/
|
||||||
├── main.dart
|
├── main.dart
|
||||||
├── app.dart # MaterialApp, NavigationBar, AppBar con bottone info
|
├── app.dart # MaterialApp, NavigationBar; initState chiama UpdateService.checkUpdate() e mostra showUpdateDialog() se c'è aggiornamento
|
||||||
├── core/
|
├── core/
|
||||||
│ ├── constants/app_constants.dart # kDayIds, kMealSlots, kStorageKey*, kAppVersion
|
│ ├── constants/app_constants.dart # kDayIds, kMealSlots, kStorageKey*, kAppVersion
|
||||||
│ └── theme/app_theme.dart
|
│ └── theme/app_theme.dart
|
||||||
├── shared/
|
├── shared/
|
||||||
│ ├── services/storage_service.dart # wrapper SharedPreferences (load/save)
|
│ ├── services/
|
||||||
|
│ │ ├── storage_service.dart # wrapper SharedPreferences (load/save)
|
||||||
|
│ │ ├── update_service.dart # checkUpdate() → GitHub API, isNewer(), parseTagName() (@visibleForTesting)
|
||||||
|
│ │ └── url_launcher_service.dart # MethodChannel 'com.davide.biteplan/launcher' → Intent.ACTION_VIEW
|
||||||
│ └── widgets/
|
│ └── widgets/
|
||||||
|
│ └── update_dialog.dart # showUpdateDialog() — AlertDialog con "Più tardi" / "Scarica"
|
||||||
├── features/
|
├── features/
|
||||||
│ ├── meal_planner/
|
│ ├── meal_planner/
|
||||||
│ │ ├── models/meal_plan.dart # MealPlan, DayPlan
|
│ │ ├── models/meal_plan.dart # MealPlan, DayPlan
|
||||||
@@ -80,7 +84,9 @@ lib/
|
|||||||
**Persistenza**: `shared_preferences`, chiavi `meals` e `shopping_list` (JSON serializzato).
|
**Persistenza**: `shared_preferences`, chiavi `meals` e `shopping_list` (JSON serializzato).
|
||||||
**Conversione**: logica in `ConversionEntry` — `rawToCooked = raw * yieldFactor`, `cookedToRaw = cooked / yieldFactor`.
|
**Conversione**: logica in `ConversionEntry` — `rawToCooked = raw * yieldFactor`, `cookedToRaw = cooked / yieldFactor`.
|
||||||
**UI**: Material 3, seed color `Color(0xFF2d6a4f)`, tutto in italiano.
|
**UI**: Material 3, seed color `Color(0xFF2d6a4f)`, tutto in italiano.
|
||||||
**QR**: payload JSON `{ "v": 1, "meals": { ... } }`, limite 2953 byte (capacità QR con error correction L).
|
**QR**: payload JSON `{ "v": 1, "meals": { ... } }`, limite 2953 byte (capacità QR con error correction L).
|
||||||
|
**Update checker**: `UpdateService.checkUpdate()` usa `dart:io` `HttpClient` (nessun package aggiuntivo); disabilitato su web (`kIsWeb`). Il `MethodChannel` `com.davide.biteplan/launcher` è implementato in `android/app/src/main/kotlin/com/davide/biteplan/MainActivity.kt`.
|
||||||
|
**Widget test con MethodChannel**: usare `TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler` per mockare il canale nei test — vedi `test/shared/widgets/update_dialog_test.dart`.
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const String kAppVersion = '2.0.0';
|
const String kAppVersion = '2.1.0';
|
||||||
const String kAppAuthor = 'Davide Grilli';
|
const String kAppAuthor = 'Davide Grilli';
|
||||||
const String kAppLicense = 'EUPL v1.2';
|
const String kAppLicense = 'EUPL v1.2';
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
name: biteplan
|
name: biteplan
|
||||||
description: App per meal planning, conversione crudo/cotto e lista della spesa.
|
description: App per meal planning, conversione crudo/cotto e lista della spesa.
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 2.0.0+10300
|
version: 2.1.0+10400
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.3.0 <4.0.0'
|
sdk: '>=3.3.0 <4.0.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user