这是我的问题对象:
class Question {
String text;
String correctAnswer;
bool answer;
Question(String q, bool a, String ca) {
text = q;
answer = a;
correctAnswer = ca;
}
}
Run Code Online (Sandbox Code Playgroud)
我想从 Firestore 获取问题列表,如下所示:
List<Question> questionBank = [];
Run Code Online (Sandbox Code Playgroud)
Firestore 看起来像这样: firestore
我怎样才能做到这一点?