check null safety
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user