mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-14 00:28:57 +03:30
2.1.0
This commit is contained in:
@@ -120,16 +120,39 @@ class ItemItemBox extends StatelessWidget {
|
||||
: InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
Provider.of<ItemProvider>(context,
|
||||
listen: false)
|
||||
.changeStatus(item!.id)
|
||||
.then(
|
||||
(value) {
|
||||
if (value) {
|
||||
print('true');
|
||||
}
|
||||
Navigator.of(context).popAndPushNamed(
|
||||
Routes.itemResultScreen);
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(
|
||||
'Do you want to change the status of the item?'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Provider.of<ItemProvider>(context,
|
||||
listen: false)
|
||||
.changeStatus(item!.id)
|
||||
.then(
|
||||
(value) {
|
||||
if (value) {
|
||||
print('true');
|
||||
}
|
||||
Navigator.of(context)
|
||||
.popAndPushNamed(Routes
|
||||
.itemResultScreen);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Text('Yes'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text('No'),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user