diff --git a/lib/ui/sell_page/widgets/sell_page.dart b/lib/ui/sell_page/widgets/sell_page.dart index e7832b1..b04ae81 100644 --- a/lib/ui/sell_page/widgets/sell_page.dart +++ b/lib/ui/sell_page/widgets/sell_page.dart @@ -140,6 +140,17 @@ class _SellPageState extends State { children: [ IconButton( onPressed: () { + if (widget.viewModel.scannedBooks.isEmpty) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text( + "La vente doit comporter au moins un livre", + ), + behavior: SnackBarBehavior.floating, + ), + ); + return; + } if (double.tryParse( price.text.replaceFirst(",", "."), ) ==