toPlural method
Returns a pluralized version of the string based on length.
If showLength is true, prepends the number.
Implementation
String toPlural(int length, [bool showLength = true]) {
return '${showLength ? "$length" : ""} $this${length > 1 && !endsWith("s")
? endsWith("y")
? "ies"
: "s"
: ""}';
}