mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 02:48:53 +03:30
Improve navigation back
This commit is contained in:
@@ -337,80 +337,78 @@ class MyPackageDetailsDataBox extends StatelessWidget {
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
userData['roles']?.contains('User') ?? false
|
||||
? Container()
|
||||
: TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: kPink,
|
||||
secondColor: kPinkSub,
|
||||
text: 'Back Items to Item List',
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(
|
||||
'Are you sure to destroy this Package?',
|
||||
TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: kPink,
|
||||
secondColor: kPinkSub,
|
||||
text: 'Back Items to Item List',
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: Text(
|
||||
'Are you sure to destroy this Package?',
|
||||
style: TextStyle(
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
content: SizedBox(
|
||||
width: _deviceBlockSize,
|
||||
height: 220,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'By approving, your package will be removed and it can not be used any more.',
|
||||
style: TextStyle(
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
fontSize: 3 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
content: SizedBox(
|
||||
width: _deviceBlockSize,
|
||||
height: 220,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'By approving, your package will be removed and it can not be used any more.',
|
||||
style: TextStyle(
|
||||
fontSize: 3 * _deviceBlockSize,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
PackageCard(_deviceBlockSize),
|
||||
SizedBox(
|
||||
height: 20.0,
|
||||
),
|
||||
TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: kPink,
|
||||
secondColor: kPinkSub,
|
||||
onTap: () {
|
||||
Provider.of<PackageProvider>(context,
|
||||
listen: false)
|
||||
.removePackages(datas.id)
|
||||
.then(
|
||||
(value) {
|
||||
Navigator.of(context).pop();
|
||||
Navigator.pushReplacementNamed(
|
||||
context,
|
||||
Routes.myPackagesResultScreen,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
text: 'Destroy',
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
CancelTransferButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
color: kDarkPurple,
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
PackageCard(_deviceBlockSize),
|
||||
SizedBox(
|
||||
height: 20.0,
|
||||
),
|
||||
TransferDestroyButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
firstColor: kPink,
|
||||
secondColor: kPinkSub,
|
||||
onTap: () {
|
||||
Provider.of<PackageProvider>(context,
|
||||
listen: false)
|
||||
.removePackages(datas.id)
|
||||
.then(
|
||||
(value) {
|
||||
Navigator.of(context).pop();
|
||||
Navigator.pushReplacementNamed(
|
||||
context,
|
||||
Routes.myPackagesResultScreen,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
text: 'Destroy',
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
CancelTransferButton(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
color: kDarkPurple,
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user