feat: refactor SDUI widget model to use sealed classes for type-safe handling, enhance form widget with stepper support, and improve error handling in SDUIFormWidget

This commit is contained in:
2025-12-31 13:36:13 +03:30
parent 8c25e2c65c
commit fb0b817cf9
14 changed files with 4879 additions and 654 deletions

View File

@@ -15,14 +15,14 @@ class StepperSDUI extends StatelessWidget {
return Obx(() {
final activeStep = state?[model.key] as int? ?? model.activeStep ?? 0;
return Directionality(
textDirection: TextDirection.ltr,
child: SizedBox(
height: 24,
width: Get.width,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: _buildSteps(totalSteps, activeStep),
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Directionality(
textDirection: TextDirection.ltr,
child: SizedBox(
height: 30.h,
width: Get.width,
child: Row(children: _buildSteps(totalSteps, activeStep)),
),
),
);
@@ -58,7 +58,8 @@ class StepperSDUI extends StatelessWidget {
// Add divider between steps (except after last step)
if (i < totalSteps - 1) {
widgets.add(
Expanded(
SizedBox(
width: 40.w,
child: Divider(
color: activeStep >= i + 1
? AppColor.greenNormalHover