feat: enhance CreateInspectionBottomSheetLogic with image listener setup and improve camera controller functionality for better user experience

This commit is contained in:
2025-12-16 14:38:06 +03:30
parent 39ca4f0c35
commit 4f7fa4ba93
4 changed files with 68 additions and 12 deletions

View File

@@ -209,6 +209,10 @@ class CreateInspectionBottomSheetLogic extends GetxController
void onReady() {
super.onReady();
activeStepperIndex.listen((value) {
iLog("==========>$value");
if (value == 1) {
setUpPultryImagesListener();
}
pageController.animateToPage(
value,
duration: Duration(milliseconds: 300),
@@ -956,7 +960,12 @@ class CreateInspectionBottomSheetLogic extends GetxController
void setUpPultryImagesListener() {
pultryImagesController.addListener(() {
pultryImages.assignAll(pultryImagesController.capturedImages);
if (pultryImagesController.capturedImages.isNotEmpty) {
WidgetsBinding.instance.addPostFrameCallback((_) {
pultryImages.assignAll(pultryImagesController.capturedImages);
});
}
});
}
}

View File

@@ -74,7 +74,7 @@ Widget generalConditionOfTheHall(CreateInspectionBottomSheetLogic controller) {
children: [
ObxValue((data) {
return Row(
children: data.value
children: data
.map(
(entry) => Stack(
children: [