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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user