** I am getting this error**
Closure call with mismatched arguments: function \'[]\'
Receiver: Closure: (dynamic) => dynamic from Function \'get\':.
Tried call
The answer by @Peter Haddad is correct. Just to highlight the difference with an example from my own code:
The previous version of code which created the same error:
snapshot.data.docs[index].data["chatRoomID"]
Updated version of code which solved the error:
snapshot.data.docs[index].data()["chatRoomID"]