diff --git a/lib/modules/tm_module/gas_refill/gas_refill_details.dart b/lib/modules/tm_module/gas_refill/gas_refill_details.dart index 0b2a7090..8b7e0c03 100644 --- a/lib/modules/tm_module/gas_refill/gas_refill_details.dart +++ b/lib/modules/tm_module/gas_refill/gas_refill_details.dart @@ -141,7 +141,16 @@ class _GasRefillDetailsPageState extends State { 16.width, AppFilledButton( onPressed: () async { - await Navigator.of(context).push(MaterialPageRoute(builder: (_) => UpdateGasRefillRequest(gasRefillModel: _model))); + bool? isRefresh = await Navigator.of(context).push(MaterialPageRoute(builder: (_) => UpdateGasRefillRequest(gasRefillModel: _model)));; + if (isRefresh != null && isRefresh) { + Utils.showLoading(context); + await gasRefillProvider.getGasRefillObjectById(widget.model.id!); + isDataUpdated = true; + Utils.hideLoading(context); + setState(() {}); + // isDataUpdated = true; + // setState(() {}); + } // getVisitData(); }, label: context.translation.updateRequest, diff --git a/lib/modules/tm_module/gas_refill/update_gas_refill_request.dart b/lib/modules/tm_module/gas_refill/update_gas_refill_request.dart index 7f0fc8c3..66343d3d 100644 --- a/lib/modules/tm_module/gas_refill/update_gas_refill_request.dart +++ b/lib/modules/tm_module/gas_refill/update_gas_refill_request.dart @@ -192,8 +192,12 @@ class _UpdateGasRefillRequestState extends State { // when click complete then this request remove from the list and status changes to closed.. _gasRefillProvider?.reset(); allRequestsProvider.getAllRequests(context, typeTransaction: 2); + // Navigator.pop(context); + Navigator.pop(context,true); + }else{ + Navigator.pop(context,false); + } - Navigator.pop(context); } }); }