ellipse method

String ellipse({
  1. int lenght = 140,
})

Implementation

String ellipse({int lenght = 140}) {
  if (length >= lenght) {
    return "${substring(0, lenght - 1)} ...";
  }
  return this;
}