refactor: update text form field model to use dynamic value type, enhance condition evaluator for step index extraction, and improve SDK path formatting
This commit is contained in:
11
packages/chicken/lib/presentation/utils/sdui_extension.dart
Normal file
11
packages/chicken/lib/presentation/utils/sdui_extension.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
import 'package:rasadyar_chicken/presentation/widget/sdui/model/sdui_widget.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/sdui/widgets/stepper/model/stepper_sdui_model.dart';
|
||||
|
||||
extension SDUIModelExtensions on SDUIWidgetModel {
|
||||
// چک میکند آیا این ویجت استپر است؟
|
||||
bool get isStepper => this.maybeWhen(stepper: (_, _, _, _) => true, orElse: () => false);
|
||||
|
||||
// دیتای استپر را برمیگرداند (اگر استپر باشد)
|
||||
StepperSDUIModel? get stepperData =>
|
||||
maybeWhen(stepper: (data, _, _, _) => data, orElse: () => null);
|
||||
}
|
||||
Reference in New Issue
Block a user