pluralize function
Pluralizes a word, following English rules (1, many).
Pass a custom named plural for irregular plurals:
pluralize('index', count, plural: 'indices')
So it returns indices and not indexs.
Implementation
String pluralize(String word, int count, {String? plural}) =>
count == 1 ? word : (plural ?? '${word}s');