mapIsEmpty static method

bool mapIsEmpty(
  1. dynamic map
)

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

Implementation

static bool mapIsEmpty(dynamic map) {
  if (map == null) {
    return true;
  }

  if (!(map is Map)) {
    return true;
  }

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

  return false;
}