firstWord method

String? firstWord()

Retorna a primeira palavra de uma string

Implementation

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