Hi,
I created chat as it is seen in image. First screen show chats, second messages. Firebase structure: "chats" collection with "chat_messages" subcollection. When I click on chat I set chat document reference in App State and then navigate to messages screen. After navigation to message screen messages are shown correct with no errors. To show messages' I use list widget. List widget has backend query. Backend query uses chat document reference from App State to query "chat_messages". Everything works fine, but when I use text field at the bottom to add new message after pressing submit button for a second appears red screen and then it disappears. In console I see error "Another exception was thrown: Unexpected null value.". Can anyone tell me what I am doing wrong as I spent a lot of time and can not figure out where is the problem?