瀏覽代碼

离线搜索卡死问题解决

finlay 10 月之前
父節點
當前提交
bf54f51eba
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      lib/pages/patient/list/controller.dart

+ 4 - 1
lib/pages/patient/list/controller.dart

@@ -284,7 +284,10 @@ class PatientListController extends FControllerBase
   /// 加载下一页列表
   Future<void> loadNextPageList({bool isFilter = false}) async {
     busy = true;
-    var allLabels = await Get.find<ILabelManager>().getAllLabels();
+    List<LabelDTO> allLabels = [];
+    if (kIsOnline) {
+      allLabels = await Get.find<ILabelManager>().getAllLabels();
+    }
     var labelKeys = allLabels.map((e) => e.code ?? '').toList();
     final request = PatientPageRequest(
       pageIndex: state.pageIndex + 1,