nullOrWhitespace function

bool nullOrWhitespace(
  1. String? source
)

Returns true if string is either null or entirely whitespace.

Implementation

bool nullOrWhitespace(String? source) => source?.trim().isEmpty ?? true;