From 2437573f7c9c3e1aacb023da1f93907821d21477 Mon Sep 17 00:00:00 2001 From: Stephane Date: Sun, 3 Aug 2025 13:46:13 +0300 Subject: [PATCH] button add --- lib/pages/commandes_screen.dart | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/pages/commandes_screen.dart b/lib/pages/commandes_screen.dart index 0b8d2bb..5e760b2 100644 --- a/lib/pages/commandes_screen.dart +++ b/lib/pages/commandes_screen.dart @@ -717,6 +717,36 @@ class OrderCard extends StatelessWidget { order.statut == 'en_preparation') Row( children: [ + if (order.statut == 'en_attente') + Expanded( + child: ElevatedButton( + onPressed: + () => { + Navigator.push( + context, + MaterialPageRoute( + builder: + (context) => AddItemsToOrderPage( + commandId: order.id, + numeroCommande: order.numeroCommande, + ), + ), + ), + }, + style: ElevatedButton.styleFrom( + backgroundColor: Colors.orange, + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: const Text( + 'Préparer', + style: TextStyle(color: Colors.white, fontSize: 12), + ), + ), + ), + const SizedBox(width: 8), Expanded( flex: 3, child: ElevatedButton.icon(