Browse Source

fix : 问题显示条件问题

dev
徐振升 2 months ago
parent
commit
fb302041f0
  1. 8
      lib/app/features/problem/presentation/pages/problem_list_page.dart

8
lib/app/features/problem/presentation/pages/problem_list_page.dart

@ -38,7 +38,7 @@ class ProblemListPage extends GetView<ProblemListController> {
const Divider(height: 1, thickness: 1), const Divider(height: 1, thickness: 1),
// //
Expanded(child: _buildEnterpriseList()), Expanded(child: _buildProblemListList()),
], ],
), ),
); );
@ -272,18 +272,18 @@ class ProblemListPage extends GetView<ProblemListController> {
} }
/// ///
Widget _buildEnterpriseList() { Widget _buildProblemListList() {
// 使 // 使
return RefreshIndicator( return RefreshIndicator(
onRefresh: () async => controller.loadAndSyncProblems(), onRefresh: () async => controller.loadAndSyncProblems(),
child: Obx(() { child: Obx(() {
// 3. // 3.
if (controller.isLoading.value && controller.enterpriseList.isEmpty) { if (controller.isLoading.value && controller.problemList.isEmpty) {
return const Center(child: CircularProgressIndicator()); return const Center(child: CircularProgressIndicator());
} }
// 4. ListView // 4. ListView
if (controller.enterpriseList.isEmpty) { if (controller.problemList.isEmpty) {
// 使 ListView AlwaysScrollableScrollPhysics // 使 ListView AlwaysScrollableScrollPhysics
return ListView( return ListView(
// [!!!] ListView 使 // [!!!] ListView 使

Loading…
Cancel
Save