fix: continuing error managment and documentation
This commit is contained in:
parent
59e1c2558c
commit
dad000a1b9
24 changed files with 389 additions and 182 deletions
|
|
@ -28,7 +28,7 @@ class _SellPageState extends State<SellPage> {
|
|||
builder: (context, child) {
|
||||
return switch (widget.viewModel.isLoaded) {
|
||||
false => AwaitLoading(),
|
||||
true => switch (widget.viewModel.currentBal) {
|
||||
true => switch (widget.viewModel.ongoingBal) {
|
||||
null => Center(
|
||||
child: SizedBox(
|
||||
width: 300,
|
||||
|
|
@ -80,7 +80,7 @@ class _SellPageState extends State<SellPage> {
|
|||
? Center(child: Text("Aucun"))
|
||||
: SizedBox(),
|
||||
for (BookStack book
|
||||
in widget.viewModel.soldBooks)
|
||||
in widget.viewModel.booksInSell)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 15,
|
||||
|
|
@ -99,9 +99,10 @@ class _SellPageState extends State<SellPage> {
|
|||
),
|
||||
trailing: IconButton(
|
||||
onPressed: () {
|
||||
widget.viewModel.deleteBook(
|
||||
book.instance.id,
|
||||
);
|
||||
widget.viewModel
|
||||
.removeBookFromSell(
|
||||
book.instance.id,
|
||||
);
|
||||
},
|
||||
icon: Icon(Icons.delete),
|
||||
),
|
||||
|
|
@ -113,7 +114,7 @@ class _SellPageState extends State<SellPage> {
|
|||
),
|
||||
SizedBox(height: 40),
|
||||
Text(
|
||||
"Montant minimum à payer : ${widget.viewModel.minimumAmount.toString()}€",
|
||||
"Montant minimum à payer : ${widget.viewModel.minimumAmountToPay.toString()}€",
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 60.0),
|
||||
|
|
@ -167,7 +168,7 @@ class _SellPageState extends State<SellPage> {
|
|||
} else if (double.parse(
|
||||
price.text.replaceFirst(",", "."),
|
||||
) <
|
||||
widget.viewModel.minimumAmount) {
|
||||
widget.viewModel.minimumAmountToPay) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
|
|
@ -202,7 +203,7 @@ class _SellPageState extends State<SellPage> {
|
|||
SizedBox(width: 70),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
widget.viewModel.showScan = true;
|
||||
widget.viewModel.showScanScreen = true;
|
||||
},
|
||||
icon: Icon(Icons.add),
|
||||
style: ButtonStyle(
|
||||
|
|
@ -216,7 +217,7 @@ class _SellPageState extends State<SellPage> {
|
|||
],
|
||||
),
|
||||
),
|
||||
(widget.viewModel.showScan)
|
||||
(widget.viewModel.showScanScreen)
|
||||
? ScanScreen(viewModel: widget.viewModel)
|
||||
: SizedBox(),
|
||||
],
|
||||
|
|
|
|||
Reference in a new issue