import 'package:cloud_firestore/cloud_firestore.dart'; class ShipmentStatus { String status; DateTime date; bool done; String staffId; String staffName; ShipmentStatus( {this.status, this.date, this.done, this.staffId, this.staffName}); factory ShipmentStatus.fromMap(Map map) { var _date = (map['date'] as Timestamp); return ShipmentStatus( status: map['status'], date: _date == null ? null : _date.toDate(), done: map['done'], staffId: map['staff_id'], staffName: map['staff_name']); } }