stringShorten function
Implementation
String stringShorten(String value, {int prefixLength = 6}) {
if (value.length <= 2 + 2 * prefixLength) {
return value.toString();
}
var tLength = value.length;
var secStart = value.length - prefixLength;
var firstPart = value.substring(0, prefixLength);
var secondPart = value.substring(secStart, tLength);
return "$firstPart…$secondPart";
}