checkNotEmpty static method

String checkNotEmpty(
  1. String string, {
  2. Object? errorMessage,
})

Implementation

static String checkNotEmpty(String string, {Object? errorMessage}) {
  if (string.length == 0) {
    throw ArgumentError(
        _resolveMessage(errorMessage, "Given String is empty or null."));
  }
  return string;
}