📌  相关文章
📜  断言失败:第 1927 行第 12 行:'hasSize' - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:54.555000             🧑  作者: Mango

代码示例1
ListView(
          shrinkWrap: true,
          children: [
              child: Column(
                mainAxisSize: MainAxisSize.min,
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(
                    "Upcoming Tournaments",
                    style: Theme.of(context).textTheme.headline3!,
                  ),
                  GetX(builder: (controller) {
                    if (controller.isLoading.value) {
                      return Container(
                        child: Text("Loading..."),
                      );
                    } else {
                      return Flexible(
                        fit: FlexFit.loose,
                        child: ListView.builder(
                          shrinkWrap: true,
                            itemCount: tournamentListingController.tournamentList.length,
                            itemBuilder: (BuildContext context, int index) {
                              return TournamentDetailsCard(
                                tournamentDetails:
                                tournamentListingController.newList.value[index],
                                Screen: 'Listing',
                              );
                            }),
                      );
                    }
                  }),
                ],
              ),
          ],
        )