lastWord method

String? lastWord()

Return last word from string

Implementation

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