listObjectToListDialogsCount static method

List<Map<String, int>>? listObjectToListDialogsCount(
  1. List<Object?>? listObjects
)

Implementation

static List<Map<String, int>>? listObjectToListDialogsCount(List<Object?>? listObjects) {
  List<Map<String, int>> resultList = [];

  if (listObjects == null || listObjects.isEmpty) {
    return null;
  }

  listObjects.forEach((element) {
    Map<String, int> dialogMap = HashMap.from(element as Map<Object?, Object?>);
    resultList.add(dialogMap);
  });

  return resultList;
}