From d16d1e2778bd1046d75d6ba5b5437b54c55c8ba5 Mon Sep 17 00:00:00 2001 From: alzalia1 Date: Thu, 14 Aug 2025 01:08:55 +0200 Subject: [PATCH] fix: small ui change --- .../sell_page/view_model/sell_view_model.dart | 2 +- lib/ui/sell_page/widgets/sell_page.dart | 35 ++++++++++++------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/lib/ui/sell_page/view_model/sell_view_model.dart b/lib/ui/sell_page/view_model/sell_view_model.dart index 0532b8b..b130a32 100644 --- a/lib/ui/sell_page/view_model/sell_view_model.dart +++ b/lib/ui/sell_page/view_model/sell_view_model.dart @@ -28,7 +28,7 @@ class SellViewModel extends ChangeNotifier { */ final List _scannedBooks = []; - get scannedBooks => _scannedBooks; + List get scannedBooks => _scannedBooks; void scanBook(BarcodeCapture barcode) { final addedBook = BookInstance( balId: 5, diff --git a/lib/ui/sell_page/widgets/sell_page.dart b/lib/ui/sell_page/widgets/sell_page.dart index 1c463f6..b27a8ee 100644 --- a/lib/ui/sell_page/widgets/sell_page.dart +++ b/lib/ui/sell_page/widgets/sell_page.dart @@ -62,10 +62,19 @@ class _SellPageState extends State { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: [ - SizedBox(height: 6), + Center( + child: Text( + "Livres dans la vente actuelle", + style: TextStyle(fontSize: 20), + ), + ), + SizedBox(height: 15), Expanded( child: ListView( children: [ + (widget.viewModel.scannedBooks.isEmpty) + ? Center(child: Text("Aucun")) + : SizedBox(), for (BookInstance bookInstance in widget.viewModel.scannedBooks) Padding( @@ -99,18 +108,20 @@ class _SellPageState extends State { ), ), SizedBox(height: 40), - Text("Somme minimum requise : 20€"), - SizedBox( - width: 400, - child: TextField( - decoration: InputDecoration( - labelText: "Argent reçu", - helperText: - "L'argent reçu sera réparti automatiquement", - suffixText: "€", - border: OutlineInputBorder(), + Text("Montant minimum à payer : 20€"), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 60.0), + child: SizedBox( + child: TextField( + decoration: InputDecoration( + labelText: "Argent reçu", + helperText: + "L'argent reçu sera réparti automatiquement", + suffixText: "€", + border: OutlineInputBorder(), + ), + keyboardType: TextInputType.number, ), - keyboardType: TextInputType.number, ), ), SizedBox(height: 10),