To complement KOrra's answer, In line 44, you have AsyncSnaphot.data.lenght. It should be snapshot.data.length