i am getting data from inside Doucument in firestor
CodePudding user response:
your code isn't clear but if your questionSnapShot
is a DocumentSnapshot
you can retrieve the data whiteout adding .data()
, so just remove .data()
if that's the case.
CodePudding user response:
If I‘d have to guess, I‘d say that you have a problem with null safety.
You can check beforhand if .data()
is null or just add !
questionSnapshotData = questionSnapshot.data()!["question1"];