I am working on web application. When i try to create array data field in firestore it shows error as Expected a value of type ‘FieldValuePlatform’, but got one of type ‘FieldValueWeb’.
The code :
Map<String, dynamic> questionMap = {
“type”:“MultipleChoice”,
“question”: controllerQuestion.text,
“options”: optionList,
“answer”: answerList,
};
demoQuestion.add(questionMap);
Firestore.instance.collection('quiz').document("CHN-01").collection('Quiz').document('CHN-02').setData({'question':FieldValue.arrayUnion([questionMap])});
Please help me to solve this issue. Thanks in advance