ellipsize method
Truncates string to maxLength characters, appending ellipsis.
Implementation
String ellipsize(int maxLength, {String ellipsis = '...'}) {
if (length <= maxLength) return this;
return '${substring(0, maxLength)}$ellipsis';
}
Truncates string to maxLength characters, appending ellipsis.
String ellipsize(int maxLength, {String ellipsis = '...'}) {
if (length <= maxLength) return this;
return '${substring(0, maxLength)}$ellipsis';
}