fix: reformat code / code improvements
This commit is contained in:
@@ -125,7 +125,14 @@ class _BarScreenViewState extends State<BarScreenView> {
|
||||
return;
|
||||
}
|
||||
|
||||
await viewModel.addProductToSelectedTab(product);
|
||||
try {
|
||||
await viewModel.addProductToSelectedTab(product);
|
||||
} catch (e) {
|
||||
if (!context.mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text('$e')),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user