ellipseEnd static method
Implementation
static String ellipseEnd(String value, int maxLength, {String ellipseText = "...", bool appendEllipse = true}){
int endIndex;
if(value.length >= maxLength){
endIndex = maxLength;
}
else{
endIndex = value.length;
}
var validValue = value.substring(0, endIndex).toString();
if(appendEllipse){
return validValue + ellipseText;
}
else{
return validValue;
}
}