formattedDueLabel property
String
formattedDueLabel
Implementation
String get formattedDueLabel {
String dueLabel = "";
bool formatTime = dueDate?.hasTime ?? true;
final dueConfig = this.dueConfig as TaskDueConfig?;
if (dueConfig is MetaDateDueConfig) {
formatTime = factService.getFactSchema(dueConfig.schemaRef)?.firstHistoricalDate?.hasTime == true;
} else if (dueConfig is SmartDateDueConfig) {
formatTime = dueConfig.hasTime ?? true;
}
final String formatted = [
dueConfig?.dueConfigLabel,
smartDateFormat(isCompleted ? completionDate : dueDate, formatTime: formatTime)
].where((s) => s.isNotNullOrBlank).join(": ");
dueLabel += formatted;
return dueLabel;
}