refresh screen after update data

design_3.0_eng_role_module
WaseemAbbasi22 19 hours ago
parent c50e979790
commit d723b6bc16

@ -141,7 +141,16 @@ class _GasRefillDetailsPageState extends State<GasRefillDetailsPage> {
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,

@ -192,8 +192,12 @@ class _UpdateGasRefillRequestState extends State<UpdateGasRefillRequest> {
// 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);
}
});
}

Loading…
Cancel
Save