biggestLine method

String biggestLine()

Returns the biggest line of a text.

Implementation

String biggestLine() {
  if (contains('\n')) {
    return split('\n')
        .reduce((curr, next) => curr.length > next.length ? curr : next);
  } else {
    return this;
  }
}