null safety

This commit is contained in:
Phaung Phaung
2021-09-10 16:48:20 +06:30
parent 52fe4b4568
commit 0f84fec2f7
12 changed files with 103 additions and 106 deletions

View File

@@ -64,7 +64,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
_destinationController.text = _shipment.destination ?? "";
} else {
var mainModel = Provider.of<MainModel>(context, listen: false);
_currentShipmentType = mainModel.setting.shipmentTypes[0];
_currentShipmentType = mainModel.setting!.shipmentTypes[0];
}
}
@@ -149,7 +149,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
labelText: AppTranslations.of(context)!
.text('FCSshipment.shipment_type'),
icon: Icon(Ionicons.ios_airplane, color: primaryColor)),
items: mainModel.setting.shipmentTypes
items: mainModel.setting!.shipmentTypes
.map((e) => DropdownMenuItem(child: Text(e), value: e))
.toList(),
onChanged: (String? selected) => {
@@ -288,7 +288,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
_consigneeController.text != "" ||
_portController.text != "" ||
_destinationController.text != "" ||
_currentShipmentType != mainModel.setting.shipmentTypes[0];
_currentShipmentType != mainModel.setting!.shipmentTypes[0];
} else {
FcsShipment fcsShipment = _getPayload();
return widget.shipment!.isChangedForEdit(fcsShipment);