getRelated method
In list of dates if all other date are same it returns null For Eg To add title group by date all others data having same date should have same title so one title is enough for that this extentions can be used
Implementation
String? getRelated(DateTime? previousDate) {
if (previousDate != null) {
if (difference(previousDate).inDays == 0) {
return null;
} else {
return getDurationName;
}
}
return getDurationName;
}