extension PluralizeIntExtension on int { String pluralize({ required String name, required String absent, required String absentMul, }) { final plurality = this % 10 == 1 && this % 100 != 11 ? 0 : this % 10 >= 2 && this % 10 <= 4 && (this % 100 < 10 || this % 100 >= 20) ? 1 : 2; switch (plurality) { case 1: return "$this $absent"; case 2: return "$this $absentMul"; default: return "$this $name"; } } }