fix: didn't check for empty sell
This commit is contained in:
parent
50074890c0
commit
ce7338db2a
1 changed files with 11 additions and 0 deletions
|
|
@ -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(",", "."),
|
||||
) ==
|
||||
|
|
|
|||
Reference in a new issue