isListOfMap function

bool isListOfMap(
  1. Object? list
)

Returns true if list elements are all of type Map.

Implementation

bool isListOfMap(Object? list) {
  if (list == null || list is! List) return false;

  if (list is List<Map>) return true;
  if (list.isEmpty) return false;

  if (listNotMatchesAll(list, (e) => (e is Map))) return false;

  return true;
}