i trying to read data in firestore using json the type Map must implements iterable
Stream<List<RentModel>> readData(){ var json = collection.document("rent").snapshots(); List<RentModel> rentModel = List(); return json.map((document) { for (var index in document.data){ // error is here in document.data that: the type Map<String, dynamic> must implements iterable rentModel.add(RentModel.fromJson(index)); } return rentModel; }); }