isMapOfStringKeys function

bool isMapOfStringKeys(
  1. Map? map
)

Returns true if map has String keys.

Implementation

bool isMapOfStringKeys(Map? map) {
  if (map == null) return false;
  if (map is Map<String, String>) return true;
  if (map is Map<String, dynamic>) return true;
  if (map.isEmpty) return false;

  if (listNotMatchesAll(map.keys, (k) => (k is String))) return false;

  return true;
}