fix: add price where needed
This commit is contained in:
parent
630eacc1e1
commit
60265b9735
3 changed files with 74 additions and 24 deletions
|
|
@ -16,7 +16,6 @@ class AddPage extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _AddPageState extends State<AddPage> {
|
||||
bool askPrice = true;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final MobileScannerController controller = MobileScannerController(
|
||||
|
|
@ -69,13 +68,14 @@ class _AddPageState extends State<AddPage> {
|
|||
leading: Icon(Icons.attach_money),
|
||||
title: TextButton(
|
||||
child: Text(
|
||||
(askPrice)
|
||||
(widget.viewModel.askPrice)
|
||||
? "Demander à chaque fois"
|
||||
: "Prix libre toujours",
|
||||
),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
askPrice = !askPrice;
|
||||
widget.viewModel.askPrice =
|
||||
!widget.viewModel.askPrice;
|
||||
});
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Reference in a new issue