由于我的小部件的大小或数据(我猜),我收到多个错误。\n我尝试重新编写这部分,但它不起作用。\n是因为小部件的大小还是其他原因?
\n @override\n Widget build(BuildContext context) {\n var questionsOf = widget.setType(InputPage.topicN);\n\n CollectionReference contestantsRef =\n FirebaseFirestore.instance.collection(\'contestants\');\n\n return Scaffold(\n backgroundColor: Colors.blue,\n appBar: AppBar(\n centerTitle: true,\n ),\n body: SafeArea(\n child: Column(\n children: <Widget>[\n Flexible(\n child: Container(\n height: 100,\n child: iconCreate(),\n )),\n Container(\n child: StreamBuilder<QuerySnapshot>(\n stream: contestantsRef.snapshots(),\n builder: (BuildContext context, AsyncSnapshot asyncSnapshot) {\n List<DocumentSnapshot> listOfDocumentSnap =\n asyncSnapshot.data.docs;\n\n return ListView.builder(\n itemBuilder: (context, index) {\n return Text(\'${listOfDocumentSnap[index].data()}\');\n },\n itemCount: listOfDocumentSnap.length,\n );\n },\n ),\n ),\n SizedBox(\n height: 100,\n ),\n Flexible(\n flex: 4,\n child: Container(\n height: 200,\n margin: …Run Code Online (Sandbox Code Playgroud)