toMap method
Implementation
Map<String, String> toMap() {
final timeFormat = DateFormat('HH:mm:ss dd/MM/yyyy');
return {
'Name': name ?? 'N/A',
'Task ID': taskId ?? 'N/A',
'ETA': timestampToHumanReadable(etaTimestamp, timeFormat) ?? 'N/A',
'Start': timestampToHumanReadable(startTimestamp, timeFormat) ?? 'N/A',
'End': timestampToHumanReadable(endTimestamp, timeFormat) ?? 'N/A',
'Status': status.name,
'Args': args ?? 'N/A',
'Kwargs': kwargs ?? 'N/A',
'Result': result ?? 'N/A',
};
}