fix: didn't check for empty sell

This commit is contained in:
alzalia1 2025-08-20 14:12:45 +02:00
parent 50074890c0
commit ce7338db2a

View file

@ -140,6 +140,17 @@ class _SellPageState extends State<SellPage> {
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(",", "."),
) ==