firstWord method

String? firstWord()

Return firt word from string

Implementation

String? firstWord() {
  if (this != null) {
    return this!.split(' ').first;
  } else
    return this;
}