limitText static method

String limitText(
  1. String value,
  2. int maxLength
)

Implementation

static String limitText(String value, int maxLength) {
  return value.length > maxLength
      ? value.substring(0, maxLength) + "..."
      : value;
}