Browse Source

档案管理页面,滑动加载

finlay 1 year ago
parent
commit
b4cfac11de
2 changed files with 41 additions and 1 deletions
  1. 1 1
      lib/pages/controllers/paged_state_mixin.dart
  2. 40 0
      pubspec.lock

+ 1 - 1
lib/pages/controllers/paged_state_mixin.dart

@@ -28,7 +28,7 @@ mixin PagedStateMixin<T> {
   set totalCount(int val) => _totalCount.updateValue(val);
 
   /// 是否存在下一页
-  bool get hasNextPage => _totalCount > (pageIndex + 1) * pageSize;
+  bool get hasNextPage => _totalCount > pageIndex * pageSize;
 
   /// 列表数据集合
   List<T> get dataList => UnmodifiableListView(_dataList.toList());

+ 40 - 0
pubspec.lock

@@ -426,6 +426,46 @@ packages:
       url: "https://pub.flutter-io.cn"
     source: hosted
     version: "2.2.1"
+  permission_handler:
+    dependency: "direct main"
+    description:
+      name: permission_handler
+      sha256: "33c6a1253d1f95fd06fa74b65b7ba907ae9811f9d5c1d3150e51417d04b8d6a8"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "10.2.0"
+  permission_handler_android:
+    dependency: transitive
+    description:
+      name: permission_handler_android
+      sha256: "59c6322171c29df93a22d150ad95f3aa19ed86542eaec409ab2691b8f35f9a47"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "10.3.6"
+  permission_handler_apple:
+    dependency: transitive
+    description:
+      name: permission_handler_apple
+      sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "9.1.4"
+  permission_handler_platform_interface:
+    dependency: transitive
+    description:
+      name: permission_handler_platform_interface
+      sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "3.12.0"
+  permission_handler_windows:
+    dependency: transitive
+    description:
+      name: permission_handler_windows
+      sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "0.1.3"
   platform:
     dependency: transitive
     description: