check null safety

This commit is contained in:
tzw
2021-09-10 14:27:38 +06:30
parent a144c945b6
commit 7670779b03
57 changed files with 620 additions and 626 deletions

View File

@@ -3,17 +3,18 @@ import 'package:cloud_firestore/cloud_firestore.dart';
import '../constants.dart';
class FcsShipment {
String id;
String shipmentNumber;
DateTime cutoffDate;
String shipType;
DateTime arrivalDate;
DateTime departureDate;
String consignee;
String port;
String destination;
String status;
String reportName;
String? id;
String? shipmentNumber;
DateTime? cutoffDate;
String? shipType;
DateTime? arrivalDate;
DateTime? departureDate;
String? consignee;
String? port;
String? destination;
String? status;
String? reportName;
FcsShipment({
this.id,
this.shipmentNumber,
@@ -51,10 +52,10 @@ class FcsShipment {
return {
"id": id,
'shipment_number': shipmentNumber,
'cutoff_date': cutoffDate?.toUtc()?.toIso8601String(),
'cutoff_date': cutoffDate?.toUtc().toIso8601String(),
'shipment_type': shipType,
'arrival_date': arrivalDate?.toUtc()?.toIso8601String(),
'departure_date': departureDate?.toUtc()?.toIso8601String(),
'arrival_date': arrivalDate?.toUtc().toIso8601String(),
'departure_date': departureDate?.toUtc().toIso8601String(),
'consignee': consignee,
'port': port,
'destination': destination,