wordCount property

int get wordCount

Counts words in string

Implementation

int get wordCount => trim().split(RegExp(r'\s+')).length;