shorten static method

String shorten(
  1. String value, {
  2. bool short = false,
})

Implementation

static String shorten(String value, {bool short = false}) {
  return short && value.length > 8 ? '${value.substring(0, 8)}..' : value;
}