fix shipment detail click in noti
This commit is contained in:
@@ -43,6 +43,10 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
_fcsShipment = widget.fcsShipment;
|
||||
_load();
|
||||
}
|
||||
|
||||
_load() {
|
||||
_shipmentNumberController.text = _fcsShipment.shipmentNumber;
|
||||
_cutoffDateController.text = dateFormatter.format(_fcsShipment.cutoffDate);
|
||||
_arrivalDateController.text =
|
||||
@@ -177,11 +181,19 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
}
|
||||
|
||||
_edit() async {
|
||||
await Navigator.push(
|
||||
bool updated = await Navigator.push<bool>(
|
||||
context,
|
||||
CupertinoPageRoute(
|
||||
builder: (context) => FcsShipmentEditor(shipment: _fcsShipment)),
|
||||
);
|
||||
if (updated) {
|
||||
var shipmentModel = Provider.of<FcsShipmentModel>(context, listen: false);
|
||||
var f = await shipmentModel.getFcsShipment(_fcsShipment.id);
|
||||
setState(() {
|
||||
_fcsShipment = f;
|
||||
});
|
||||
_load();
|
||||
}
|
||||
}
|
||||
|
||||
Widget menuPopWidget(BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user