From 1c226e89cc3ca33c0fe74655c9a8ced1313b8444 Mon Sep 17 00:00:00 2001 From: fhkhd Date: Tue, 27 Feb 2024 19:04:20 +0330 Subject: [PATCH] Remove change status of package in result page --- .../Result/package_data_box.dart | 166 ------------------ 1 file changed, 166 deletions(-) diff --git a/lib/widgets/PackageScreens/Result/package_data_box.dart b/lib/widgets/PackageScreens/Result/package_data_box.dart index 3f4eac4..a76c747 100755 --- a/lib/widgets/PackageScreens/Result/package_data_box.dart +++ b/lib/widgets/PackageScreens/Result/package_data_box.dart @@ -174,172 +174,6 @@ class PackageItemBox extends StatelessWidget { color: Colors.black, ), ), - item?.status == "suspended" - ? Row( - children: [ - SizedBox( - width: 5.0, - ), - InkWell( - customBorder: CircleBorder(), - onTap: () { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - title: Text( - 'Are you Reject this item?'), - actions: [ - Consumer< - PackageProvider>( - builder: (context, - packageProvider, - _) { - return packageProvider - .isloadingButton - ? CircularProgressIndicator( - color: Colors - .black, - ) - : TextButton( - onPressed: - () async { - packageProvider - .setLoadingButton(); - await Provider.of(context, - listen: false) - .changeStatus(item!.id, "rejected") - .then( - (value) { - if (value) { - print('true'); - } - Navigator.of(context).pop(); - Navigator.of(context).popAndPushNamed(Routes.packageResultScreen); - Fluttertoast.showToast( - msg: "Package is Rejected.", - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - ); - packageProvider.resetLoadingButton(); - }, - ); - }, - child: Text( - 'Yes'), - ); - }, - ), - TextButton( - onPressed: () { - Navigator.of( - context) - .pop(); - }, - child: Text('No'), - ), - ], - ); - }, - ); - }, - child: Container( - padding: EdgeInsets.all(7), - width: 8 * _deviceBlockSize, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: kPink), - child: Icon( - Icons.close, - size: 4 * _deviceBlockSize, - color: Colors.white, - ), - ), - ), - SizedBox( - width: 5, - ), - InkWell( - customBorder: CircleBorder(), - onTap: () { - showDialog( - context: context, - builder: (context) { - return AlertDialog( - title: Text( - 'Are you Confirm this item?', - ), - actions: [ - Consumer< - PackageProvider>( - builder: (context, - packageProvider, - _) { - return packageProvider - .isloadingButton - ? CircularProgressIndicator( - color: Colors - .black, - ) - : TextButton( - onPressed: - () async { - packageProvider - .setLoadingButton(); - await Provider.of(context, - listen: false) - .changeStatus(item!.id, "approved") - .then( - (value) { - if (value) { - print('true'); - } - Navigator.of(context).pop(); - Navigator.of(context).popAndPushNamed(Routes.packageResultScreen); - Fluttertoast.showToast( - msg: "Package is Confirmed.", - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - ); - packageProvider.resetLoadingButton(); - }, - ); - }, - child: Text( - 'Yes'), - ); - }, - ), - TextButton( - onPressed: () { - Navigator.of( - context) - .pop(); - }, - child: Text('No'), - ), - ], - ); - }, - ); - }, - child: Container( - padding: EdgeInsets.all(7), - width: 8 * _deviceBlockSize, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: kBlue, - ), - child: Icon( - Icons.check, - size: 4 * _deviceBlockSize, - color: Colors.white, - ), - ), - ), - ], - ) - : Container(), SizedBox( width: 5, ),