feat: add step 5 page and update active stepper logic in poultry farm inspection
doc: some utils in core
This commit is contained in:
@@ -91,6 +91,7 @@ class PoultryFarmInspectionHomeLogic extends GetxController
|
||||
void clearForm() {
|
||||
nameOfThePoultryFarmUnit.clear();
|
||||
activeStepperIndex.value = 0;
|
||||
selectedTabIndex.value = 0;
|
||||
}
|
||||
|
||||
void setSanitaryConditionOfTheHallIndex(int index) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'step1_page.dart';
|
||||
import 'step2_page.dart';
|
||||
import 'step3_page.dart';
|
||||
import 'step4_page.dart';
|
||||
import 'step5_page.dart';
|
||||
|
||||
Widget addOrEditBottomSheet(PoultryFarmInspectionHomeLogic controller) {
|
||||
List<Widget> pages = [
|
||||
@@ -12,6 +13,7 @@ Widget addOrEditBottomSheet(PoultryFarmInspectionHomeLogic controller) {
|
||||
step2Page(controller),
|
||||
step3Page(controller),
|
||||
step4Page(controller),
|
||||
step5Page(controller),
|
||||
];
|
||||
|
||||
return BaseBottomSheet(
|
||||
@@ -50,7 +52,7 @@ Widget addOrEditBottomSheet(PoultryFarmInspectionHomeLogic controller) {
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
if (controller.activeStepperIndex.value < 3) {
|
||||
if (controller.activeStepperIndex.value <4) {
|
||||
controller.activeStepperIndex.value++;
|
||||
}
|
||||
},
|
||||
@@ -60,7 +62,7 @@ Widget addOrEditBottomSheet(PoultryFarmInspectionHomeLogic controller) {
|
||||
child: ROutlinedElevated(
|
||||
borderColor: AppColor.error,
|
||||
height: 40.h,
|
||||
child: Text('انصراف'),
|
||||
child: Text('برگشت'),
|
||||
enabled: controller.activeStepperIndex.value > 0,
|
||||
onPressed: () {
|
||||
if (controller.activeStepperIndex.value > 0) {
|
||||
@@ -188,6 +190,32 @@ class stepper extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Divider(
|
||||
color: activeStep >= 4
|
||||
? AppColor.greenNormalHover
|
||||
: AppColor.whiteNormalActive,
|
||||
thickness: 8,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: activeStep >= 4
|
||||
? AppColor.greenNormalHover
|
||||
: AppColor.whiteNormalActive,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
width: 24.w,
|
||||
height: 24.h,
|
||||
child: Text(
|
||||
'5',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan16.copyWith(
|
||||
color: activeStep >= 3 ? Colors.white : AppColor.iconColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
name: rasadyar_chicken
|
||||
description: A starting point for Dart libraries or applications.
|
||||
version: 1.3.18
|
||||
version: 1.3.20
|
||||
|
||||
environment:
|
||||
sdk: ^3.9.2
|
||||
sdk: ^3.10.0
|
||||
|
||||
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user