isEmpty function

bool isEmpty(
  1. String? input
)

trim the string then checks if isEmpty if string is empty it will returns true

Implementation

bool isEmpty(String? input) {
  return input?.trim().isEmpty ?? true;
}