truncateTo method

String truncateTo({
  1. int maxLength = 250,
})

Implementation

String truncateTo({int maxLength = 250}) => (toNotNull.length <= maxLength) ? toNotNull : '${toNotNull.substring(0, maxLength)}...';