checkNullOrEmpty static method

void checkNullOrEmpty(
  1. Object? argument,
  2. String message
)

Throws AesCryptArgumentError if argument is: null Object, empty String or empty Iterable

Implementation

static void checkNullOrEmpty(Object? argument, String message) {
  if (argument == null ||
      ((argument is String) ? argument.isEmpty : false) ||
      ((argument is Iterable) ? argument.isEmpty : false)) {
    throw AesCryptArgumentError(message);
  }
}