countWords method
Returns the number of words in the string.
Implementation
int countWords() {
return validate().trim().split(RegExp(r'\s+')).length;
}
Returns the number of words in the string.
int countWords() {
return validate().trim().split(RegExp(r'\s+')).length;
}