tenorRange function
Implementation
List<String>? tenorRange(
int? minimumTenor,
int? maximumTenor,
) {
if (minimumTenor == null || maximumTenor == null || minimumTenor < 1 || maximumTenor < minimumTenor) {
return [];
}
List<String> months = [];
for (int i = minimumTenor; i <= maximumTenor; i++) {
if (i == 1) {
months.add('$i Month');
} else {
months.add('$i Months');
}
}
return months;
}