trunkString function

String trunkString(
  1. String? field,
  2. int maxLength
)

Implementation

String trunkString(String? field, int maxLength) {
  return field!.length > 30
      ? formatToString(field).substring(0, maxLength)
      : formatToString(field);
}