biggestLine method
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;
}
}
Returns the biggest line of a text.
String biggestLine() {
if (contains('\n')) {
return split('\n')
.reduce((curr, next) => curr.length > next.length ? curr : next);
} else {
return this;
}
}