getData method

dynamic getData(
  1. dynamic collectionName
)

Implementation

getData(collectionName) {
  Map result = {};
  _firestore.collection(collectionName).get().then((value) {
    for (var element in value.docs) {
      result[element.id] = element.data();
    }
  });

  return result;
}