listEmpty static method

bool listEmpty(
  1. List? list
)

判断List是否为空

Implementation

static bool listEmpty(List? list) {
  if (list == null) return true;

  if (list.length == 0) return true;

  return false;
}