listIsEmpty static method

bool listIsEmpty(
  1. dynamic list
)

@description: 判断list是否为空 @param {} @return {}

Implementation

static bool listIsEmpty(dynamic list) {
  if (list == null) {
    return true;
  }

  if (!(list is List)) {
    return true;
  }

  if (list.length < 1) {
    return true;
  }

  return false;
}