feat : pagination
This commit is contained in:
@@ -204,4 +204,10 @@ class EnteringTheWarehouseLogic extends GetxController {
|
||||
weightLossController.clear();
|
||||
authenticationCodeController.clear();
|
||||
}
|
||||
@override
|
||||
void dispose() {
|
||||
rootLogic.inventoryExpandedList.clear();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user