feat : pagination

This commit is contained in:
MrM
2025-06-06 18:50:16 +03:30
parent 31792a2f8a
commit 63e9ec585d
7 changed files with 78 additions and 20 deletions

View File

@@ -204,4 +204,10 @@ class EnteringTheWarehouseLogic extends GetxController {
weightLossController.clear();
authenticationCodeController.clear();
}
@override
void dispose() {
rootLogic.inventoryExpandedList.clear();
super.dispose();
}
}

View File

@@ -58,7 +58,6 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
)
: ListView.separated(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemCount: controller.rootLogic.inventoryList.length,
separatorBuilder: (context, index) =>
const SizedBox(height: 8),
@@ -297,17 +296,17 @@ class EnteringTheWarehousePage extends GetView<EnteringTheWarehouseLogic> {
height: 700,
padding: const EdgeInsets.all(6),
child: ListView.separated(
controller: controller.scrollControllerWaitingForArrival,
padding: const EdgeInsets.all(8.0),
itemCount: data.value!.results.length+1 ,
itemCount: data.value!.results.length + 1,
itemBuilder: (BuildContext context, int index) {
if (index == data.value!.results!.length) {
return Obx(
() => controller.isLoadingMoreWaitingForArrival.value
() => controller.isLoadingMoreWaitingForArrival.value
? const Padding(
padding: EdgeInsets.symmetric(vertical: 16),
child: Center(child: CircularProgressIndicator()),
)
padding: EdgeInsets.symmetric(vertical: 16),
child: Center(child: CircularProgressIndicator()),
)
: const SizedBox(),
);
}