Instance member 'data' can't be accessed using static access

Viewed 37

I/m facing this issue. Can anyone assist? Thanks

2 Answers

You have a null safety. Just add '!' after data. Example snapshot!.data!.[i].name

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

Related