check null safety
This commit is contained in:
@@ -8,12 +8,9 @@ import 'package:fcs/domain/vo/delivery_address.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/carton_size/carton_size_list.dart';
|
||||
import 'package:fcs/pages/carton_size/model/carton_size_model.dart';
|
||||
import 'package:fcs/pages/delivery_address/model/delivery_address_model.dart';
|
||||
import 'package:fcs/pages/main/util.dart';
|
||||
import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
|
||||
import 'package:fcs/pages/widgets/defalut_delivery_address.dart';
|
||||
import 'package:fcs/pages/widgets/delivery_address_selection.dart';
|
||||
import 'package:fcs/pages/widgets/display_text.dart';
|
||||
import 'package:fcs/pages/widgets/length_picker.dart';
|
||||
import 'package:fcs/pages/widgets/local_button.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
@@ -45,7 +42,7 @@ class _PackageCartonEditorState extends State<PackageCartonEditor> {
|
||||
|
||||
Carton? _carton;
|
||||
bool _isLoading = false;
|
||||
DeliveryAddress _deliveryAddress = new DeliveryAddress();
|
||||
DeliveryAddress? _deliveryAddress = new DeliveryAddress();
|
||||
List<CargoType> _cargoTypes = [];
|
||||
CartonSize? selectedCatonSize;
|
||||
bool isFromPackages = false;
|
||||
@@ -263,7 +260,7 @@ class _PackageCartonEditorState extends State<PackageCartonEditor> {
|
||||
.map<DropdownMenuItem<CartonSize>>((CartonSize value) {
|
||||
return DropdownMenuItem<CartonSize>(
|
||||
value: value,
|
||||
child: Text(value.name,
|
||||
child: Text(value.name ?? "",
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: value.name == MANAGE_CARTONSIZE
|
||||
@@ -354,7 +351,7 @@ class _PackageCartonEditorState extends State<PackageCartonEditor> {
|
||||
Navigator.pop(context, _c);
|
||||
} else {
|
||||
await cartonModel.updateCarton(carton);
|
||||
Carton _c = await cartonModel.getCarton(_carton!.id);
|
||||
Carton _c = await cartonModel.getCarton(_carton!.id!);
|
||||
Navigator.pop(context, _c);
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user