trimToTwenty property
String
get
trimToTwenty
Trims the string to 20 characters and adds three dots at the end. Returns original string if length is not more than 20.
Implementation
String get trimToTwenty => length < 21 ? this : '${substring(0, 21)}...';