From fb302041f0d5e8f194d2063a58937f09090dde98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Sat, 8 Nov 2025 10:01:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E9=97=AE=E9=A2=98=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../problem/presentation/pages/problem_list_page.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/app/features/problem/presentation/pages/problem_list_page.dart b/lib/app/features/problem/presentation/pages/problem_list_page.dart index ecaec0a..db58d18 100644 --- a/lib/app/features/problem/presentation/pages/problem_list_page.dart +++ b/lib/app/features/problem/presentation/pages/problem_list_page.dart @@ -38,7 +38,7 @@ class ProblemListPage extends GetView { const Divider(height: 1, thickness: 1), // 列表区域总是显示 - Expanded(child: _buildEnterpriseList()), + Expanded(child: _buildProblemListList()), ], ), ); @@ -272,18 +272,18 @@ class ProblemListPage extends GetView { } /// 构建问题列表 - Widget _buildEnterpriseList() { + Widget _buildProblemListList() { // 使用下拉刷新包裹列表 return RefreshIndicator( onRefresh: () async => controller.loadAndSyncProblems(), child: Obx(() { // 3. 在加载中状态,直接显示加载动画(此时不可滚动是合理的) - if (controller.isLoading.value && controller.enterpriseList.isEmpty) { + if (controller.isLoading.value && controller.problemList.isEmpty) { return const Center(child: CircularProgressIndicator()); } // 4. 当列表为空时,将空状态提示也放入一个 ListView 中 - if (controller.enterpriseList.isEmpty) { + if (controller.problemList.isEmpty) { // 使用 ListView 包裹,并设置 AlwaysScrollableScrollPhysics return ListView( // [!!!] 关键:这行代码让 ListView 即使在内容不足一屏时也能滚动