cutOutMiddle method

String cutOutMiddle({
  1. int length = 6,
})

Implementation

String cutOutMiddle({int length = 6}) {
  if (this.length > length * 2) {
    return '${substring(0, length)}...${substring(this.length - length, this.length)}';
  }
  return this;
}