feat: condivisione piano pasti via QR code
Porta la funzionalità QR code dalla versione Vue a Flutter.
Condividi: pulsante in fondo alla tab Pasti (attivo solo con piano
non vuoto) → bottom sheet con QR code generato da qr_flutter.
Payload: { "v": 1, "meals": { ... } }, limite 2953 byte.
Ricevi: pulsante sempre visibile → QrScanPage full-screen con
fotocamera via mobile_scanner, cornice di mira, validazione
struttura JSON e importazione via MealPlannerProvider.importPlan().
Nuovi package: qr_flutter ^4.1.0, mobile_scanner ^5.0.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,4 +59,10 @@ class MealPlannerProvider extends ChangeNotifier {
|
||||
notifyListeners();
|
||||
_save();
|
||||
}
|
||||
|
||||
void importPlan(MealPlan plan) {
|
||||
_plan = plan;
|
||||
notifyListeners();
|
||||
_save();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user