feat: enhance SDUI widget model with dynamic visibility conditions, refactor NewPageLogic for improved form handling, and update UI components to support new visibility features
This commit is contained in:
@@ -57,18 +57,21 @@ class NewPageLogic extends GetxController {
|
|||||||
|
|
||||||
if (sduiData != null) {
|
if (sduiData != null) {
|
||||||
iLog('SDUI data to parse: $sduiData');
|
iLog('SDUI data to parse: $sduiData');
|
||||||
sduiModel.value = SDUIWidgetModel.fromRawJson(sduiData);
|
sduiModel.value = SDUIWidgetModel.fromJson(sduiData);
|
||||||
|
|
||||||
// Log model info using pattern matching
|
// Log model info using pattern matching
|
||||||
final modelType =
|
final modelType =
|
||||||
sduiModel.value?.maybeWhen(
|
sduiModel.value?.maybeWhen(
|
||||||
textFormField: (data, visible) => 'text_form_field',
|
textFormField: (data, visible, visibleCondition) =>
|
||||||
|
'text_form_field',
|
||||||
cardLabelItem:
|
cardLabelItem:
|
||||||
(data, child, children, visible, visibleCondition) =>
|
(data, child, children, visible, visibleCondition) =>
|
||||||
'card_label_item',
|
'card_label_item',
|
||||||
chipSelection: (data, visible) => 'chip_selection',
|
chipSelection: (data, visible, visibleCondition) =>
|
||||||
dropdown: (data, visible) => 'dropdown',
|
'chip_selection',
|
||||||
imagePicker: (data, visible) => 'image_picker',
|
dropdown: (data, visible, visibleCondition) => 'dropdown',
|
||||||
|
imagePicker: (data, visible, visibleCondition) =>
|
||||||
|
'image_picker',
|
||||||
column:
|
column:
|
||||||
(
|
(
|
||||||
children,
|
children,
|
||||||
@@ -78,12 +81,22 @@ class NewPageLogic extends GetxController {
|
|||||||
visible,
|
visible,
|
||||||
paddingHorizontal,
|
paddingHorizontal,
|
||||||
paddingVertical,
|
paddingVertical,
|
||||||
|
visibleCondition,
|
||||||
) => 'column',
|
) => 'column',
|
||||||
row: (children, spacing, mainAxisAlignment, visible) =>
|
row:
|
||||||
'row',
|
(
|
||||||
sizedBox: (width, height, visible) => 'sized_box',
|
children,
|
||||||
stepper: (data, children, visible, index) => 'stepper',
|
spacing,
|
||||||
pageView: (data, children, visible) => 'page_view',
|
mainAxisAlignment,
|
||||||
|
visible,
|
||||||
|
visibleCondition,
|
||||||
|
) => 'row',
|
||||||
|
sizedBox: (width, height, visible, visibleCondition) =>
|
||||||
|
'sized_box',
|
||||||
|
stepper: (data, children, visible, visibleCondition) =>
|
||||||
|
'stepper',
|
||||||
|
pageView: (data, children, visible, visibleCondition) =>
|
||||||
|
'page_view',
|
||||||
orElse: () => 'unknown',
|
orElse: () => 'unknown',
|
||||||
) ??
|
) ??
|
||||||
'null';
|
'null';
|
||||||
@@ -99,15 +112,23 @@ class NewPageLogic extends GetxController {
|
|||||||
visible,
|
visible,
|
||||||
paddingHorizontal,
|
paddingHorizontal,
|
||||||
paddingVertical,
|
paddingVertical,
|
||||||
|
visibleCondition,
|
||||||
|
) => children.length,
|
||||||
|
row:
|
||||||
|
(
|
||||||
|
children,
|
||||||
|
spacing,
|
||||||
|
mainAxisAlignment,
|
||||||
|
visible,
|
||||||
|
visibleCondition,
|
||||||
) => children.length,
|
) => children.length,
|
||||||
row: (children, spacing, mainAxisAlignment, visible) =>
|
|
||||||
children.length,
|
|
||||||
cardLabelItem:
|
cardLabelItem:
|
||||||
(data, child, children, visible, visibleCondition) =>
|
(data, child, children, visible, visibleCondition) =>
|
||||||
(child != null ? 1 : 0) + (children?.length ?? 0),
|
(child != null ? 1 : 0) + (children?.length ?? 0),
|
||||||
stepper: (data, children, visible, index) =>
|
stepper: (data, children, visible, visibleCondition) =>
|
||||||
children?.length ?? 0,
|
children?.length ?? 0,
|
||||||
pageView: (data, children, visible) => children.length,
|
pageView: (data, children, visible, visibleCondition) =>
|
||||||
|
children.length,
|
||||||
orElse: () => 0,
|
orElse: () => 0,
|
||||||
) ??
|
) ??
|
||||||
0;
|
0;
|
||||||
@@ -143,7 +164,7 @@ class NewPageLogic extends GetxController {
|
|||||||
void _extractTextFields(SDUIWidgetModel model) {
|
void _extractTextFields(SDUIWidgetModel model) {
|
||||||
// Extract text form field using pattern matching
|
// Extract text form field using pattern matching
|
||||||
model.maybeWhen(
|
model.maybeWhen(
|
||||||
textFormField: (data, visible) {
|
textFormField: (data, visible, visibleCondition) {
|
||||||
final key = data.key;
|
final key = data.key;
|
||||||
final value = data.value;
|
final value = data.value;
|
||||||
if (key != null && !controllers.containsKey(key)) {
|
if (key != null && !controllers.containsKey(key)) {
|
||||||
@@ -155,12 +176,22 @@ class NewPageLogic extends GetxController {
|
|||||||
|
|
||||||
// Recursively extract from children using pattern matching
|
// Recursively extract from children using pattern matching
|
||||||
model.maybeWhen(
|
model.maybeWhen(
|
||||||
column: (children, spacing, mainAxisSize, crossAxisAlignment, visible, paddingHorizontal, paddingVertical) {
|
column:
|
||||||
for (var child in children) {
|
(
|
||||||
_extractTextFields(child);
|
children,
|
||||||
}
|
spacing,
|
||||||
},
|
mainAxisSize,
|
||||||
row: (children, spacing, mainAxisAlignment, visible) {
|
crossAxisAlignment,
|
||||||
|
visible,
|
||||||
|
paddingHorizontal,
|
||||||
|
paddingVertical,
|
||||||
|
visibleCondition,
|
||||||
|
) {
|
||||||
|
for (var child in children) {
|
||||||
|
_extractTextFields(child);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
row: (children, spacing, mainAxisAlignment, visible, visibleCondition) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
_extractTextFields(child);
|
_extractTextFields(child);
|
||||||
}
|
}
|
||||||
@@ -175,14 +206,14 @@ class NewPageLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stepper: (data, children, visible, index) {
|
stepper: (data, children, visible, visibleCondition) {
|
||||||
if (children != null) {
|
if (children != null) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
_extractTextFields(child);
|
_extractTextFields(child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pageView: (data, children, visible) {
|
pageView: (data, children, visible, visibleCondition) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
_extractTextFields(child);
|
_extractTextFields(child);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ class NewPage extends GetView<NewPageLogic> {
|
|||||||
SizedBox(height: 24.h),
|
SizedBox(height: 24.h),
|
||||||
RElevated(
|
RElevated(
|
||||||
text: 'دکمه نمونه',
|
text: 'دکمه نمونه',
|
||||||
onPressed: () {
|
onPressed: () async {
|
||||||
|
await controller.getSDUIForm();
|
||||||
|
|
||||||
Get.bottomSheet(
|
Get.bottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
enableDrag: true,
|
enableDrag: true,
|
||||||
|
|||||||
@@ -67,14 +67,16 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
paddingHorizontal,
|
paddingHorizontal,
|
||||||
paddingVertical,
|
paddingVertical,
|
||||||
visible,
|
visible,
|
||||||
|
visibleCondition,
|
||||||
) => children.isNotEmpty,
|
) => children.isNotEmpty,
|
||||||
row: (children, spacing, mainAxisAlignment, visible) =>
|
row: (children, spacing, mainAxisAlignment, visible, visibleCondition) =>
|
||||||
children.isNotEmpty,
|
children.isNotEmpty,
|
||||||
cardLabelItem: (data, child, children, visible, visibleCondition) =>
|
cardLabelItem: (data, child, children, visible, visibleCondition) =>
|
||||||
child != null || (children != null && children.isNotEmpty),
|
child != null || (children != null && children.isNotEmpty),
|
||||||
stepper: (data, children, visible, index) =>
|
stepper: (data, children, visible, visibleCondition) =>
|
||||||
children != null && children.isNotEmpty,
|
children != null && children.isNotEmpty,
|
||||||
pageView: (data, children, visible) => children.isNotEmpty,
|
pageView: (data, children, visible, visibleCondition) =>
|
||||||
|
children.isNotEmpty,
|
||||||
orElse: () => false,
|
orElse: () => false,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -114,36 +116,89 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
|
|
||||||
return widget.map(
|
return widget.map(
|
||||||
// ویجتهای فرم
|
// ویجتهای فرم
|
||||||
textFormField: (value) => _buildTextFormField(value.data),
|
textFormField: (value) => _buildWithVisibleCondition(
|
||||||
|
value.visibleCondition,
|
||||||
|
() => _buildTextFormField(value.data),
|
||||||
|
),
|
||||||
cardLabelItem: (value) => _buildCardLabelItem(
|
cardLabelItem: (value) => _buildCardLabelItem(
|
||||||
value.data,
|
value.data,
|
||||||
value.child,
|
value.child,
|
||||||
value.children,
|
value.children,
|
||||||
value.visibleCondition,
|
value.visibleCondition,
|
||||||
),
|
),
|
||||||
chipSelection: (value) => _buildChipSelection(value.data),
|
chipSelection: (value) => _buildWithVisibleCondition(
|
||||||
dropdown: (value) => _buildDropdown(value.data),
|
value.visibleCondition,
|
||||||
imagePicker: (value) => _buildImagePicker(value.data),
|
() => _buildChipSelection(value.data),
|
||||||
|
),
|
||||||
|
dropdown: (value) => _buildWithVisibleCondition(
|
||||||
|
value.visibleCondition,
|
||||||
|
() => _buildDropdown(value.data),
|
||||||
|
),
|
||||||
|
imagePicker: (value) => _buildWithVisibleCondition(
|
||||||
|
value.visibleCondition,
|
||||||
|
() => _buildImagePicker(value.data),
|
||||||
|
),
|
||||||
|
|
||||||
// ویجتهای layout
|
// ویجتهای layout
|
||||||
column: (value) => _buildColumn(
|
column: (value) => _buildWithVisibleCondition(
|
||||||
value.children,
|
value.visibleCondition,
|
||||||
value.spacing,
|
() => _buildColumn(
|
||||||
value.mainAxisSize,
|
value.children,
|
||||||
value.crossAxisAlignment,
|
value.spacing,
|
||||||
value.paddingHorizontal,
|
value.mainAxisSize,
|
||||||
value.paddingVertical,
|
value.crossAxisAlignment,
|
||||||
|
value.paddingHorizontal,
|
||||||
|
value.paddingVertical,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
row: (value) => _buildWithVisibleCondition(
|
||||||
|
value.visibleCondition,
|
||||||
|
() => _buildRow(value.children, value.spacing, value.mainAxisAlignment),
|
||||||
|
),
|
||||||
|
sizedBox: (value) => _buildWithVisibleCondition(
|
||||||
|
value.visibleCondition,
|
||||||
|
() => _buildSizedBox(value.width, value.height),
|
||||||
),
|
),
|
||||||
row: (value) =>
|
|
||||||
_buildRow(value.children, value.spacing, value.mainAxisAlignment),
|
|
||||||
sizedBox: (value) => _buildSizedBox(value.width, value.height),
|
|
||||||
|
|
||||||
// ویجتهای پیچیده
|
// ویجتهای پیچیده
|
||||||
stepper: (value) => _buildStepper(value.data, value.children),
|
stepper: (value) => _buildWithVisibleCondition(
|
||||||
pageView: (value) => _buildPageView(value.data, value.children),
|
value.visibleCondition,
|
||||||
|
() => _buildStepper(value.data, value.children),
|
||||||
|
),
|
||||||
|
pageView: (value) => _buildWithVisibleCondition(
|
||||||
|
value.visibleCondition,
|
||||||
|
() => _buildPageView(value.data, value.children),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Helper method to handle visible_condition for widgets
|
||||||
|
Widget _buildWithVisibleCondition(
|
||||||
|
String? visibleCondition,
|
||||||
|
Widget Function() builder,
|
||||||
|
) {
|
||||||
|
// If no condition or condition is null/empty, always show
|
||||||
|
if (visibleCondition == null || visibleCondition.isEmpty) {
|
||||||
|
return builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
// If state is null, only show first step (0) by default
|
||||||
|
if (state == null) {
|
||||||
|
if (visibleCondition.contains('activeStepperIndex == 0')) {
|
||||||
|
return builder();
|
||||||
|
}
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use Obx for reactive updates
|
||||||
|
return Obx(() {
|
||||||
|
if (!_evaluateVisibleCondition(visibleCondition)) {
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
|
return builder();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildTextFormField(TextFormFieldSDUIModel data) {
|
Widget _buildTextFormField(TextFormFieldSDUIModel data) {
|
||||||
try {
|
try {
|
||||||
// Use provided controller or create a new one
|
// Use provided controller or create a new one
|
||||||
@@ -591,7 +646,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
_StepperInfo? _findStepperInTree(SDUIWidgetModel widgetModel) {
|
_StepperInfo? _findStepperInTree(SDUIWidgetModel widgetModel) {
|
||||||
// Check if current widget is a stepper
|
// Check if current widget is a stepper
|
||||||
return widgetModel.maybeWhen(
|
return widgetModel.maybeWhen(
|
||||||
stepper: (data, children, visible, index) {
|
stepper: (data, children, visible, visibleCondition) {
|
||||||
try {
|
try {
|
||||||
return _StepperInfo(
|
return _StepperInfo(
|
||||||
stepperModel: widgetModel,
|
stepperModel: widgetModel,
|
||||||
@@ -616,6 +671,27 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
visible,
|
visible,
|
||||||
paddingHorizontal,
|
paddingHorizontal,
|
||||||
paddingVertical,
|
paddingVertical,
|
||||||
|
visibleCondition,
|
||||||
|
) {
|
||||||
|
for (var child in children) {
|
||||||
|
final stepperInfo = _findStepperInTree(child);
|
||||||
|
if (stepperInfo != null) {
|
||||||
|
return _StepperInfo(
|
||||||
|
stepperModel: stepperInfo.stepperModel,
|
||||||
|
stepperData: stepperInfo.stepperData,
|
||||||
|
parentModel: widgetModel,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
row:
|
||||||
|
(
|
||||||
|
children,
|
||||||
|
spacing,
|
||||||
|
mainAxisAlignment,
|
||||||
|
visible,
|
||||||
|
visibleCondition,
|
||||||
) {
|
) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
final stepperInfo = _findStepperInTree(child);
|
final stepperInfo = _findStepperInTree(child);
|
||||||
@@ -629,19 +705,6 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
row: (children, spacing, mainAxisAlignment, visible) {
|
|
||||||
for (var child in children) {
|
|
||||||
final stepperInfo = _findStepperInTree(child);
|
|
||||||
if (stepperInfo != null) {
|
|
||||||
return _StepperInfo(
|
|
||||||
stepperModel: stepperInfo.stepperModel,
|
|
||||||
stepperData: stepperInfo.stepperData,
|
|
||||||
parentModel: widgetModel,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
cardLabelItem: (data, child, children, visible, visibleCondition) {
|
cardLabelItem: (data, child, children, visible, visibleCondition) {
|
||||||
if (child != null) {
|
if (child != null) {
|
||||||
final stepperInfo = _findStepperInTree(child);
|
final stepperInfo = _findStepperInTree(child);
|
||||||
@@ -667,7 +730,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
stepper: (data, children, visible, index) {
|
stepper: (data, children, visible, visibleCondition) {
|
||||||
if (children != null) {
|
if (children != null) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
final stepperInfo = _findStepperInTree(child);
|
final stepperInfo = _findStepperInTree(child);
|
||||||
@@ -682,7 +745,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
pageView: (data, children, visible) {
|
pageView: (data, children, visible, visibleCondition) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
final stepperInfo = _findStepperInTree(child);
|
final stepperInfo = _findStepperInTree(child);
|
||||||
if (stepperInfo != null) {
|
if (stepperInfo != null) {
|
||||||
@@ -706,7 +769,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
// Check if current widget is a stepper
|
// Check if current widget is a stepper
|
||||||
count +=
|
count +=
|
||||||
widgetModel.maybeWhen(
|
widgetModel.maybeWhen(
|
||||||
stepper: (data, children, visible, index) => 1,
|
stepper: (data, children, visible, visibleCondition) => 1,
|
||||||
orElse: () => 0,
|
orElse: () => 0,
|
||||||
) ??
|
) ??
|
||||||
0;
|
0;
|
||||||
@@ -723,6 +786,21 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
visible,
|
visible,
|
||||||
paddingHorizontal,
|
paddingHorizontal,
|
||||||
paddingVertical,
|
paddingVertical,
|
||||||
|
visibleCondition,
|
||||||
|
) {
|
||||||
|
int childCount = 0;
|
||||||
|
for (var child in children) {
|
||||||
|
childCount += _countSteppersInTree(child);
|
||||||
|
}
|
||||||
|
return childCount;
|
||||||
|
},
|
||||||
|
row:
|
||||||
|
(
|
||||||
|
children,
|
||||||
|
spacing,
|
||||||
|
mainAxisAlignment,
|
||||||
|
visible,
|
||||||
|
visibleCondition,
|
||||||
) {
|
) {
|
||||||
int childCount = 0;
|
int childCount = 0;
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
@@ -730,13 +808,6 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return childCount;
|
return childCount;
|
||||||
},
|
},
|
||||||
row: (children, spacing, mainAxisAlignment, visible) {
|
|
||||||
int childCount = 0;
|
|
||||||
for (var child in children) {
|
|
||||||
childCount += _countSteppersInTree(child);
|
|
||||||
}
|
|
||||||
return childCount;
|
|
||||||
},
|
|
||||||
cardLabelItem: (data, child, children, visible, visibleCondition) {
|
cardLabelItem: (data, child, children, visible, visibleCondition) {
|
||||||
int childCount = 0;
|
int childCount = 0;
|
||||||
if (child != null) {
|
if (child != null) {
|
||||||
@@ -749,7 +820,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return childCount;
|
return childCount;
|
||||||
},
|
},
|
||||||
stepper: (data, children, visible, index) {
|
stepper: (data, children, visible, visibleCondition) {
|
||||||
int childCount = 0;
|
int childCount = 0;
|
||||||
if (children != null) {
|
if (children != null) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
@@ -758,7 +829,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return childCount;
|
return childCount;
|
||||||
},
|
},
|
||||||
pageView: (data, children, visible) {
|
pageView: (data, children, visible, visibleCondition) {
|
||||||
int childCount = 0;
|
int childCount = 0;
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
childCount += _countSteppersInTree(child);
|
childCount += _countSteppersInTree(child);
|
||||||
@@ -906,6 +977,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
visible,
|
visible,
|
||||||
paddingHorizontal,
|
paddingHorizontal,
|
||||||
paddingVertical,
|
paddingVertical,
|
||||||
|
visibleCondition,
|
||||||
) {
|
) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
stepIndices.addAll(
|
stepIndices.addAll(
|
||||||
@@ -913,7 +985,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
row: (children, spacing, mainAxisAlignment, visible) {
|
row: (children, spacing, mainAxisAlignment, visible, visibleCondition) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
stepIndices.addAll(_collectStepIndicesFromVisibleConditions(child));
|
stepIndices.addAll(_collectStepIndicesFromVisibleConditions(child));
|
||||||
}
|
}
|
||||||
@@ -928,14 +1000,14 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stepper: (data, children, visible, index) {
|
stepper: (data, children, visible, visibleCondition) {
|
||||||
if (children != null) {
|
if (children != null) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
stepIndices.addAll(_collectStepIndicesFromVisibleConditions(child));
|
stepIndices.addAll(_collectStepIndicesFromVisibleConditions(child));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pageView: (data, children, visible) {
|
pageView: (data, children, visible, visibleCondition) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
stepIndices.addAll(_collectStepIndicesFromVisibleConditions(child));
|
stepIndices.addAll(_collectStepIndicesFromVisibleConditions(child));
|
||||||
}
|
}
|
||||||
@@ -968,7 +1040,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
// Helper to check if a model is the stepper we want to exclude
|
// Helper to check if a model is the stepper we want to exclude
|
||||||
bool isStepperToExclude(SDUIWidgetModel model) {
|
bool isStepperToExclude(SDUIWidgetModel model) {
|
||||||
return model.maybeWhen(
|
return model.maybeWhen(
|
||||||
stepper: (data, children, visible, index) {
|
stepper: (data, children, visible, visibleCondition) {
|
||||||
return data.key == stepperKey;
|
return data.key == stepperKey;
|
||||||
},
|
},
|
||||||
orElse: () => false,
|
orElse: () => false,
|
||||||
@@ -1007,12 +1079,13 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
visible,
|
visible,
|
||||||
paddingHorizontal,
|
paddingHorizontal,
|
||||||
paddingVertical,
|
paddingVertical,
|
||||||
|
visibleCondition,
|
||||||
) {
|
) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
if (isStepperToExclude(child)) {
|
if (isStepperToExclude(child)) {
|
||||||
// If stepper has children, build those children
|
// If stepper has children, build those children
|
||||||
child.maybeWhen(
|
child.maybeWhen(
|
||||||
stepper: (data, stepperChildren, visible, index) {
|
stepper: (data, stepperChildren, visible, visibleCondition) {
|
||||||
if (stepperChildren != null) {
|
if (stepperChildren != null) {
|
||||||
int childIndex = 0;
|
int childIndex = 0;
|
||||||
for (var stepperChild in stepperChildren) {
|
for (var stepperChild in stepperChildren) {
|
||||||
@@ -1028,7 +1101,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
) {
|
) {
|
||||||
return extractStepIndex(visibleCondition);
|
return extractStepIndex(visibleCondition);
|
||||||
},
|
},
|
||||||
orElse: () => index != null ? index : childIndex,
|
orElse: () => childIndex,
|
||||||
);
|
);
|
||||||
|
|
||||||
widgets.add(
|
widgets.add(
|
||||||
@@ -1067,71 +1140,85 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return widgets;
|
return widgets;
|
||||||
},
|
},
|
||||||
row: (children, spacing, mainAxisAlignment, visible) {
|
row:
|
||||||
for (var child in children) {
|
(
|
||||||
if (isStepperToExclude(child)) {
|
children,
|
||||||
child.maybeWhen(
|
spacing,
|
||||||
stepper: (data, stepperChildren, visible, index) {
|
mainAxisAlignment,
|
||||||
if (stepperChildren != null) {
|
visible,
|
||||||
for (var stepperChild in stepperChildren) {
|
visibleCondition,
|
||||||
widgets.add(
|
) {
|
||||||
SDUIFormWidget(
|
for (var child in children) {
|
||||||
model: stepperChild,
|
if (isStepperToExclude(child)) {
|
||||||
controllers: controllers,
|
child.maybeWhen(
|
||||||
state: state,
|
stepper:
|
||||||
onStateChanged: onStateChanged,
|
(data, stepperChildren, visible, visibleCondition) {
|
||||||
images: images,
|
if (stepperChildren != null) {
|
||||||
onImagesChanged: onImagesChanged,
|
for (var stepperChild in stepperChildren) {
|
||||||
pageControllers: pageControllers,
|
widgets.add(
|
||||||
),
|
SDUIFormWidget(
|
||||||
);
|
model: stepperChild,
|
||||||
}
|
controllers: controllers,
|
||||||
}
|
state: state,
|
||||||
},
|
onStateChanged: onStateChanged,
|
||||||
orElse: () {},
|
images: images,
|
||||||
);
|
onImagesChanged: onImagesChanged,
|
||||||
continue;
|
pageControllers: pageControllers,
|
||||||
}
|
),
|
||||||
widgets.add(
|
);
|
||||||
SDUIFormWidget(
|
}
|
||||||
model: child,
|
}
|
||||||
controllers: controllers,
|
},
|
||||||
state: state,
|
orElse: () {},
|
||||||
onStateChanged: onStateChanged,
|
);
|
||||||
images: images,
|
continue;
|
||||||
onImagesChanged: onImagesChanged,
|
}
|
||||||
pageControllers: pageControllers,
|
widgets.add(
|
||||||
),
|
SDUIFormWidget(
|
||||||
);
|
model: child,
|
||||||
}
|
controllers: controllers,
|
||||||
return widgets;
|
state: state,
|
||||||
},
|
onStateChanged: onStateChanged,
|
||||||
|
images: images,
|
||||||
|
onImagesChanged: onImagesChanged,
|
||||||
|
pageControllers: pageControllers,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return widgets;
|
||||||
|
},
|
||||||
cardLabelItem: (data, child, children, visible, visibleCondition) {
|
cardLabelItem: (data, child, children, visible, visibleCondition) {
|
||||||
final stepIndex = extractStepIndex(visibleCondition);
|
final stepIndex = extractStepIndex(visibleCondition);
|
||||||
|
|
||||||
if (child != null) {
|
if (child != null) {
|
||||||
if (isStepperToExclude(child)) {
|
if (isStepperToExclude(child)) {
|
||||||
child.maybeWhen(
|
child.maybeWhen(
|
||||||
stepper: (stepperData, stepperChildren, visible, index) {
|
stepper:
|
||||||
if (stepperChildren != null) {
|
(
|
||||||
for (var stepperChild in stepperChildren) {
|
stepperData,
|
||||||
widgets.add(
|
stepperChildren,
|
||||||
wrapWithKeyIfNeeded(
|
visible,
|
||||||
SDUIFormWidget(
|
visibleCondition,
|
||||||
model: stepperChild,
|
) {
|
||||||
controllers: controllers,
|
if (stepperChildren != null) {
|
||||||
state: state,
|
for (var stepperChild in stepperChildren) {
|
||||||
onStateChanged: onStateChanged,
|
widgets.add(
|
||||||
images: images,
|
wrapWithKeyIfNeeded(
|
||||||
onImagesChanged: onImagesChanged,
|
SDUIFormWidget(
|
||||||
pageControllers: pageControllers,
|
model: stepperChild,
|
||||||
),
|
controllers: controllers,
|
||||||
stepIndex,
|
state: state,
|
||||||
),
|
onStateChanged: onStateChanged,
|
||||||
);
|
images: images,
|
||||||
}
|
onImagesChanged: onImagesChanged,
|
||||||
}
|
pageControllers: pageControllers,
|
||||||
},
|
),
|
||||||
|
stepIndex,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
orElse: () {},
|
orElse: () {},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -1155,26 +1242,32 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
if (isStepperToExclude(child)) {
|
if (isStepperToExclude(child)) {
|
||||||
child.maybeWhen(
|
child.maybeWhen(
|
||||||
stepper: (stepperData, stepperChildren, visible, index) {
|
stepper:
|
||||||
if (stepperChildren != null) {
|
(
|
||||||
for (var stepperChild in stepperChildren) {
|
stepperData,
|
||||||
widgets.add(
|
stepperChildren,
|
||||||
wrapWithKeyIfNeeded(
|
visible,
|
||||||
SDUIFormWidget(
|
visibleCondition,
|
||||||
model: stepperChild,
|
) {
|
||||||
controllers: controllers,
|
if (stepperChildren != null) {
|
||||||
state: state,
|
for (var stepperChild in stepperChildren) {
|
||||||
onStateChanged: onStateChanged,
|
widgets.add(
|
||||||
images: images,
|
wrapWithKeyIfNeeded(
|
||||||
onImagesChanged: onImagesChanged,
|
SDUIFormWidget(
|
||||||
pageControllers: pageControllers,
|
model: stepperChild,
|
||||||
),
|
controllers: controllers,
|
||||||
stepIndex,
|
state: state,
|
||||||
),
|
onStateChanged: onStateChanged,
|
||||||
);
|
images: images,
|
||||||
}
|
onImagesChanged: onImagesChanged,
|
||||||
}
|
pageControllers: pageControllers,
|
||||||
},
|
),
|
||||||
|
stepIndex,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
orElse: () {},
|
orElse: () {},
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
@@ -1197,7 +1290,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return widgets;
|
return widgets;
|
||||||
},
|
},
|
||||||
stepper: (data, children, visible, index) {
|
stepper: (data, children, visible, visibleCondition) {
|
||||||
if (children != null) {
|
if (children != null) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
widgets.add(
|
widgets.add(
|
||||||
@@ -1215,27 +1308,33 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
return widgets;
|
return widgets;
|
||||||
},
|
},
|
||||||
pageView: (data, children, visible) {
|
pageView: (data, children, visible, visibleCondition) {
|
||||||
for (var child in children) {
|
for (var child in children) {
|
||||||
if (isStepperToExclude(child)) {
|
if (isStepperToExclude(child)) {
|
||||||
child.maybeWhen(
|
child.maybeWhen(
|
||||||
stepper: (stepperData, stepperChildren, visible, index) {
|
stepper:
|
||||||
if (stepperChildren != null) {
|
(
|
||||||
for (var stepperChild in stepperChildren) {
|
stepperData,
|
||||||
widgets.add(
|
stepperChildren,
|
||||||
SDUIFormWidget(
|
visible,
|
||||||
model: stepperChild,
|
visibleCondition,
|
||||||
controllers: controllers,
|
) {
|
||||||
state: state,
|
if (stepperChildren != null) {
|
||||||
onStateChanged: onStateChanged,
|
for (var stepperChild in stepperChildren) {
|
||||||
images: images,
|
widgets.add(
|
||||||
onImagesChanged: onImagesChanged,
|
SDUIFormWidget(
|
||||||
pageControllers: pageControllers,
|
model: stepperChild,
|
||||||
),
|
controllers: controllers,
|
||||||
);
|
state: state,
|
||||||
}
|
onStateChanged: onStateChanged,
|
||||||
}
|
images: images,
|
||||||
},
|
onImagesChanged: onImagesChanged,
|
||||||
|
pageControllers: pageControllers,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
orElse: () {},
|
orElse: () {},
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
@@ -1280,7 +1379,7 @@ class SDUIFormWidget extends StatelessWidget {
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.black.withOpacity(0.05),
|
color: Colors.black.withAlpha(5),
|
||||||
blurRadius: 10,
|
blurRadius: 10,
|
||||||
offset: Offset(0, -2),
|
offset: Offset(0, -2),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
"info": {
|
"info": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 30.0,
|
||||||
"spacing": 30.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
@@ -12,15 +10,12 @@
|
|||||||
"data": {
|
"data": {
|
||||||
"title": "اطلاعات پایه واحد",
|
"title": "اطلاعات پایه واحد",
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0,
|
"padding_vertical": 11.0
|
||||||
"visible_condition": "activeStepperIndex == 0"
|
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
@@ -66,8 +61,7 @@
|
|||||||
"data": {
|
"data": {
|
||||||
"key": "tenant_name",
|
"key": "tenant_name",
|
||||||
"label": "نام مستاجر",
|
"label": "نام مستاجر",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "tenant_status == 'دارد'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -76,8 +70,7 @@
|
|||||||
"data": {
|
"data": {
|
||||||
"key": "tenant_national_id",
|
"key": "tenant_national_id",
|
||||||
"label": "کد ملی مستاجر",
|
"label": "کد ملی مستاجر",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "tenant_status == 'دارد'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -86,8 +79,7 @@
|
|||||||
"data": {
|
"data": {
|
||||||
"key": "tenant_phone_number",
|
"key": "tenant_phone_number",
|
||||||
"label": "شماره تماس مستاجر",
|
"label": "شماره تماس مستاجر",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "tenant_status == 'دارد'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -128,16 +120,13 @@
|
|||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"data": {
|
||||||
"title": "اطلاعات جوجه ریزی",
|
"title": "اطلاعات جوجه ریزی",
|
||||||
"visible_condition": "activeStepperIndex == 1",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
@@ -146,8 +135,7 @@
|
|||||||
"key": "hatching_date",
|
"key": "hatching_date",
|
||||||
"label": "تاریخ جوجه ریزی",
|
"label": "تاریخ جوجه ریزی",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text",
|
||||||
"readonly": true,
|
"readonly": true
|
||||||
"type": "date_picker"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -157,8 +145,7 @@
|
|||||||
"key": "visit_date",
|
"key": "visit_date",
|
||||||
"label": "تاریخ بازدید",
|
"label": "تاریخ بازدید",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text",
|
||||||
"readonly": true,
|
"readonly": true
|
||||||
"type": "date_picker"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -199,16 +186,13 @@
|
|||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"data": {
|
||||||
"title": "وضعیت عمومی سالن",
|
"title": "وضعیت عمومی سالن",
|
||||||
"visible_condition": "activeStepperIndex == 2",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "image_picker",
|
"type": "image_picker",
|
||||||
@@ -364,16 +348,13 @@
|
|||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"data": {
|
||||||
"title": "تلفات",
|
"title": "تلفات",
|
||||||
"visible_condition": "activeStepperIndex == 3",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
@@ -420,8 +401,7 @@
|
|||||||
"data": {
|
"data": {
|
||||||
"key": "other_cause_of_unusual_casualties",
|
"key": "other_cause_of_unusual_casualties",
|
||||||
"label": "علت تلفات غیرعادی",
|
"label": "علت تلفات غیرعادی",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "cause_of_unusual_casualties == 'سایر (شرح…)'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -449,8 +429,7 @@
|
|||||||
"data": {
|
"data": {
|
||||||
"key": "other_type_of_disease",
|
"key": "other_type_of_disease",
|
||||||
"label": "نوع بیماری",
|
"label": "نوع بیماری",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "type_of_disease == 'سایر (شرح)'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -475,7 +454,6 @@
|
|||||||
"key": "sample_type",
|
"key": "sample_type",
|
||||||
"label": "نوع نمونه",
|
"label": "نوع نمونه",
|
||||||
"selectedIndex": -1,
|
"selectedIndex": -1,
|
||||||
"visible_condition": "sampling_done == 'انجام شد'",
|
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -503,16 +481,13 @@
|
|||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"data": {
|
||||||
"title": "مسئول فنی",
|
"title": "مسئول فنی",
|
||||||
"visible_condition": "activeStepperIndex == 4",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
@@ -540,16 +515,13 @@
|
|||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"data": {
|
||||||
"title": "نهاده و خوراک",
|
"title": "نهاده و خوراک",
|
||||||
"visible_condition": "activeStepperIndex == 5",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
@@ -569,11 +541,11 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "input_status == 'وابسته'",
|
||||||
"data": {
|
"data": {
|
||||||
"key": "company_name",
|
"key": "company_name",
|
||||||
"label": "نام کارخانه",
|
"label": "نام کارخانه",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "input_status == 'وابسته'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -582,13 +554,13 @@
|
|||||||
"data": {
|
"data": {
|
||||||
"key": "tracking_code",
|
"key": "tracking_code",
|
||||||
"label": "شناسه خرید یا کد پیگیری",
|
"label": "شناسه خرید یا کد پیگیری",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "input_status == 'مستقل'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "input_status == 'مستقل'",
|
||||||
"data": {
|
"data": {
|
||||||
"key": "input_inventory_until_visit",
|
"key": "input_inventory_until_visit",
|
||||||
"label": "موجودی نهاده مصرفی تا روز بازدید (کیلوگرم)",
|
"label": "موجودی نهاده مصرفی تا روز بازدید (کیلوگرم)",
|
||||||
@@ -658,16 +630,13 @@
|
|||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"data": {
|
||||||
"title": "زیرساخت و انرژی",
|
"title": "زیرساخت و انرژی",
|
||||||
"visible_condition": "activeStepperIndex == 6",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
@@ -812,16 +781,13 @@
|
|||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"data": {
|
||||||
"title": "نیروی انسانی",
|
"title": "نیروی انسانی",
|
||||||
"visible_condition": "activeStepperIndex == 7",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
@@ -902,16 +868,13 @@
|
|||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"data": {
|
||||||
"title": "تسهیلات و حمایتها",
|
"title": "تسهیلات و حمایتها",
|
||||||
"visible_condition": "activeStepperIndex == 8",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
@@ -954,8 +917,7 @@
|
|||||||
"key": "payment_year",
|
"key": "payment_year",
|
||||||
"label": "سال دریافت",
|
"label": "سال دریافت",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text",
|
||||||
"readonly": true,
|
"readonly": true
|
||||||
"type": "date_picker"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -998,16 +960,13 @@
|
|||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"data": {
|
||||||
"title": "مستندات",
|
"title": "مستندات",
|
||||||
"visible_condition": "activeStepperIndex == 9",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "image_picker",
|
"type": "image_picker",
|
||||||
@@ -1042,16 +1001,13 @@
|
|||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"data": {
|
||||||
"title": "جمعبندی بازرس",
|
"title": "جمعبندی بازرس",
|
||||||
"visible_condition": "activeStepperIndex == 10",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"spacing": 10.0,
|
||||||
"spacing": 10.0
|
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "chip_selection",
|
"type": "chip_selection",
|
||||||
|
|||||||
@@ -2,38 +2,38 @@
|
|||||||
"info": {
|
"info": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 30.0
|
"spacing": 30.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "stepper",
|
"type": "stepper",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "activeStepperIndex",
|
"key": "activeStepperIndex",
|
||||||
"total_steps": 7,
|
"total_steps": 11,
|
||||||
"active_step": 0
|
"active_step": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 0",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "اطلاعات پایه واحد",
|
"title": "اطلاعات پایه واحد",
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0,
|
"padding_vertical": 11.0
|
||||||
"visible_condition": "activeStepperIndex == 0"
|
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "unit_name",
|
"key": "unit_name",
|
||||||
"label": "نام واحد مرغداری",
|
"label": "نام واحد مرغداری",
|
||||||
@@ -44,6 +44,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "breeding_unique_id",
|
"key": "breeding_unique_id",
|
||||||
"label": "کد یکتا / شناسه واحد",
|
"label": "کد یکتا / شناسه واحد",
|
||||||
@@ -54,6 +55,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "health_license",
|
"key": "health_license",
|
||||||
"label": "پروانه بهداشتی",
|
"label": "پروانه بهداشتی",
|
||||||
@@ -63,6 +65,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "tenant_status",
|
"key": "tenant_status",
|
||||||
"label": "وضعیت مستاجر",
|
"label": "وضعیت مستاجر",
|
||||||
@@ -72,36 +75,37 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "tenant_status == 'دارد'",
|
||||||
"data": {
|
"data": {
|
||||||
"key": "tenant_name",
|
"key": "tenant_name",
|
||||||
"label": "نام مستاجر",
|
"label": "نام مستاجر",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "tenant_status == 'دارد'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "tenant_status == 'دارد'",
|
||||||
"data": {
|
"data": {
|
||||||
"key": "tenant_national_id",
|
"key": "tenant_national_id",
|
||||||
"label": "کد ملی مستاجر",
|
"label": "کد ملی مستاجر",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "tenant_status == 'دارد'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "tenant_status == 'دارد'",
|
||||||
"data": {
|
"data": {
|
||||||
"key": "tenant_phone_number",
|
"key": "tenant_phone_number",
|
||||||
"label": "شماره تماس مستاجر",
|
"label": "شماره تماس مستاجر",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "tenant_status == 'دارد'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "owner_national_code",
|
"key": "owner_national_code",
|
||||||
"label": "کد ملی بهرهبردار",
|
"label": "کد ملی بهرهبردار",
|
||||||
@@ -112,6 +116,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "owner_phone_number",
|
"key": "owner_phone_number",
|
||||||
"label": "شماره تماس بهرهبردار",
|
"label": "شماره تماس بهرهبردار",
|
||||||
@@ -122,6 +127,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "total_capacity",
|
"key": "total_capacity",
|
||||||
"label": "ظرفیت اسمی سالنها",
|
"label": "ظرفیت اسمی سالنها",
|
||||||
@@ -135,44 +141,44 @@
|
|||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 1",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "اطلاعات جوجه ریزی",
|
"title": "اطلاعات جوجه ریزی",
|
||||||
"visible_condition": "activeStepperIndex == 1",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "hatching_date",
|
"key": "hatching_date",
|
||||||
"label": "تاریخ جوجه ریزی",
|
"label": "تاریخ جوجه ریزی",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text",
|
||||||
"readonly": true,
|
"readonly": true
|
||||||
"type": "date_picker"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "visit_date",
|
"key": "visit_date",
|
||||||
"label": "تاریخ بازدید",
|
"label": "تاریخ بازدید",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text",
|
||||||
"readonly": true,
|
"readonly": true
|
||||||
"type": "date_picker"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "hatching_count",
|
"key": "hatching_count",
|
||||||
"label": "تعداد جوجهریزی اولیه",
|
"label": "تعداد جوجهریزی اولیه",
|
||||||
@@ -184,6 +190,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "hatching_breed",
|
"key": "hatching_breed",
|
||||||
"label": "نوع نژاد",
|
"label": "نوع نژاد",
|
||||||
@@ -193,6 +200,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "hatching_average_weight",
|
"key": "hatching_average_weight",
|
||||||
"label": "میانگین وزن جوجه",
|
"label": "میانگین وزن جوجه",
|
||||||
@@ -206,22 +214,22 @@
|
|||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 2",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "وضعیت عمومی سالن",
|
"title": "وضعیت عمومی سالن",
|
||||||
"visible_condition": "activeStepperIndex == 2",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "image_picker",
|
"type": "image_picker",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "pultry_images",
|
"key": "pultry_images",
|
||||||
"label": "تعداد موجود فعلی"
|
"label": "تعداد موجود فعلی"
|
||||||
@@ -230,6 +238,7 @@
|
|||||||
{
|
{
|
||||||
"type": "chip_selection",
|
"type": "chip_selection",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "sanitary_condition_of_the_hall",
|
"key": "sanitary_condition_of_the_hall",
|
||||||
"label": "وضعیت بهداشتی سالن",
|
"label": "وضعیت بهداشتی سالن",
|
||||||
@@ -261,6 +270,7 @@
|
|||||||
{
|
{
|
||||||
"type": "chip_selection",
|
"type": "chip_selection",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "ventilation_status",
|
"key": "ventilation_status",
|
||||||
"label": "وضعیت تهویه",
|
"label": "وضعیت تهویه",
|
||||||
@@ -292,6 +302,7 @@
|
|||||||
{
|
{
|
||||||
"type": "chip_selection",
|
"type": "chip_selection",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "bedding_status",
|
"key": "bedding_status",
|
||||||
"label": "وضعیت بستر",
|
"label": "وضعیت بستر",
|
||||||
@@ -318,6 +329,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "hatching_temperature",
|
"key": "hatching_temperature",
|
||||||
"label": "دمای سالن",
|
"label": "دمای سالن",
|
||||||
@@ -327,6 +339,7 @@
|
|||||||
{
|
{
|
||||||
"type": "chip_selection",
|
"type": "chip_selection",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "water_quality",
|
"key": "water_quality",
|
||||||
"label": "آب مصرفی",
|
"label": "آب مصرفی",
|
||||||
@@ -358,6 +371,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "water_hardness",
|
"key": "water_hardness",
|
||||||
"label": "درصد سختی آب (PPM)",
|
"label": "درصد سختی آب (PPM)",
|
||||||
@@ -371,22 +385,22 @@
|
|||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 3",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "تلفات",
|
"title": "تلفات",
|
||||||
"visible_condition": "activeStepperIndex == 3",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "normal_losses",
|
"key": "normal_losses",
|
||||||
"label": "تعداد تلفات عادی دوره",
|
"label": "تعداد تلفات عادی دوره",
|
||||||
@@ -397,6 +411,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "abnormal_losses",
|
"key": "abnormal_losses",
|
||||||
"label": "تلفات غیرعادی",
|
"label": "تلفات غیرعادی",
|
||||||
@@ -407,6 +422,7 @@
|
|||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "cause_of_unusual_casualties",
|
"key": "cause_of_unusual_casualties",
|
||||||
"label": "علت تلفات غیرعادی",
|
"label": "علت تلفات غیرعادی",
|
||||||
@@ -426,16 +442,17 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "cause_of_unusual_casualties == 'سایر (شرح…)'",
|
||||||
"data": {
|
"data": {
|
||||||
"key": "other_cause_of_unusual_casualties",
|
"key": "other_cause_of_unusual_casualties",
|
||||||
"label": "علت تلفات غیرعادی",
|
"label": "علت تلفات غیرعادی",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "cause_of_unusual_casualties == 'سایر (شرح…)'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "type_of_disease",
|
"key": "type_of_disease",
|
||||||
"label": "نوع بیماری تشخیص دادهشده / مشکوک",
|
"label": "نوع بیماری تشخیص دادهشده / مشکوک",
|
||||||
@@ -455,16 +472,17 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "type_of_disease == 'سایر (شرح)'",
|
||||||
"data": {
|
"data": {
|
||||||
"key": "other_type_of_disease",
|
"key": "other_type_of_disease",
|
||||||
"label": "نوع بیماری",
|
"label": "نوع بیماری",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "type_of_disease == 'سایر (شرح)'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "sampling_done",
|
"key": "sampling_done",
|
||||||
"label": "نمونهبرداری انجامشده",
|
"label": "نمونهبرداری انجامشده",
|
||||||
@@ -480,11 +498,11 @@
|
|||||||
{
|
{
|
||||||
"type": "chip_selection",
|
"type": "chip_selection",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "sampling_done == 'انجام شد'",
|
||||||
"data": {
|
"data": {
|
||||||
"key": "sample_type",
|
"key": "sample_type",
|
||||||
"label": "نوع نمونه",
|
"label": "نوع نمونه",
|
||||||
"selectedIndex": -1,
|
"selectedIndex": -1,
|
||||||
"visible_condition": "sampling_done == 'انجام شد'",
|
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
"index": 0,
|
"index": 0,
|
||||||
@@ -510,22 +528,22 @@
|
|||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 4",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "مسئول فنی",
|
"title": "مسئول فنی",
|
||||||
"visible_condition": "activeStepperIndex == 4",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "technical_health_officer_name",
|
"key": "technical_health_officer_name",
|
||||||
"label": "نام مسئول فنی بهداشتی",
|
"label": "نام مسئول فنی بهداشتی",
|
||||||
@@ -535,6 +553,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "technical_engineering_officer_name",
|
"key": "technical_engineering_officer_name",
|
||||||
"label": "نام مسئول فنی نظام مهندسی",
|
"label": "نام مسئول فنی نظام مهندسی",
|
||||||
@@ -547,22 +566,22 @@
|
|||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 5",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "نهاده و خوراک",
|
"title": "نهاده و خوراک",
|
||||||
"visible_condition": "activeStepperIndex == 5",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "input_status",
|
"key": "input_status",
|
||||||
"label": "وضعیت نهاده",
|
"label": "وضعیت نهاده",
|
||||||
@@ -578,26 +597,27 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "input_status == 'وابسته'",
|
||||||
"data": {
|
"data": {
|
||||||
"key": "company_name",
|
"key": "company_name",
|
||||||
"label": "نام کارخانه",
|
"label": "نام کارخانه",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "input_status == 'وابسته'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "input_status == 'مستقل'",
|
||||||
"data": {
|
"data": {
|
||||||
"key": "tracking_code",
|
"key": "tracking_code",
|
||||||
"label": "شناسه خرید یا کد پیگیری",
|
"label": "شناسه خرید یا کد پیگیری",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text"
|
||||||
"visible_condition": "input_status == 'مستقل'"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "input_inventory_until_visit",
|
"key": "input_inventory_until_visit",
|
||||||
"label": "موجودی نهاده مصرفی تا روز بازدید (کیلوگرم)",
|
"label": "موجودی نهاده مصرفی تا روز بازدید (کیلوگرم)",
|
||||||
@@ -608,6 +628,7 @@
|
|||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "type_of_grain",
|
"key": "type_of_grain",
|
||||||
"label": "نوع دان",
|
"label": "نوع دان",
|
||||||
@@ -626,6 +647,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "input_inventory_in_warehouse",
|
"key": "input_inventory_in_warehouse",
|
||||||
"label": "موجودی نهاده موجود در انبار (کیلوگرم)",
|
"label": "موجودی نهاده موجود در انبار (کیلوگرم)",
|
||||||
@@ -636,6 +658,7 @@
|
|||||||
{
|
{
|
||||||
"type": "chip_selection",
|
"type": "chip_selection",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "grain_quality",
|
"key": "grain_quality",
|
||||||
"label": "کیفیت دانه",
|
"label": "کیفیت دانه",
|
||||||
@@ -665,22 +688,22 @@
|
|||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 6",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "زیرساخت و انرژی",
|
"title": "زیرساخت و انرژی",
|
||||||
"visible_condition": "activeStepperIndex == 6",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "generator_type",
|
"key": "generator_type",
|
||||||
"label": "نوع ژنراتور",
|
"label": "نوع ژنراتور",
|
||||||
@@ -690,6 +713,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "generator_model",
|
"key": "generator_model",
|
||||||
"label": "مدل ژنراتور",
|
"label": "مدل ژنراتور",
|
||||||
@@ -699,6 +723,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "generator_count",
|
"key": "generator_count",
|
||||||
"label": "تعداد ژنراتور",
|
"label": "تعداد ژنراتور",
|
||||||
@@ -709,6 +734,7 @@
|
|||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "fuel_type",
|
"key": "fuel_type",
|
||||||
"label": "نوع سوخت",
|
"label": "نوع سوخت",
|
||||||
@@ -724,6 +750,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "generator_capacity",
|
"key": "generator_capacity",
|
||||||
"label": "ظرفیت (KVA)",
|
"label": "ظرفیت (KVA)",
|
||||||
@@ -734,6 +761,7 @@
|
|||||||
{
|
{
|
||||||
"type": "chip_selection",
|
"type": "chip_selection",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "generator_operating_status",
|
"key": "generator_operating_status",
|
||||||
"label": "وضعیت عملکرد ژنراتور",
|
"label": "وضعیت عملکرد ژنراتور",
|
||||||
@@ -760,6 +788,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "emergency_fuel_inventory",
|
"key": "emergency_fuel_inventory",
|
||||||
"label": "میزان موجودی سوخت اضطراری (لیتر)",
|
"label": "میزان موجودی سوخت اضطراری (لیتر)",
|
||||||
@@ -770,6 +799,7 @@
|
|||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "power_cut_history",
|
"key": "power_cut_history",
|
||||||
"label": "سابقه قطعی برق دوره جاری",
|
"label": "سابقه قطعی برق دوره جاری",
|
||||||
@@ -785,6 +815,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "power_cut_duration",
|
"key": "power_cut_duration",
|
||||||
"label": "مدت قطعی",
|
"label": "مدت قطعی",
|
||||||
@@ -795,6 +826,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "power_cut_hour",
|
"key": "power_cut_hour",
|
||||||
"label": "ساعت قطعی",
|
"label": "ساعت قطعی",
|
||||||
@@ -805,6 +837,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "additional_notes",
|
"key": "additional_notes",
|
||||||
"label": "توضیحات تکمیلی",
|
"label": "توضیحات تکمیلی",
|
||||||
@@ -819,22 +852,22 @@
|
|||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 7",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "نیروی انسانی",
|
"title": "نیروی انسانی",
|
||||||
"visible_condition": "activeStepperIndex == 7",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "employed_workers_count",
|
"key": "employed_workers_count",
|
||||||
"label": "تعداد افراد شاغل",
|
"label": "تعداد افراد شاغل",
|
||||||
@@ -845,6 +878,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "native_workers_count",
|
"key": "native_workers_count",
|
||||||
"label": "تعداد افراد بومی",
|
"label": "تعداد افراد بومی",
|
||||||
@@ -855,6 +889,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "non_native_workers_count",
|
"key": "non_native_workers_count",
|
||||||
"label": "تعداد افراد غیر بومی",
|
"label": "تعداد افراد غیر بومی",
|
||||||
@@ -865,6 +900,7 @@
|
|||||||
{
|
{
|
||||||
"type": "chip_selection",
|
"type": "chip_selection",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "worker_contract_status",
|
"key": "worker_contract_status",
|
||||||
"label": "وضعیت قرارداد کارگران",
|
"label": "وضعیت قرارداد کارگران",
|
||||||
@@ -891,6 +927,7 @@
|
|||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "training_status",
|
"key": "training_status",
|
||||||
"label": "آموزشدیده در حوزه بهداشت و امنیت زیستی",
|
"label": "آموزشدیده در حوزه بهداشت و امنیت زیستی",
|
||||||
@@ -909,22 +946,22 @@
|
|||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 8",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "تسهیلات و حمایتها",
|
"title": "تسهیلات و حمایتها",
|
||||||
"visible_condition": "activeStepperIndex == 8",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "has_facilities",
|
"key": "has_facilities",
|
||||||
"label": "تسهیلات دریافتی فعال",
|
"label": "تسهیلات دریافتی فعال",
|
||||||
@@ -940,6 +977,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "facility_type",
|
"key": "facility_type",
|
||||||
"label": "نوع تسهیلات",
|
"label": "نوع تسهیلات",
|
||||||
@@ -949,6 +987,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "facility_amount",
|
"key": "facility_amount",
|
||||||
"label": "مبلغ",
|
"label": "مبلغ",
|
||||||
@@ -959,17 +998,18 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "payment_year",
|
"key": "payment_year",
|
||||||
"label": "سال دریافت",
|
"label": "سال دریافت",
|
||||||
"keyboard_type": "text",
|
"keyboard_type": "text",
|
||||||
"readonly": true,
|
"readonly": true
|
||||||
"type": "date_picker"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "overdue_status",
|
"key": "overdue_status",
|
||||||
"label": "وضعیت بازپرداخت",
|
"label": "وضعیت بازپرداخت",
|
||||||
@@ -985,6 +1025,7 @@
|
|||||||
{
|
{
|
||||||
"type": "dropdown",
|
"type": "dropdown",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "new_beneficiary_request",
|
"key": "new_beneficiary_request",
|
||||||
"label": "درخواست جدید بهره بردار",
|
"label": "درخواست جدید بهره بردار",
|
||||||
@@ -1005,22 +1046,22 @@
|
|||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 9",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "مستندات",
|
"title": "مستندات",
|
||||||
"visible_condition": "activeStepperIndex == 9",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "image_picker",
|
"type": "image_picker",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "hall_images",
|
"key": "hall_images",
|
||||||
"label": "ثبت عکس سالن (حداقل ۳ زاویه)",
|
"label": "ثبت عکس سالن (حداقل ۳ زاویه)",
|
||||||
@@ -1030,6 +1071,7 @@
|
|||||||
{
|
{
|
||||||
"type": "image_picker",
|
"type": "image_picker",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "input_warehouse_images",
|
"key": "input_warehouse_images",
|
||||||
"label": "ثبت عکس انبار نهادهها"
|
"label": "ثبت عکس انبار نهادهها"
|
||||||
@@ -1038,6 +1080,7 @@
|
|||||||
{
|
{
|
||||||
"type": "image_picker",
|
"type": "image_picker",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "losses_images",
|
"key": "losses_images",
|
||||||
"label": "ثبت عکس تلفات"
|
"label": "ثبت عکس تلفات"
|
||||||
@@ -1049,22 +1092,22 @@
|
|||||||
{
|
{
|
||||||
"type": "card_label_item",
|
"type": "card_label_item",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": "activeStepperIndex == 10",
|
||||||
"data": {
|
"data": {
|
||||||
"title": "جمعبندی بازرس",
|
"title": "جمعبندی بازرس",
|
||||||
"visible_condition": "activeStepperIndex == 10",
|
|
||||||
"padding_horizontal": 12.0,
|
"padding_horizontal": 12.0,
|
||||||
"padding_vertical": 11.0
|
"padding_vertical": 11.0
|
||||||
},
|
},
|
||||||
"child": {
|
"child": {
|
||||||
"type": "column",
|
"type": "column",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"data": {
|
"visible_condition": null,
|
||||||
"spacing": 10.0
|
"spacing": 10.0,
|
||||||
},
|
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"type": "chip_selection",
|
"type": "chip_selection",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "inspector_conclusion",
|
"key": "inspector_conclusion",
|
||||||
"label": "وضعیت کلی واحد",
|
"label": "وضعیت کلی واحد",
|
||||||
@@ -1091,6 +1134,7 @@
|
|||||||
{
|
{
|
||||||
"type": "text_form_field",
|
"type": "text_form_field",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
|
"visible_condition": null,
|
||||||
"data": {
|
"data": {
|
||||||
"key": "inspector_conclusion_description",
|
"key": "inspector_conclusion_description",
|
||||||
"label": "توصیهها / اخطارها / اقدامات اصلاحی ...",
|
"label": "توصیهها / اخطارها / اقدامات اصلاحی ...",
|
||||||
|
|||||||
@@ -10,36 +10,47 @@ import 'package:rasadyar_chicken/presentation/widget/sdui/widgets/page_view/mode
|
|||||||
part 'sdui_widget.freezed.dart';
|
part 'sdui_widget.freezed.dart';
|
||||||
part 'sdui_widget.g.dart';
|
part 'sdui_widget.g.dart';
|
||||||
|
|
||||||
|
// استفاده از snake_case برای تبدیل خودکار نامها (مثلاً text_form_field به textFormField)
|
||||||
@Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)
|
@Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)
|
||||||
sealed class SDUIWidgetModel with _$SDUIWidgetModel {
|
sealed class SDUIWidgetModel with _$SDUIWidgetModel {
|
||||||
|
// ۱. فیلد متنی
|
||||||
const factory SDUIWidgetModel.textFormField({
|
const factory SDUIWidgetModel.textFormField({
|
||||||
required TextFormFieldSDUIModel data,
|
required TextFormFieldSDUIModel data,
|
||||||
@Default(true) bool visible,
|
@Default(true) bool visible,
|
||||||
|
String? visibleCondition,
|
||||||
}) = _TextFormField;
|
}) = _TextFormField;
|
||||||
|
|
||||||
|
// ۲. کارت لیبلدار
|
||||||
const factory SDUIWidgetModel.cardLabelItem({
|
const factory SDUIWidgetModel.cardLabelItem({
|
||||||
required CardLabelItemData data,
|
required CardLabelItemData data,
|
||||||
SDUIWidgetModel? child,
|
SDUIWidgetModel? child,
|
||||||
List<SDUIWidgetModel>? children,
|
List<SDUIWidgetModel>? children,
|
||||||
@Default(true) bool visible,
|
@Default(true) bool visible,
|
||||||
String? visibleCondition,
|
String? visibleCondition,
|
||||||
}) = _CardLabelItem;
|
}) = _CardLabelItem;
|
||||||
|
|
||||||
|
// ۳. انتخاب گزینهای
|
||||||
const factory SDUIWidgetModel.chipSelection({
|
const factory SDUIWidgetModel.chipSelection({
|
||||||
required ChipSelectionSDUIModel data,
|
required ChipSelectionSDUIModel data,
|
||||||
@Default(true) bool visible,
|
@Default(true) bool visible,
|
||||||
|
String? visibleCondition,
|
||||||
}) = _ChipSelection;
|
}) = _ChipSelection;
|
||||||
|
|
||||||
|
// ۴. لیست کشویی
|
||||||
const factory SDUIWidgetModel.dropdown({
|
const factory SDUIWidgetModel.dropdown({
|
||||||
required DropdownSDUIModel data,
|
required DropdownSDUIModel data,
|
||||||
@Default(true) bool visible,
|
@Default(true) bool visible,
|
||||||
|
String? visibleCondition,
|
||||||
}) = _Dropdown;
|
}) = _Dropdown;
|
||||||
|
|
||||||
|
// ۵. انتخاب عکس
|
||||||
const factory SDUIWidgetModel.imagePicker({
|
const factory SDUIWidgetModel.imagePicker({
|
||||||
required ImagePickerSDUIModel data,
|
required ImagePickerSDUIModel data,
|
||||||
@Default(true) bool visible,
|
@Default(true) bool visible,
|
||||||
|
String? visibleCondition,
|
||||||
}) = _ImagePicker;
|
}) = _ImagePicker;
|
||||||
|
|
||||||
|
// ۶. ستون (Container ویجت - فاقد شیء data در JSON جدید)
|
||||||
const factory SDUIWidgetModel.column({
|
const factory SDUIWidgetModel.column({
|
||||||
required List<SDUIWidgetModel> children,
|
required List<SDUIWidgetModel> children,
|
||||||
@Default(0.0) double spacing,
|
@Default(0.0) double spacing,
|
||||||
@@ -48,103 +59,44 @@ sealed class SDUIWidgetModel with _$SDUIWidgetModel {
|
|||||||
@Default(0.0) double paddingVertical,
|
@Default(0.0) double paddingVertical,
|
||||||
@Default('center') String crossAxisAlignment,
|
@Default('center') String crossAxisAlignment,
|
||||||
@Default(true) bool visible,
|
@Default(true) bool visible,
|
||||||
|
String? visibleCondition,
|
||||||
}) = _Column;
|
}) = _Column;
|
||||||
|
|
||||||
|
// ۷. ردیف (Container ویجت - فاقد شیء data در JSON جدید)
|
||||||
const factory SDUIWidgetModel.row({
|
const factory SDUIWidgetModel.row({
|
||||||
required List<SDUIWidgetModel> children,
|
required List<SDUIWidgetModel> children,
|
||||||
@Default(0.0) double spacing,
|
@Default(0.0) double spacing,
|
||||||
@Default('start') String mainAxisAlignment,
|
@Default('start') String mainAxisAlignment,
|
||||||
@Default(true) bool visible,
|
@Default(true) bool visible,
|
||||||
|
String? visibleCondition,
|
||||||
}) = _Row;
|
}) = _Row;
|
||||||
|
|
||||||
const factory SDUIWidgetModel.sizedBox({
|
// ۸. استپر
|
||||||
double? width,
|
|
||||||
double? height,
|
|
||||||
@Default(true) bool visible,
|
|
||||||
}) = _SizedBox;
|
|
||||||
|
|
||||||
const factory SDUIWidgetModel.stepper({
|
const factory SDUIWidgetModel.stepper({
|
||||||
required StepperSDUIModel data,
|
required StepperSDUIModel data,
|
||||||
List<SDUIWidgetModel>? children,
|
List<SDUIWidgetModel>? children,
|
||||||
@Default(true) bool visible,
|
@Default(true) bool visible,
|
||||||
int? index,
|
String? visibleCondition,
|
||||||
}) = _Stepper;
|
}) = _Stepper;
|
||||||
|
|
||||||
|
// ۹. پیج ویو
|
||||||
const factory SDUIWidgetModel.pageView({
|
const factory SDUIWidgetModel.pageView({
|
||||||
required PageViewSDUIModel data,
|
required PageViewSDUIModel data,
|
||||||
required List<SDUIWidgetModel> children,
|
required List<SDUIWidgetModel> children,
|
||||||
@Default(true) bool visible,
|
@Default(true) bool visible,
|
||||||
|
String? visibleCondition,
|
||||||
}) = _PageView;
|
}) = _PageView;
|
||||||
|
|
||||||
|
// ۱۰. جعبه با اندازه ثابت
|
||||||
|
const factory SDUIWidgetModel.sizedBox({
|
||||||
|
double? width,
|
||||||
|
double? height,
|
||||||
|
@Default(true) bool visible,
|
||||||
|
String? visibleCondition,
|
||||||
|
}) = _SizedBox;
|
||||||
|
|
||||||
|
// تبدیل مستقیم JSON به مدل بدون هیچ واسطهای
|
||||||
factory SDUIWidgetModel.fromJson(Map<String, dynamic> json) =>
|
factory SDUIWidgetModel.fromJson(Map<String, dynamic> json) =>
|
||||||
_$SDUIWidgetModelFromJson(json);
|
_$SDUIWidgetModelFromJson(json);
|
||||||
|
|
||||||
factory SDUIWidgetModel.fromRawJson(Map<String, dynamic> json) {
|
|
||||||
final type = json['type'] as String?;
|
|
||||||
if (type == null) return const SDUIWidgetModel.sizedBox(visible: false);
|
|
||||||
|
|
||||||
final preparedJson = Map<String, dynamic>.from(json);
|
|
||||||
|
|
||||||
_prepareData(type, preparedJson);
|
|
||||||
|
|
||||||
return SDUIWidgetModel.fromJson(preparedJson);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void _prepareData(String type, Map<String, dynamic> json) {
|
|
||||||
final rawData = json['data'];
|
|
||||||
|
|
||||||
// Handle stepper with List data (children)
|
|
||||||
if (type == 'stepper' && rawData is List) {
|
|
||||||
// Convert List data to children
|
|
||||||
json['children'] = rawData;
|
|
||||||
// Create default stepper data
|
|
||||||
json['data'] = {'key': 'stepper_key', 'activeStep': 0};
|
|
||||||
// Recursively prepare children
|
|
||||||
for (var i = 0; i < rawData.length; i++) {
|
|
||||||
if (rawData[i] is Map<String, dynamic>) {
|
|
||||||
final childJson = rawData[i] as Map<String, dynamic>;
|
|
||||||
final childType = childJson['type'] as String?;
|
|
||||||
if (childType != null) {
|
|
||||||
_prepareData(childType, childJson);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle column, row, sized_box with Map data
|
|
||||||
if (['column', 'row', 'sized_box'].contains(type) && rawData is Map) {
|
|
||||||
json.addAll(Map<String, dynamic>.from(rawData));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle visible_condition for card_label_item
|
|
||||||
if (type == 'card_label_item' && rawData is Map) {
|
|
||||||
final dataMap = Map<String, dynamic>.from(rawData);
|
|
||||||
if (dataMap.containsKey('visible_condition')) {
|
|
||||||
json['visible_condition'] = dataMap['visible_condition'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recursively prepare children for all widget types
|
|
||||||
if (json['children'] is List) {
|
|
||||||
final children = json['children'] as List;
|
|
||||||
for (var i = 0; i < children.length; i++) {
|
|
||||||
if (children[i] is Map<String, dynamic>) {
|
|
||||||
final childJson = children[i] as Map<String, dynamic>;
|
|
||||||
final childType = childJson['type'] as String?;
|
|
||||||
if (childType != null) {
|
|
||||||
_prepareData(childType, childJson);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recursively prepare child (singular) for card_label_item
|
|
||||||
if (json['child'] is Map<String, dynamic>) {
|
|
||||||
final childJson = json['child'] as Map<String, dynamic>;
|
|
||||||
final childType = childJson['type'] as String?;
|
|
||||||
if (childType != null) {
|
|
||||||
_prepareData(childType, childJson);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,10 +42,6 @@ SDUIWidgetModel _$SDUIWidgetModelFromJson(
|
|||||||
case 'row':
|
case 'row':
|
||||||
return _Row.fromJson(
|
return _Row.fromJson(
|
||||||
json
|
json
|
||||||
);
|
|
||||||
case 'sized_box':
|
|
||||||
return _SizedBox.fromJson(
|
|
||||||
json
|
|
||||||
);
|
);
|
||||||
case 'stepper':
|
case 'stepper':
|
||||||
return _Stepper.fromJson(
|
return _Stepper.fromJson(
|
||||||
@@ -55,6 +51,10 @@ SDUIWidgetModel _$SDUIWidgetModelFromJson(
|
|||||||
return _PageView.fromJson(
|
return _PageView.fromJson(
|
||||||
json
|
json
|
||||||
);
|
);
|
||||||
|
case 'sized_box':
|
||||||
|
return _SizedBox.fromJson(
|
||||||
|
json
|
||||||
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw CheckedFromJsonException(
|
throw CheckedFromJsonException(
|
||||||
@@ -70,7 +70,7 @@ SDUIWidgetModel _$SDUIWidgetModelFromJson(
|
|||||||
/// @nodoc
|
/// @nodoc
|
||||||
mixin _$SDUIWidgetModel {
|
mixin _$SDUIWidgetModel {
|
||||||
|
|
||||||
bool get visible;
|
bool get visible; String? get visibleCondition;
|
||||||
/// Create a copy of SDUIWidgetModel
|
/// Create a copy of SDUIWidgetModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@@ -83,16 +83,16 @@ $SDUIWidgetModelCopyWith<SDUIWidgetModel> get copyWith => _$SDUIWidgetModelCopyW
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SDUIWidgetModel&&(identical(other.visible, visible) || other.visible == visible));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SDUIWidgetModel&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.visibleCondition, visibleCondition) || other.visibleCondition == visibleCondition));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,visible);
|
int get hashCode => Object.hash(runtimeType,visible,visibleCondition);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SDUIWidgetModel(visible: $visible)';
|
return 'SDUIWidgetModel(visible: $visible, visibleCondition: $visibleCondition)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ abstract mixin class $SDUIWidgetModelCopyWith<$Res> {
|
|||||||
factory $SDUIWidgetModelCopyWith(SDUIWidgetModel value, $Res Function(SDUIWidgetModel) _then) = _$SDUIWidgetModelCopyWithImpl;
|
factory $SDUIWidgetModelCopyWith(SDUIWidgetModel value, $Res Function(SDUIWidgetModel) _then) = _$SDUIWidgetModelCopyWithImpl;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
bool visible
|
bool visible, String? visibleCondition
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -120,10 +120,11 @@ class _$SDUIWidgetModelCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
/// Create a copy of SDUIWidgetModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@pragma('vm:prefer-inline') @override $Res call({Object? visible = null,}) {
|
@pragma('vm:prefer-inline') @override $Res call({Object? visible = null,Object? visibleCondition = freezed,}) {
|
||||||
return _then(_self.copyWith(
|
return _then(_self.copyWith(
|
||||||
visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,visibleCondition: freezed == visibleCondition ? _self.visibleCondition : visibleCondition // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +145,7 @@ extension SDUIWidgetModelPatterns on SDUIWidgetModel {
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( _TextFormField value)? textFormField,TResult Function( _CardLabelItem value)? cardLabelItem,TResult Function( _ChipSelection value)? chipSelection,TResult Function( _Dropdown value)? dropdown,TResult Function( _ImagePicker value)? imagePicker,TResult Function( _Column value)? column,TResult Function( _Row value)? row,TResult Function( _SizedBox value)? sizedBox,TResult Function( _Stepper value)? stepper,TResult Function( _PageView value)? pageView,required TResult orElse(),}){
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( _TextFormField value)? textFormField,TResult Function( _CardLabelItem value)? cardLabelItem,TResult Function( _ChipSelection value)? chipSelection,TResult Function( _Dropdown value)? dropdown,TResult Function( _ImagePicker value)? imagePicker,TResult Function( _Column value)? column,TResult Function( _Row value)? row,TResult Function( _Stepper value)? stepper,TResult Function( _PageView value)? pageView,TResult Function( _SizedBox value)? sizedBox,required TResult orElse(),}){
|
||||||
final _that = this;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _TextFormField() when textFormField != null:
|
case _TextFormField() when textFormField != null:
|
||||||
@@ -154,10 +155,10 @@ return chipSelection(_that);case _Dropdown() when dropdown != null:
|
|||||||
return dropdown(_that);case _ImagePicker() when imagePicker != null:
|
return dropdown(_that);case _ImagePicker() when imagePicker != null:
|
||||||
return imagePicker(_that);case _Column() when column != null:
|
return imagePicker(_that);case _Column() when column != null:
|
||||||
return column(_that);case _Row() when row != null:
|
return column(_that);case _Row() when row != null:
|
||||||
return row(_that);case _SizedBox() when sizedBox != null:
|
return row(_that);case _Stepper() when stepper != null:
|
||||||
return sizedBox(_that);case _Stepper() when stepper != null:
|
|
||||||
return stepper(_that);case _PageView() when pageView != null:
|
return stepper(_that);case _PageView() when pageView != null:
|
||||||
return pageView(_that);case _:
|
return pageView(_that);case _SizedBox() when sizedBox != null:
|
||||||
|
return sizedBox(_that);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -175,7 +176,7 @@ return pageView(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( _TextFormField value) textFormField,required TResult Function( _CardLabelItem value) cardLabelItem,required TResult Function( _ChipSelection value) chipSelection,required TResult Function( _Dropdown value) dropdown,required TResult Function( _ImagePicker value) imagePicker,required TResult Function( _Column value) column,required TResult Function( _Row value) row,required TResult Function( _SizedBox value) sizedBox,required TResult Function( _Stepper value) stepper,required TResult Function( _PageView value) pageView,}){
|
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( _TextFormField value) textFormField,required TResult Function( _CardLabelItem value) cardLabelItem,required TResult Function( _ChipSelection value) chipSelection,required TResult Function( _Dropdown value) dropdown,required TResult Function( _ImagePicker value) imagePicker,required TResult Function( _Column value) column,required TResult Function( _Row value) row,required TResult Function( _Stepper value) stepper,required TResult Function( _PageView value) pageView,required TResult Function( _SizedBox value) sizedBox,}){
|
||||||
final _that = this;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _TextFormField():
|
case _TextFormField():
|
||||||
@@ -185,10 +186,10 @@ return chipSelection(_that);case _Dropdown():
|
|||||||
return dropdown(_that);case _ImagePicker():
|
return dropdown(_that);case _ImagePicker():
|
||||||
return imagePicker(_that);case _Column():
|
return imagePicker(_that);case _Column():
|
||||||
return column(_that);case _Row():
|
return column(_that);case _Row():
|
||||||
return row(_that);case _SizedBox():
|
return row(_that);case _Stepper():
|
||||||
return sizedBox(_that);case _Stepper():
|
|
||||||
return stepper(_that);case _PageView():
|
return stepper(_that);case _PageView():
|
||||||
return pageView(_that);}
|
return pageView(_that);case _SizedBox():
|
||||||
|
return sizedBox(_that);}
|
||||||
}
|
}
|
||||||
/// A variant of `map` that fallback to returning `null`.
|
/// A variant of `map` that fallback to returning `null`.
|
||||||
///
|
///
|
||||||
@@ -202,7 +203,7 @@ return pageView(_that);}
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( _TextFormField value)? textFormField,TResult? Function( _CardLabelItem value)? cardLabelItem,TResult? Function( _ChipSelection value)? chipSelection,TResult? Function( _Dropdown value)? dropdown,TResult? Function( _ImagePicker value)? imagePicker,TResult? Function( _Column value)? column,TResult? Function( _Row value)? row,TResult? Function( _SizedBox value)? sizedBox,TResult? Function( _Stepper value)? stepper,TResult? Function( _PageView value)? pageView,}){
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( _TextFormField value)? textFormField,TResult? Function( _CardLabelItem value)? cardLabelItem,TResult? Function( _ChipSelection value)? chipSelection,TResult? Function( _Dropdown value)? dropdown,TResult? Function( _ImagePicker value)? imagePicker,TResult? Function( _Column value)? column,TResult? Function( _Row value)? row,TResult? Function( _Stepper value)? stepper,TResult? Function( _PageView value)? pageView,TResult? Function( _SizedBox value)? sizedBox,}){
|
||||||
final _that = this;
|
final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _TextFormField() when textFormField != null:
|
case _TextFormField() when textFormField != null:
|
||||||
@@ -212,10 +213,10 @@ return chipSelection(_that);case _Dropdown() when dropdown != null:
|
|||||||
return dropdown(_that);case _ImagePicker() when imagePicker != null:
|
return dropdown(_that);case _ImagePicker() when imagePicker != null:
|
||||||
return imagePicker(_that);case _Column() when column != null:
|
return imagePicker(_that);case _Column() when column != null:
|
||||||
return column(_that);case _Row() when row != null:
|
return column(_that);case _Row() when row != null:
|
||||||
return row(_that);case _SizedBox() when sizedBox != null:
|
return row(_that);case _Stepper() when stepper != null:
|
||||||
return sizedBox(_that);case _Stepper() when stepper != null:
|
|
||||||
return stepper(_that);case _PageView() when pageView != null:
|
return stepper(_that);case _PageView() when pageView != null:
|
||||||
return pageView(_that);case _:
|
return pageView(_that);case _SizedBox() when sizedBox != null:
|
||||||
|
return sizedBox(_that);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -232,19 +233,19 @@ return pageView(_that);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( TextFormFieldSDUIModel data, bool visible)? textFormField,TResult Function( CardLabelItemData data, SDUIWidgetModel? child, List<SDUIWidgetModel>? children, bool visible, String? visibleCondition)? cardLabelItem,TResult Function( ChipSelectionSDUIModel data, bool visible)? chipSelection,TResult Function( DropdownSDUIModel data, bool visible)? dropdown,TResult Function( ImagePickerSDUIModel data, bool visible)? imagePicker,TResult Function( List<SDUIWidgetModel> children, double spacing, String mainAxisSize, double paddingHorizontal, double paddingVertical, String crossAxisAlignment, bool visible)? column,TResult Function( List<SDUIWidgetModel> children, double spacing, String mainAxisAlignment, bool visible)? row,TResult Function( double? width, double? height, bool visible)? sizedBox,TResult Function( StepperSDUIModel data, List<SDUIWidgetModel>? children, bool visible, int? index)? stepper,TResult Function( PageViewSDUIModel data, List<SDUIWidgetModel> children, bool visible)? pageView,required TResult orElse(),}) {final _that = this;
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( TextFormFieldSDUIModel data, bool visible, String? visibleCondition)? textFormField,TResult Function( CardLabelItemData data, SDUIWidgetModel? child, List<SDUIWidgetModel>? children, bool visible, String? visibleCondition)? cardLabelItem,TResult Function( ChipSelectionSDUIModel data, bool visible, String? visibleCondition)? chipSelection,TResult Function( DropdownSDUIModel data, bool visible, String? visibleCondition)? dropdown,TResult Function( ImagePickerSDUIModel data, bool visible, String? visibleCondition)? imagePicker,TResult Function( List<SDUIWidgetModel> children, double spacing, String mainAxisSize, double paddingHorizontal, double paddingVertical, String crossAxisAlignment, bool visible, String? visibleCondition)? column,TResult Function( List<SDUIWidgetModel> children, double spacing, String mainAxisAlignment, bool visible, String? visibleCondition)? row,TResult Function( StepperSDUIModel data, List<SDUIWidgetModel>? children, bool visible, String? visibleCondition)? stepper,TResult Function( PageViewSDUIModel data, List<SDUIWidgetModel> children, bool visible, String? visibleCondition)? pageView,TResult Function( double? width, double? height, bool visible, String? visibleCondition)? sizedBox,required TResult orElse(),}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _TextFormField() when textFormField != null:
|
case _TextFormField() when textFormField != null:
|
||||||
return textFormField(_that.data,_that.visible);case _CardLabelItem() when cardLabelItem != null:
|
return textFormField(_that.data,_that.visible,_that.visibleCondition);case _CardLabelItem() when cardLabelItem != null:
|
||||||
return cardLabelItem(_that.data,_that.child,_that.children,_that.visible,_that.visibleCondition);case _ChipSelection() when chipSelection != null:
|
return cardLabelItem(_that.data,_that.child,_that.children,_that.visible,_that.visibleCondition);case _ChipSelection() when chipSelection != null:
|
||||||
return chipSelection(_that.data,_that.visible);case _Dropdown() when dropdown != null:
|
return chipSelection(_that.data,_that.visible,_that.visibleCondition);case _Dropdown() when dropdown != null:
|
||||||
return dropdown(_that.data,_that.visible);case _ImagePicker() when imagePicker != null:
|
return dropdown(_that.data,_that.visible,_that.visibleCondition);case _ImagePicker() when imagePicker != null:
|
||||||
return imagePicker(_that.data,_that.visible);case _Column() when column != null:
|
return imagePicker(_that.data,_that.visible,_that.visibleCondition);case _Column() when column != null:
|
||||||
return column(_that.children,_that.spacing,_that.mainAxisSize,_that.paddingHorizontal,_that.paddingVertical,_that.crossAxisAlignment,_that.visible);case _Row() when row != null:
|
return column(_that.children,_that.spacing,_that.mainAxisSize,_that.paddingHorizontal,_that.paddingVertical,_that.crossAxisAlignment,_that.visible,_that.visibleCondition);case _Row() when row != null:
|
||||||
return row(_that.children,_that.spacing,_that.mainAxisAlignment,_that.visible);case _SizedBox() when sizedBox != null:
|
return row(_that.children,_that.spacing,_that.mainAxisAlignment,_that.visible,_that.visibleCondition);case _Stepper() when stepper != null:
|
||||||
return sizedBox(_that.width,_that.height,_that.visible);case _Stepper() when stepper != null:
|
return stepper(_that.data,_that.children,_that.visible,_that.visibleCondition);case _PageView() when pageView != null:
|
||||||
return stepper(_that.data,_that.children,_that.visible,_that.index);case _PageView() when pageView != null:
|
return pageView(_that.data,_that.children,_that.visible,_that.visibleCondition);case _SizedBox() when sizedBox != null:
|
||||||
return pageView(_that.data,_that.children,_that.visible);case _:
|
return sizedBox(_that.width,_that.height,_that.visible,_that.visibleCondition);case _:
|
||||||
return orElse();
|
return orElse();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -262,19 +263,19 @@ return pageView(_that.data,_that.children,_that.visible);case _:
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( TextFormFieldSDUIModel data, bool visible) textFormField,required TResult Function( CardLabelItemData data, SDUIWidgetModel? child, List<SDUIWidgetModel>? children, bool visible, String? visibleCondition) cardLabelItem,required TResult Function( ChipSelectionSDUIModel data, bool visible) chipSelection,required TResult Function( DropdownSDUIModel data, bool visible) dropdown,required TResult Function( ImagePickerSDUIModel data, bool visible) imagePicker,required TResult Function( List<SDUIWidgetModel> children, double spacing, String mainAxisSize, double paddingHorizontal, double paddingVertical, String crossAxisAlignment, bool visible) column,required TResult Function( List<SDUIWidgetModel> children, double spacing, String mainAxisAlignment, bool visible) row,required TResult Function( double? width, double? height, bool visible) sizedBox,required TResult Function( StepperSDUIModel data, List<SDUIWidgetModel>? children, bool visible, int? index) stepper,required TResult Function( PageViewSDUIModel data, List<SDUIWidgetModel> children, bool visible) pageView,}) {final _that = this;
|
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( TextFormFieldSDUIModel data, bool visible, String? visibleCondition) textFormField,required TResult Function( CardLabelItemData data, SDUIWidgetModel? child, List<SDUIWidgetModel>? children, bool visible, String? visibleCondition) cardLabelItem,required TResult Function( ChipSelectionSDUIModel data, bool visible, String? visibleCondition) chipSelection,required TResult Function( DropdownSDUIModel data, bool visible, String? visibleCondition) dropdown,required TResult Function( ImagePickerSDUIModel data, bool visible, String? visibleCondition) imagePicker,required TResult Function( List<SDUIWidgetModel> children, double spacing, String mainAxisSize, double paddingHorizontal, double paddingVertical, String crossAxisAlignment, bool visible, String? visibleCondition) column,required TResult Function( List<SDUIWidgetModel> children, double spacing, String mainAxisAlignment, bool visible, String? visibleCondition) row,required TResult Function( StepperSDUIModel data, List<SDUIWidgetModel>? children, bool visible, String? visibleCondition) stepper,required TResult Function( PageViewSDUIModel data, List<SDUIWidgetModel> children, bool visible, String? visibleCondition) pageView,required TResult Function( double? width, double? height, bool visible, String? visibleCondition) sizedBox,}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _TextFormField():
|
case _TextFormField():
|
||||||
return textFormField(_that.data,_that.visible);case _CardLabelItem():
|
return textFormField(_that.data,_that.visible,_that.visibleCondition);case _CardLabelItem():
|
||||||
return cardLabelItem(_that.data,_that.child,_that.children,_that.visible,_that.visibleCondition);case _ChipSelection():
|
return cardLabelItem(_that.data,_that.child,_that.children,_that.visible,_that.visibleCondition);case _ChipSelection():
|
||||||
return chipSelection(_that.data,_that.visible);case _Dropdown():
|
return chipSelection(_that.data,_that.visible,_that.visibleCondition);case _Dropdown():
|
||||||
return dropdown(_that.data,_that.visible);case _ImagePicker():
|
return dropdown(_that.data,_that.visible,_that.visibleCondition);case _ImagePicker():
|
||||||
return imagePicker(_that.data,_that.visible);case _Column():
|
return imagePicker(_that.data,_that.visible,_that.visibleCondition);case _Column():
|
||||||
return column(_that.children,_that.spacing,_that.mainAxisSize,_that.paddingHorizontal,_that.paddingVertical,_that.crossAxisAlignment,_that.visible);case _Row():
|
return column(_that.children,_that.spacing,_that.mainAxisSize,_that.paddingHorizontal,_that.paddingVertical,_that.crossAxisAlignment,_that.visible,_that.visibleCondition);case _Row():
|
||||||
return row(_that.children,_that.spacing,_that.mainAxisAlignment,_that.visible);case _SizedBox():
|
return row(_that.children,_that.spacing,_that.mainAxisAlignment,_that.visible,_that.visibleCondition);case _Stepper():
|
||||||
return sizedBox(_that.width,_that.height,_that.visible);case _Stepper():
|
return stepper(_that.data,_that.children,_that.visible,_that.visibleCondition);case _PageView():
|
||||||
return stepper(_that.data,_that.children,_that.visible,_that.index);case _PageView():
|
return pageView(_that.data,_that.children,_that.visible,_that.visibleCondition);case _SizedBox():
|
||||||
return pageView(_that.data,_that.children,_that.visible);}
|
return sizedBox(_that.width,_that.height,_that.visible,_that.visibleCondition);}
|
||||||
}
|
}
|
||||||
/// A variant of `when` that fallback to returning `null`
|
/// A variant of `when` that fallback to returning `null`
|
||||||
///
|
///
|
||||||
@@ -288,19 +289,19 @@ return pageView(_that.data,_that.children,_that.visible);}
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( TextFormFieldSDUIModel data, bool visible)? textFormField,TResult? Function( CardLabelItemData data, SDUIWidgetModel? child, List<SDUIWidgetModel>? children, bool visible, String? visibleCondition)? cardLabelItem,TResult? Function( ChipSelectionSDUIModel data, bool visible)? chipSelection,TResult? Function( DropdownSDUIModel data, bool visible)? dropdown,TResult? Function( ImagePickerSDUIModel data, bool visible)? imagePicker,TResult? Function( List<SDUIWidgetModel> children, double spacing, String mainAxisSize, double paddingHorizontal, double paddingVertical, String crossAxisAlignment, bool visible)? column,TResult? Function( List<SDUIWidgetModel> children, double spacing, String mainAxisAlignment, bool visible)? row,TResult? Function( double? width, double? height, bool visible)? sizedBox,TResult? Function( StepperSDUIModel data, List<SDUIWidgetModel>? children, bool visible, int? index)? stepper,TResult? Function( PageViewSDUIModel data, List<SDUIWidgetModel> children, bool visible)? pageView,}) {final _that = this;
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( TextFormFieldSDUIModel data, bool visible, String? visibleCondition)? textFormField,TResult? Function( CardLabelItemData data, SDUIWidgetModel? child, List<SDUIWidgetModel>? children, bool visible, String? visibleCondition)? cardLabelItem,TResult? Function( ChipSelectionSDUIModel data, bool visible, String? visibleCondition)? chipSelection,TResult? Function( DropdownSDUIModel data, bool visible, String? visibleCondition)? dropdown,TResult? Function( ImagePickerSDUIModel data, bool visible, String? visibleCondition)? imagePicker,TResult? Function( List<SDUIWidgetModel> children, double spacing, String mainAxisSize, double paddingHorizontal, double paddingVertical, String crossAxisAlignment, bool visible, String? visibleCondition)? column,TResult? Function( List<SDUIWidgetModel> children, double spacing, String mainAxisAlignment, bool visible, String? visibleCondition)? row,TResult? Function( StepperSDUIModel data, List<SDUIWidgetModel>? children, bool visible, String? visibleCondition)? stepper,TResult? Function( PageViewSDUIModel data, List<SDUIWidgetModel> children, bool visible, String? visibleCondition)? pageView,TResult? Function( double? width, double? height, bool visible, String? visibleCondition)? sizedBox,}) {final _that = this;
|
||||||
switch (_that) {
|
switch (_that) {
|
||||||
case _TextFormField() when textFormField != null:
|
case _TextFormField() when textFormField != null:
|
||||||
return textFormField(_that.data,_that.visible);case _CardLabelItem() when cardLabelItem != null:
|
return textFormField(_that.data,_that.visible,_that.visibleCondition);case _CardLabelItem() when cardLabelItem != null:
|
||||||
return cardLabelItem(_that.data,_that.child,_that.children,_that.visible,_that.visibleCondition);case _ChipSelection() when chipSelection != null:
|
return cardLabelItem(_that.data,_that.child,_that.children,_that.visible,_that.visibleCondition);case _ChipSelection() when chipSelection != null:
|
||||||
return chipSelection(_that.data,_that.visible);case _Dropdown() when dropdown != null:
|
return chipSelection(_that.data,_that.visible,_that.visibleCondition);case _Dropdown() when dropdown != null:
|
||||||
return dropdown(_that.data,_that.visible);case _ImagePicker() when imagePicker != null:
|
return dropdown(_that.data,_that.visible,_that.visibleCondition);case _ImagePicker() when imagePicker != null:
|
||||||
return imagePicker(_that.data,_that.visible);case _Column() when column != null:
|
return imagePicker(_that.data,_that.visible,_that.visibleCondition);case _Column() when column != null:
|
||||||
return column(_that.children,_that.spacing,_that.mainAxisSize,_that.paddingHorizontal,_that.paddingVertical,_that.crossAxisAlignment,_that.visible);case _Row() when row != null:
|
return column(_that.children,_that.spacing,_that.mainAxisSize,_that.paddingHorizontal,_that.paddingVertical,_that.crossAxisAlignment,_that.visible,_that.visibleCondition);case _Row() when row != null:
|
||||||
return row(_that.children,_that.spacing,_that.mainAxisAlignment,_that.visible);case _SizedBox() when sizedBox != null:
|
return row(_that.children,_that.spacing,_that.mainAxisAlignment,_that.visible,_that.visibleCondition);case _Stepper() when stepper != null:
|
||||||
return sizedBox(_that.width,_that.height,_that.visible);case _Stepper() when stepper != null:
|
return stepper(_that.data,_that.children,_that.visible,_that.visibleCondition);case _PageView() when pageView != null:
|
||||||
return stepper(_that.data,_that.children,_that.visible,_that.index);case _PageView() when pageView != null:
|
return pageView(_that.data,_that.children,_that.visible,_that.visibleCondition);case _SizedBox() when sizedBox != null:
|
||||||
return pageView(_that.data,_that.children,_that.visible);case _:
|
return sizedBox(_that.width,_that.height,_that.visible,_that.visibleCondition);case _:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -312,11 +313,12 @@ return pageView(_that.data,_that.children,_that.visible);case _:
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _TextFormField implements SDUIWidgetModel {
|
class _TextFormField implements SDUIWidgetModel {
|
||||||
const _TextFormField({required this.data, this.visible = true, final String? $type}): $type = $type ?? 'text_form_field';
|
const _TextFormField({required this.data, this.visible = true, this.visibleCondition, final String? $type}): $type = $type ?? 'text_form_field';
|
||||||
factory _TextFormField.fromJson(Map<String, dynamic> json) => _$TextFormFieldFromJson(json);
|
factory _TextFormField.fromJson(Map<String, dynamic> json) => _$TextFormFieldFromJson(json);
|
||||||
|
|
||||||
final TextFormFieldSDUIModel data;
|
final TextFormFieldSDUIModel data;
|
||||||
@override@JsonKey() final bool visible;
|
@override@JsonKey() final bool visible;
|
||||||
|
@override final String? visibleCondition;
|
||||||
|
|
||||||
@JsonKey(name: 'type')
|
@JsonKey(name: 'type')
|
||||||
final String $type;
|
final String $type;
|
||||||
@@ -335,16 +337,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TextFormField&&(identical(other.data, data) || other.data == data)&&(identical(other.visible, visible) || other.visible == visible));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TextFormField&&(identical(other.data, data) || other.data == data)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.visibleCondition, visibleCondition) || other.visibleCondition == visibleCondition));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,data,visible);
|
int get hashCode => Object.hash(runtimeType,data,visible,visibleCondition);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SDUIWidgetModel.textFormField(data: $data, visible: $visible)';
|
return 'SDUIWidgetModel.textFormField(data: $data, visible: $visible, visibleCondition: $visibleCondition)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -355,7 +357,7 @@ abstract mixin class _$TextFormFieldCopyWith<$Res> implements $SDUIWidgetModelCo
|
|||||||
factory _$TextFormFieldCopyWith(_TextFormField value, $Res Function(_TextFormField) _then) = __$TextFormFieldCopyWithImpl;
|
factory _$TextFormFieldCopyWith(_TextFormField value, $Res Function(_TextFormField) _then) = __$TextFormFieldCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
TextFormFieldSDUIModel data, bool visible
|
TextFormFieldSDUIModel data, bool visible, String? visibleCondition
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -372,11 +374,12 @@ class __$TextFormFieldCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
/// Create a copy of SDUIWidgetModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? visible = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? visible = null,Object? visibleCondition = freezed,}) {
|
||||||
return _then(_TextFormField(
|
return _then(_TextFormField(
|
||||||
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
||||||
as TextFormFieldSDUIModel,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
as TextFormFieldSDUIModel,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,visibleCondition: freezed == visibleCondition ? _self.visibleCondition : visibleCondition // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -411,7 +414,7 @@ class _CardLabelItem implements SDUIWidgetModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override@JsonKey() final bool visible;
|
@override@JsonKey() final bool visible;
|
||||||
final String? visibleCondition;
|
@override final String? visibleCondition;
|
||||||
|
|
||||||
@JsonKey(name: 'type')
|
@JsonKey(name: 'type')
|
||||||
final String $type;
|
final String $type;
|
||||||
@@ -506,11 +509,12 @@ $SDUIWidgetModelCopyWith<$Res>? get child {
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _ChipSelection implements SDUIWidgetModel {
|
class _ChipSelection implements SDUIWidgetModel {
|
||||||
const _ChipSelection({required this.data, this.visible = true, final String? $type}): $type = $type ?? 'chip_selection';
|
const _ChipSelection({required this.data, this.visible = true, this.visibleCondition, final String? $type}): $type = $type ?? 'chip_selection';
|
||||||
factory _ChipSelection.fromJson(Map<String, dynamic> json) => _$ChipSelectionFromJson(json);
|
factory _ChipSelection.fromJson(Map<String, dynamic> json) => _$ChipSelectionFromJson(json);
|
||||||
|
|
||||||
final ChipSelectionSDUIModel data;
|
final ChipSelectionSDUIModel data;
|
||||||
@override@JsonKey() final bool visible;
|
@override@JsonKey() final bool visible;
|
||||||
|
@override final String? visibleCondition;
|
||||||
|
|
||||||
@JsonKey(name: 'type')
|
@JsonKey(name: 'type')
|
||||||
final String $type;
|
final String $type;
|
||||||
@@ -529,16 +533,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChipSelection&&(identical(other.data, data) || other.data == data)&&(identical(other.visible, visible) || other.visible == visible));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChipSelection&&(identical(other.data, data) || other.data == data)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.visibleCondition, visibleCondition) || other.visibleCondition == visibleCondition));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,data,visible);
|
int get hashCode => Object.hash(runtimeType,data,visible,visibleCondition);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SDUIWidgetModel.chipSelection(data: $data, visible: $visible)';
|
return 'SDUIWidgetModel.chipSelection(data: $data, visible: $visible, visibleCondition: $visibleCondition)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -549,7 +553,7 @@ abstract mixin class _$ChipSelectionCopyWith<$Res> implements $SDUIWidgetModelCo
|
|||||||
factory _$ChipSelectionCopyWith(_ChipSelection value, $Res Function(_ChipSelection) _then) = __$ChipSelectionCopyWithImpl;
|
factory _$ChipSelectionCopyWith(_ChipSelection value, $Res Function(_ChipSelection) _then) = __$ChipSelectionCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
ChipSelectionSDUIModel data, bool visible
|
ChipSelectionSDUIModel data, bool visible, String? visibleCondition
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -566,11 +570,12 @@ class __$ChipSelectionCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
/// Create a copy of SDUIWidgetModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? visible = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? visible = null,Object? visibleCondition = freezed,}) {
|
||||||
return _then(_ChipSelection(
|
return _then(_ChipSelection(
|
||||||
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
||||||
as ChipSelectionSDUIModel,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
as ChipSelectionSDUIModel,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,visibleCondition: freezed == visibleCondition ? _self.visibleCondition : visibleCondition // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -590,11 +595,12 @@ $ChipSelectionSDUIModelCopyWith<$Res> get data {
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _Dropdown implements SDUIWidgetModel {
|
class _Dropdown implements SDUIWidgetModel {
|
||||||
const _Dropdown({required this.data, this.visible = true, final String? $type}): $type = $type ?? 'dropdown';
|
const _Dropdown({required this.data, this.visible = true, this.visibleCondition, final String? $type}): $type = $type ?? 'dropdown';
|
||||||
factory _Dropdown.fromJson(Map<String, dynamic> json) => _$DropdownFromJson(json);
|
factory _Dropdown.fromJson(Map<String, dynamic> json) => _$DropdownFromJson(json);
|
||||||
|
|
||||||
final DropdownSDUIModel data;
|
final DropdownSDUIModel data;
|
||||||
@override@JsonKey() final bool visible;
|
@override@JsonKey() final bool visible;
|
||||||
|
@override final String? visibleCondition;
|
||||||
|
|
||||||
@JsonKey(name: 'type')
|
@JsonKey(name: 'type')
|
||||||
final String $type;
|
final String $type;
|
||||||
@@ -613,16 +619,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Dropdown&&(identical(other.data, data) || other.data == data)&&(identical(other.visible, visible) || other.visible == visible));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Dropdown&&(identical(other.data, data) || other.data == data)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.visibleCondition, visibleCondition) || other.visibleCondition == visibleCondition));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,data,visible);
|
int get hashCode => Object.hash(runtimeType,data,visible,visibleCondition);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SDUIWidgetModel.dropdown(data: $data, visible: $visible)';
|
return 'SDUIWidgetModel.dropdown(data: $data, visible: $visible, visibleCondition: $visibleCondition)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -633,7 +639,7 @@ abstract mixin class _$DropdownCopyWith<$Res> implements $SDUIWidgetModelCopyWit
|
|||||||
factory _$DropdownCopyWith(_Dropdown value, $Res Function(_Dropdown) _then) = __$DropdownCopyWithImpl;
|
factory _$DropdownCopyWith(_Dropdown value, $Res Function(_Dropdown) _then) = __$DropdownCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
DropdownSDUIModel data, bool visible
|
DropdownSDUIModel data, bool visible, String? visibleCondition
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -650,11 +656,12 @@ class __$DropdownCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
/// Create a copy of SDUIWidgetModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? visible = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? visible = null,Object? visibleCondition = freezed,}) {
|
||||||
return _then(_Dropdown(
|
return _then(_Dropdown(
|
||||||
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
||||||
as DropdownSDUIModel,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
as DropdownSDUIModel,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,visibleCondition: freezed == visibleCondition ? _self.visibleCondition : visibleCondition // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -674,11 +681,12 @@ $DropdownSDUIModelCopyWith<$Res> get data {
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _ImagePicker implements SDUIWidgetModel {
|
class _ImagePicker implements SDUIWidgetModel {
|
||||||
const _ImagePicker({required this.data, this.visible = true, final String? $type}): $type = $type ?? 'image_picker';
|
const _ImagePicker({required this.data, this.visible = true, this.visibleCondition, final String? $type}): $type = $type ?? 'image_picker';
|
||||||
factory _ImagePicker.fromJson(Map<String, dynamic> json) => _$ImagePickerFromJson(json);
|
factory _ImagePicker.fromJson(Map<String, dynamic> json) => _$ImagePickerFromJson(json);
|
||||||
|
|
||||||
final ImagePickerSDUIModel data;
|
final ImagePickerSDUIModel data;
|
||||||
@override@JsonKey() final bool visible;
|
@override@JsonKey() final bool visible;
|
||||||
|
@override final String? visibleCondition;
|
||||||
|
|
||||||
@JsonKey(name: 'type')
|
@JsonKey(name: 'type')
|
||||||
final String $type;
|
final String $type;
|
||||||
@@ -697,16 +705,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ImagePicker&&(identical(other.data, data) || other.data == data)&&(identical(other.visible, visible) || other.visible == visible));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ImagePicker&&(identical(other.data, data) || other.data == data)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.visibleCondition, visibleCondition) || other.visibleCondition == visibleCondition));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,data,visible);
|
int get hashCode => Object.hash(runtimeType,data,visible,visibleCondition);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SDUIWidgetModel.imagePicker(data: $data, visible: $visible)';
|
return 'SDUIWidgetModel.imagePicker(data: $data, visible: $visible, visibleCondition: $visibleCondition)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -717,7 +725,7 @@ abstract mixin class _$ImagePickerCopyWith<$Res> implements $SDUIWidgetModelCopy
|
|||||||
factory _$ImagePickerCopyWith(_ImagePicker value, $Res Function(_ImagePicker) _then) = __$ImagePickerCopyWithImpl;
|
factory _$ImagePickerCopyWith(_ImagePicker value, $Res Function(_ImagePicker) _then) = __$ImagePickerCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
ImagePickerSDUIModel data, bool visible
|
ImagePickerSDUIModel data, bool visible, String? visibleCondition
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -734,11 +742,12 @@ class __$ImagePickerCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
/// Create a copy of SDUIWidgetModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? visible = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? visible = null,Object? visibleCondition = freezed,}) {
|
||||||
return _then(_ImagePicker(
|
return _then(_ImagePicker(
|
||||||
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
||||||
as ImagePickerSDUIModel,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
as ImagePickerSDUIModel,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,visibleCondition: freezed == visibleCondition ? _self.visibleCondition : visibleCondition // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -758,7 +767,7 @@ $ImagePickerSDUIModelCopyWith<$Res> get data {
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _Column implements SDUIWidgetModel {
|
class _Column implements SDUIWidgetModel {
|
||||||
const _Column({required final List<SDUIWidgetModel> children, this.spacing = 0.0, this.mainAxisSize = 'max', this.paddingHorizontal = 0.0, this.paddingVertical = 0.0, this.crossAxisAlignment = 'center', this.visible = true, final String? $type}): _children = children,$type = $type ?? 'column';
|
const _Column({required final List<SDUIWidgetModel> children, this.spacing = 0.0, this.mainAxisSize = 'max', this.paddingHorizontal = 0.0, this.paddingVertical = 0.0, this.crossAxisAlignment = 'center', this.visible = true, this.visibleCondition, final String? $type}): _children = children,$type = $type ?? 'column';
|
||||||
factory _Column.fromJson(Map<String, dynamic> json) => _$ColumnFromJson(json);
|
factory _Column.fromJson(Map<String, dynamic> json) => _$ColumnFromJson(json);
|
||||||
|
|
||||||
final List<SDUIWidgetModel> _children;
|
final List<SDUIWidgetModel> _children;
|
||||||
@@ -774,6 +783,7 @@ class _Column implements SDUIWidgetModel {
|
|||||||
@JsonKey() final double paddingVertical;
|
@JsonKey() final double paddingVertical;
|
||||||
@JsonKey() final String crossAxisAlignment;
|
@JsonKey() final String crossAxisAlignment;
|
||||||
@override@JsonKey() final bool visible;
|
@override@JsonKey() final bool visible;
|
||||||
|
@override final String? visibleCondition;
|
||||||
|
|
||||||
@JsonKey(name: 'type')
|
@JsonKey(name: 'type')
|
||||||
final String $type;
|
final String $type;
|
||||||
@@ -792,16 +802,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Column&&const DeepCollectionEquality().equals(other._children, _children)&&(identical(other.spacing, spacing) || other.spacing == spacing)&&(identical(other.mainAxisSize, mainAxisSize) || other.mainAxisSize == mainAxisSize)&&(identical(other.paddingHorizontal, paddingHorizontal) || other.paddingHorizontal == paddingHorizontal)&&(identical(other.paddingVertical, paddingVertical) || other.paddingVertical == paddingVertical)&&(identical(other.crossAxisAlignment, crossAxisAlignment) || other.crossAxisAlignment == crossAxisAlignment)&&(identical(other.visible, visible) || other.visible == visible));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Column&&const DeepCollectionEquality().equals(other._children, _children)&&(identical(other.spacing, spacing) || other.spacing == spacing)&&(identical(other.mainAxisSize, mainAxisSize) || other.mainAxisSize == mainAxisSize)&&(identical(other.paddingHorizontal, paddingHorizontal) || other.paddingHorizontal == paddingHorizontal)&&(identical(other.paddingVertical, paddingVertical) || other.paddingVertical == paddingVertical)&&(identical(other.crossAxisAlignment, crossAxisAlignment) || other.crossAxisAlignment == crossAxisAlignment)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.visibleCondition, visibleCondition) || other.visibleCondition == visibleCondition));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_children),spacing,mainAxisSize,paddingHorizontal,paddingVertical,crossAxisAlignment,visible);
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_children),spacing,mainAxisSize,paddingHorizontal,paddingVertical,crossAxisAlignment,visible,visibleCondition);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SDUIWidgetModel.column(children: $children, spacing: $spacing, mainAxisSize: $mainAxisSize, paddingHorizontal: $paddingHorizontal, paddingVertical: $paddingVertical, crossAxisAlignment: $crossAxisAlignment, visible: $visible)';
|
return 'SDUIWidgetModel.column(children: $children, spacing: $spacing, mainAxisSize: $mainAxisSize, paddingHorizontal: $paddingHorizontal, paddingVertical: $paddingVertical, crossAxisAlignment: $crossAxisAlignment, visible: $visible, visibleCondition: $visibleCondition)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -812,7 +822,7 @@ abstract mixin class _$ColumnCopyWith<$Res> implements $SDUIWidgetModelCopyWith<
|
|||||||
factory _$ColumnCopyWith(_Column value, $Res Function(_Column) _then) = __$ColumnCopyWithImpl;
|
factory _$ColumnCopyWith(_Column value, $Res Function(_Column) _then) = __$ColumnCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
List<SDUIWidgetModel> children, double spacing, String mainAxisSize, double paddingHorizontal, double paddingVertical, String crossAxisAlignment, bool visible
|
List<SDUIWidgetModel> children, double spacing, String mainAxisSize, double paddingHorizontal, double paddingVertical, String crossAxisAlignment, bool visible, String? visibleCondition
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -829,7 +839,7 @@ class __$ColumnCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
/// Create a copy of SDUIWidgetModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? children = null,Object? spacing = null,Object? mainAxisSize = null,Object? paddingHorizontal = null,Object? paddingVertical = null,Object? crossAxisAlignment = null,Object? visible = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? children = null,Object? spacing = null,Object? mainAxisSize = null,Object? paddingHorizontal = null,Object? paddingVertical = null,Object? crossAxisAlignment = null,Object? visible = null,Object? visibleCondition = freezed,}) {
|
||||||
return _then(_Column(
|
return _then(_Column(
|
||||||
children: null == children ? _self._children : children // ignore: cast_nullable_to_non_nullable
|
children: null == children ? _self._children : children // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SDUIWidgetModel>,spacing: null == spacing ? _self.spacing : spacing // ignore: cast_nullable_to_non_nullable
|
as List<SDUIWidgetModel>,spacing: null == spacing ? _self.spacing : spacing // ignore: cast_nullable_to_non_nullable
|
||||||
@@ -838,7 +848,8 @@ as String,paddingHorizontal: null == paddingHorizontal ? _self.paddingHorizontal
|
|||||||
as double,paddingVertical: null == paddingVertical ? _self.paddingVertical : paddingVertical // ignore: cast_nullable_to_non_nullable
|
as double,paddingVertical: null == paddingVertical ? _self.paddingVertical : paddingVertical // ignore: cast_nullable_to_non_nullable
|
||||||
as double,crossAxisAlignment: null == crossAxisAlignment ? _self.crossAxisAlignment : crossAxisAlignment // ignore: cast_nullable_to_non_nullable
|
as double,crossAxisAlignment: null == crossAxisAlignment ? _self.crossAxisAlignment : crossAxisAlignment // ignore: cast_nullable_to_non_nullable
|
||||||
as String,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
as String,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,visibleCondition: freezed == visibleCondition ? _self.visibleCondition : visibleCondition // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -849,7 +860,7 @@ as bool,
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _Row implements SDUIWidgetModel {
|
class _Row implements SDUIWidgetModel {
|
||||||
const _Row({required final List<SDUIWidgetModel> children, this.spacing = 0.0, this.mainAxisAlignment = 'start', this.visible = true, final String? $type}): _children = children,$type = $type ?? 'row';
|
const _Row({required final List<SDUIWidgetModel> children, this.spacing = 0.0, this.mainAxisAlignment = 'start', this.visible = true, this.visibleCondition, final String? $type}): _children = children,$type = $type ?? 'row';
|
||||||
factory _Row.fromJson(Map<String, dynamic> json) => _$RowFromJson(json);
|
factory _Row.fromJson(Map<String, dynamic> json) => _$RowFromJson(json);
|
||||||
|
|
||||||
final List<SDUIWidgetModel> _children;
|
final List<SDUIWidgetModel> _children;
|
||||||
@@ -862,6 +873,7 @@ class _Row implements SDUIWidgetModel {
|
|||||||
@JsonKey() final double spacing;
|
@JsonKey() final double spacing;
|
||||||
@JsonKey() final String mainAxisAlignment;
|
@JsonKey() final String mainAxisAlignment;
|
||||||
@override@JsonKey() final bool visible;
|
@override@JsonKey() final bool visible;
|
||||||
|
@override final String? visibleCondition;
|
||||||
|
|
||||||
@JsonKey(name: 'type')
|
@JsonKey(name: 'type')
|
||||||
final String $type;
|
final String $type;
|
||||||
@@ -880,16 +892,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Row&&const DeepCollectionEquality().equals(other._children, _children)&&(identical(other.spacing, spacing) || other.spacing == spacing)&&(identical(other.mainAxisAlignment, mainAxisAlignment) || other.mainAxisAlignment == mainAxisAlignment)&&(identical(other.visible, visible) || other.visible == visible));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Row&&const DeepCollectionEquality().equals(other._children, _children)&&(identical(other.spacing, spacing) || other.spacing == spacing)&&(identical(other.mainAxisAlignment, mainAxisAlignment) || other.mainAxisAlignment == mainAxisAlignment)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.visibleCondition, visibleCondition) || other.visibleCondition == visibleCondition));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_children),spacing,mainAxisAlignment,visible);
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_children),spacing,mainAxisAlignment,visible,visibleCondition);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SDUIWidgetModel.row(children: $children, spacing: $spacing, mainAxisAlignment: $mainAxisAlignment, visible: $visible)';
|
return 'SDUIWidgetModel.row(children: $children, spacing: $spacing, mainAxisAlignment: $mainAxisAlignment, visible: $visible, visibleCondition: $visibleCondition)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -900,7 +912,7 @@ abstract mixin class _$RowCopyWith<$Res> implements $SDUIWidgetModelCopyWith<$Re
|
|||||||
factory _$RowCopyWith(_Row value, $Res Function(_Row) _then) = __$RowCopyWithImpl;
|
factory _$RowCopyWith(_Row value, $Res Function(_Row) _then) = __$RowCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
List<SDUIWidgetModel> children, double spacing, String mainAxisAlignment, bool visible
|
List<SDUIWidgetModel> children, double spacing, String mainAxisAlignment, bool visible, String? visibleCondition
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -917,90 +929,14 @@ class __$RowCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
/// Create a copy of SDUIWidgetModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? children = null,Object? spacing = null,Object? mainAxisAlignment = null,Object? visible = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? children = null,Object? spacing = null,Object? mainAxisAlignment = null,Object? visible = null,Object? visibleCondition = freezed,}) {
|
||||||
return _then(_Row(
|
return _then(_Row(
|
||||||
children: null == children ? _self._children : children // ignore: cast_nullable_to_non_nullable
|
children: null == children ? _self._children : children // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SDUIWidgetModel>,spacing: null == spacing ? _self.spacing : spacing // ignore: cast_nullable_to_non_nullable
|
as List<SDUIWidgetModel>,spacing: null == spacing ? _self.spacing : spacing // ignore: cast_nullable_to_non_nullable
|
||||||
as double,mainAxisAlignment: null == mainAxisAlignment ? _self.mainAxisAlignment : mainAxisAlignment // ignore: cast_nullable_to_non_nullable
|
as double,mainAxisAlignment: null == mainAxisAlignment ? _self.mainAxisAlignment : mainAxisAlignment // ignore: cast_nullable_to_non_nullable
|
||||||
as String,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
as String,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,visibleCondition: freezed == visibleCondition ? _self.visibleCondition : visibleCondition // ignore: cast_nullable_to_non_nullable
|
||||||
));
|
as String?,
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
@JsonSerializable()
|
|
||||||
|
|
||||||
class _SizedBox implements SDUIWidgetModel {
|
|
||||||
const _SizedBox({this.width, this.height, this.visible = true, final String? $type}): $type = $type ?? 'sized_box';
|
|
||||||
factory _SizedBox.fromJson(Map<String, dynamic> json) => _$SizedBoxFromJson(json);
|
|
||||||
|
|
||||||
final double? width;
|
|
||||||
final double? height;
|
|
||||||
@override@JsonKey() final bool visible;
|
|
||||||
|
|
||||||
@JsonKey(name: 'type')
|
|
||||||
final String $type;
|
|
||||||
|
|
||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
_$SizedBoxCopyWith<_SizedBox> get copyWith => __$SizedBoxCopyWithImpl<_SizedBox>(this, _$identity);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return _$SizedBoxToJson(this, );
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SizedBox&&(identical(other.width, width) || other.width == width)&&(identical(other.height, height) || other.height == height)&&(identical(other.visible, visible) || other.visible == visible));
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
||||||
@override
|
|
||||||
int get hashCode => Object.hash(runtimeType,width,height,visible);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'SDUIWidgetModel.sizedBox(width: $width, height: $height, visible: $visible)';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
abstract mixin class _$SizedBoxCopyWith<$Res> implements $SDUIWidgetModelCopyWith<$Res> {
|
|
||||||
factory _$SizedBoxCopyWith(_SizedBox value, $Res Function(_SizedBox) _then) = __$SizedBoxCopyWithImpl;
|
|
||||||
@override @useResult
|
|
||||||
$Res call({
|
|
||||||
double? width, double? height, bool visible
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
/// @nodoc
|
|
||||||
class __$SizedBoxCopyWithImpl<$Res>
|
|
||||||
implements _$SizedBoxCopyWith<$Res> {
|
|
||||||
__$SizedBoxCopyWithImpl(this._self, this._then);
|
|
||||||
|
|
||||||
final _SizedBox _self;
|
|
||||||
final $Res Function(_SizedBox) _then;
|
|
||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? width = freezed,Object? height = freezed,Object? visible = null,}) {
|
|
||||||
return _then(_SizedBox(
|
|
||||||
width: freezed == width ? _self.width : width // ignore: cast_nullable_to_non_nullable
|
|
||||||
as double?,height: freezed == height ? _self.height : height // ignore: cast_nullable_to_non_nullable
|
|
||||||
as double?,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1011,7 +947,7 @@ as bool,
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _Stepper implements SDUIWidgetModel {
|
class _Stepper implements SDUIWidgetModel {
|
||||||
const _Stepper({required this.data, final List<SDUIWidgetModel>? children, this.visible = true, this.index, final String? $type}): _children = children,$type = $type ?? 'stepper';
|
const _Stepper({required this.data, final List<SDUIWidgetModel>? children, this.visible = true, this.visibleCondition, final String? $type}): _children = children,$type = $type ?? 'stepper';
|
||||||
factory _Stepper.fromJson(Map<String, dynamic> json) => _$StepperFromJson(json);
|
factory _Stepper.fromJson(Map<String, dynamic> json) => _$StepperFromJson(json);
|
||||||
|
|
||||||
final StepperSDUIModel data;
|
final StepperSDUIModel data;
|
||||||
@@ -1025,7 +961,7 @@ class _Stepper implements SDUIWidgetModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override@JsonKey() final bool visible;
|
@override@JsonKey() final bool visible;
|
||||||
final int? index;
|
@override final String? visibleCondition;
|
||||||
|
|
||||||
@JsonKey(name: 'type')
|
@JsonKey(name: 'type')
|
||||||
final String $type;
|
final String $type;
|
||||||
@@ -1044,16 +980,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Stepper&&(identical(other.data, data) || other.data == data)&&const DeepCollectionEquality().equals(other._children, _children)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.index, index) || other.index == index));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Stepper&&(identical(other.data, data) || other.data == data)&&const DeepCollectionEquality().equals(other._children, _children)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.visibleCondition, visibleCondition) || other.visibleCondition == visibleCondition));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,data,const DeepCollectionEquality().hash(_children),visible,index);
|
int get hashCode => Object.hash(runtimeType,data,const DeepCollectionEquality().hash(_children),visible,visibleCondition);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SDUIWidgetModel.stepper(data: $data, children: $children, visible: $visible, index: $index)';
|
return 'SDUIWidgetModel.stepper(data: $data, children: $children, visible: $visible, visibleCondition: $visibleCondition)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1064,7 +1000,7 @@ abstract mixin class _$StepperCopyWith<$Res> implements $SDUIWidgetModelCopyWith
|
|||||||
factory _$StepperCopyWith(_Stepper value, $Res Function(_Stepper) _then) = __$StepperCopyWithImpl;
|
factory _$StepperCopyWith(_Stepper value, $Res Function(_Stepper) _then) = __$StepperCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
StepperSDUIModel data, List<SDUIWidgetModel>? children, bool visible, int? index
|
StepperSDUIModel data, List<SDUIWidgetModel>? children, bool visible, String? visibleCondition
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1081,13 +1017,13 @@ class __$StepperCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
/// Create a copy of SDUIWidgetModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? children = freezed,Object? visible = null,Object? index = freezed,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? children = freezed,Object? visible = null,Object? visibleCondition = freezed,}) {
|
||||||
return _then(_Stepper(
|
return _then(_Stepper(
|
||||||
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
||||||
as StepperSDUIModel,children: freezed == children ? _self._children : children // ignore: cast_nullable_to_non_nullable
|
as StepperSDUIModel,children: freezed == children ? _self._children : children // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SDUIWidgetModel>?,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
as List<SDUIWidgetModel>?,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,index: freezed == index ? _self.index : index // ignore: cast_nullable_to_non_nullable
|
as bool,visibleCondition: freezed == visibleCondition ? _self.visibleCondition : visibleCondition // ignore: cast_nullable_to_non_nullable
|
||||||
as int?,
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1107,7 +1043,7 @@ $StepperSDUIModelCopyWith<$Res> get data {
|
|||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
||||||
class _PageView implements SDUIWidgetModel {
|
class _PageView implements SDUIWidgetModel {
|
||||||
const _PageView({required this.data, required final List<SDUIWidgetModel> children, this.visible = true, final String? $type}): _children = children,$type = $type ?? 'page_view';
|
const _PageView({required this.data, required final List<SDUIWidgetModel> children, this.visible = true, this.visibleCondition, final String? $type}): _children = children,$type = $type ?? 'page_view';
|
||||||
factory _PageView.fromJson(Map<String, dynamic> json) => _$PageViewFromJson(json);
|
factory _PageView.fromJson(Map<String, dynamic> json) => _$PageViewFromJson(json);
|
||||||
|
|
||||||
final PageViewSDUIModel data;
|
final PageViewSDUIModel data;
|
||||||
@@ -1119,6 +1055,7 @@ class _PageView implements SDUIWidgetModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override@JsonKey() final bool visible;
|
@override@JsonKey() final bool visible;
|
||||||
|
@override final String? visibleCondition;
|
||||||
|
|
||||||
@JsonKey(name: 'type')
|
@JsonKey(name: 'type')
|
||||||
final String $type;
|
final String $type;
|
||||||
@@ -1137,16 +1074,16 @@ Map<String, dynamic> toJson() {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) {
|
bool operator ==(Object other) {
|
||||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PageView&&(identical(other.data, data) || other.data == data)&&const DeepCollectionEquality().equals(other._children, _children)&&(identical(other.visible, visible) || other.visible == visible));
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PageView&&(identical(other.data, data) || other.data == data)&&const DeepCollectionEquality().equals(other._children, _children)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.visibleCondition, visibleCondition) || other.visibleCondition == visibleCondition));
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType,data,const DeepCollectionEquality().hash(_children),visible);
|
int get hashCode => Object.hash(runtimeType,data,const DeepCollectionEquality().hash(_children),visible,visibleCondition);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SDUIWidgetModel.pageView(data: $data, children: $children, visible: $visible)';
|
return 'SDUIWidgetModel.pageView(data: $data, children: $children, visible: $visible, visibleCondition: $visibleCondition)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1157,7 +1094,7 @@ abstract mixin class _$PageViewCopyWith<$Res> implements $SDUIWidgetModelCopyWit
|
|||||||
factory _$PageViewCopyWith(_PageView value, $Res Function(_PageView) _then) = __$PageViewCopyWithImpl;
|
factory _$PageViewCopyWith(_PageView value, $Res Function(_PageView) _then) = __$PageViewCopyWithImpl;
|
||||||
@override @useResult
|
@override @useResult
|
||||||
$Res call({
|
$Res call({
|
||||||
PageViewSDUIModel data, List<SDUIWidgetModel> children, bool visible
|
PageViewSDUIModel data, List<SDUIWidgetModel> children, bool visible, String? visibleCondition
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1174,12 +1111,13 @@ class __$PageViewCopyWithImpl<$Res>
|
|||||||
|
|
||||||
/// Create a copy of SDUIWidgetModel
|
/// Create a copy of SDUIWidgetModel
|
||||||
/// with the given fields replaced by the non-null parameter values.
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? children = null,Object? visible = null,}) {
|
@override @pragma('vm:prefer-inline') $Res call({Object? data = null,Object? children = null,Object? visible = null,Object? visibleCondition = freezed,}) {
|
||||||
return _then(_PageView(
|
return _then(_PageView(
|
||||||
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
|
||||||
as PageViewSDUIModel,children: null == children ? _self._children : children // ignore: cast_nullable_to_non_nullable
|
as PageViewSDUIModel,children: null == children ? _self._children : children // ignore: cast_nullable_to_non_nullable
|
||||||
as List<SDUIWidgetModel>,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
as List<SDUIWidgetModel>,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
||||||
as bool,
|
as bool,visibleCondition: freezed == visibleCondition ? _self.visibleCondition : visibleCondition // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1195,4 +1133,83 @@ $PageViewSDUIModelCopyWith<$Res> get data {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
@JsonSerializable()
|
||||||
|
|
||||||
|
class _SizedBox implements SDUIWidgetModel {
|
||||||
|
const _SizedBox({this.width, this.height, this.visible = true, this.visibleCondition, final String? $type}): $type = $type ?? 'sized_box';
|
||||||
|
factory _SizedBox.fromJson(Map<String, dynamic> json) => _$SizedBoxFromJson(json);
|
||||||
|
|
||||||
|
final double? width;
|
||||||
|
final double? height;
|
||||||
|
@override@JsonKey() final bool visible;
|
||||||
|
@override final String? visibleCondition;
|
||||||
|
|
||||||
|
@JsonKey(name: 'type')
|
||||||
|
final String $type;
|
||||||
|
|
||||||
|
|
||||||
|
/// Create a copy of SDUIWidgetModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$SizedBoxCopyWith<_SizedBox> get copyWith => __$SizedBoxCopyWithImpl<_SizedBox>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return _$SizedBoxToJson(this, );
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SizedBox&&(identical(other.width, width) || other.width == width)&&(identical(other.height, height) || other.height == height)&&(identical(other.visible, visible) || other.visible == visible)&&(identical(other.visibleCondition, visibleCondition) || other.visibleCondition == visibleCondition));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,width,height,visible,visibleCondition);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SDUIWidgetModel.sizedBox(width: $width, height: $height, visible: $visible, visibleCondition: $visibleCondition)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$SizedBoxCopyWith<$Res> implements $SDUIWidgetModelCopyWith<$Res> {
|
||||||
|
factory _$SizedBoxCopyWith(_SizedBox value, $Res Function(_SizedBox) _then) = __$SizedBoxCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
double? width, double? height, bool visible, String? visibleCondition
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$SizedBoxCopyWithImpl<$Res>
|
||||||
|
implements _$SizedBoxCopyWith<$Res> {
|
||||||
|
__$SizedBoxCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _SizedBox _self;
|
||||||
|
final $Res Function(_SizedBox) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SDUIWidgetModel
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? width = freezed,Object? height = freezed,Object? visible = null,Object? visibleCondition = freezed,}) {
|
||||||
|
return _then(_SizedBox(
|
||||||
|
width: freezed == width ? _self.width : width // ignore: cast_nullable_to_non_nullable
|
||||||
|
as double?,height: freezed == height ? _self.height : height // ignore: cast_nullable_to_non_nullable
|
||||||
|
as double?,visible: null == visible ? _self.visible : visible // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,visibleCondition: freezed == visibleCondition ? _self.visibleCondition : visibleCondition // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// dart format on
|
// dart format on
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ _TextFormField _$TextFormFieldFromJson(Map<String, dynamic> json) =>
|
|||||||
json['data'] as Map<String, dynamic>,
|
json['data'] as Map<String, dynamic>,
|
||||||
),
|
),
|
||||||
visible: json['visible'] as bool? ?? true,
|
visible: json['visible'] as bool? ?? true,
|
||||||
|
visibleCondition: json['visible_condition'] as String?,
|
||||||
$type: json['type'] as String?,
|
$type: json['type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ Map<String, dynamic> _$TextFormFieldToJson(_TextFormField instance) =>
|
|||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'data': instance.data,
|
'data': instance.data,
|
||||||
'visible': instance.visible,
|
'visible': instance.visible,
|
||||||
|
'visible_condition': instance.visibleCondition,
|
||||||
'type': instance.$type,
|
'type': instance.$type,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -52,6 +54,7 @@ _ChipSelection _$ChipSelectionFromJson(Map<String, dynamic> json) =>
|
|||||||
json['data'] as Map<String, dynamic>,
|
json['data'] as Map<String, dynamic>,
|
||||||
),
|
),
|
||||||
visible: json['visible'] as bool? ?? true,
|
visible: json['visible'] as bool? ?? true,
|
||||||
|
visibleCondition: json['visible_condition'] as String?,
|
||||||
$type: json['type'] as String?,
|
$type: json['type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -59,24 +62,28 @@ Map<String, dynamic> _$ChipSelectionToJson(_ChipSelection instance) =>
|
|||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'data': instance.data,
|
'data': instance.data,
|
||||||
'visible': instance.visible,
|
'visible': instance.visible,
|
||||||
|
'visible_condition': instance.visibleCondition,
|
||||||
'type': instance.$type,
|
'type': instance.$type,
|
||||||
};
|
};
|
||||||
|
|
||||||
_Dropdown _$DropdownFromJson(Map<String, dynamic> json) => _Dropdown(
|
_Dropdown _$DropdownFromJson(Map<String, dynamic> json) => _Dropdown(
|
||||||
data: DropdownSDUIModel.fromJson(json['data'] as Map<String, dynamic>),
|
data: DropdownSDUIModel.fromJson(json['data'] as Map<String, dynamic>),
|
||||||
visible: json['visible'] as bool? ?? true,
|
visible: json['visible'] as bool? ?? true,
|
||||||
|
visibleCondition: json['visible_condition'] as String?,
|
||||||
$type: json['type'] as String?,
|
$type: json['type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$DropdownToJson(_Dropdown instance) => <String, dynamic>{
|
Map<String, dynamic> _$DropdownToJson(_Dropdown instance) => <String, dynamic>{
|
||||||
'data': instance.data,
|
'data': instance.data,
|
||||||
'visible': instance.visible,
|
'visible': instance.visible,
|
||||||
|
'visible_condition': instance.visibleCondition,
|
||||||
'type': instance.$type,
|
'type': instance.$type,
|
||||||
};
|
};
|
||||||
|
|
||||||
_ImagePicker _$ImagePickerFromJson(Map<String, dynamic> json) => _ImagePicker(
|
_ImagePicker _$ImagePickerFromJson(Map<String, dynamic> json) => _ImagePicker(
|
||||||
data: ImagePickerSDUIModel.fromJson(json['data'] as Map<String, dynamic>),
|
data: ImagePickerSDUIModel.fromJson(json['data'] as Map<String, dynamic>),
|
||||||
visible: json['visible'] as bool? ?? true,
|
visible: json['visible'] as bool? ?? true,
|
||||||
|
visibleCondition: json['visible_condition'] as String?,
|
||||||
$type: json['type'] as String?,
|
$type: json['type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -84,6 +91,7 @@ Map<String, dynamic> _$ImagePickerToJson(_ImagePicker instance) =>
|
|||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'data': instance.data,
|
'data': instance.data,
|
||||||
'visible': instance.visible,
|
'visible': instance.visible,
|
||||||
|
'visible_condition': instance.visibleCondition,
|
||||||
'type': instance.$type,
|
'type': instance.$type,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -97,6 +105,7 @@ _Column _$ColumnFromJson(Map<String, dynamic> json) => _Column(
|
|||||||
paddingVertical: (json['padding_vertical'] as num?)?.toDouble() ?? 0.0,
|
paddingVertical: (json['padding_vertical'] as num?)?.toDouble() ?? 0.0,
|
||||||
crossAxisAlignment: json['cross_axis_alignment'] as String? ?? 'center',
|
crossAxisAlignment: json['cross_axis_alignment'] as String? ?? 'center',
|
||||||
visible: json['visible'] as bool? ?? true,
|
visible: json['visible'] as bool? ?? true,
|
||||||
|
visibleCondition: json['visible_condition'] as String?,
|
||||||
$type: json['type'] as String?,
|
$type: json['type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -108,6 +117,7 @@ Map<String, dynamic> _$ColumnToJson(_Column instance) => <String, dynamic>{
|
|||||||
'padding_vertical': instance.paddingVertical,
|
'padding_vertical': instance.paddingVertical,
|
||||||
'cross_axis_alignment': instance.crossAxisAlignment,
|
'cross_axis_alignment': instance.crossAxisAlignment,
|
||||||
'visible': instance.visible,
|
'visible': instance.visible,
|
||||||
|
'visible_condition': instance.visibleCondition,
|
||||||
'type': instance.$type,
|
'type': instance.$type,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -118,6 +128,7 @@ _Row _$RowFromJson(Map<String, dynamic> json) => _Row(
|
|||||||
spacing: (json['spacing'] as num?)?.toDouble() ?? 0.0,
|
spacing: (json['spacing'] as num?)?.toDouble() ?? 0.0,
|
||||||
mainAxisAlignment: json['main_axis_alignment'] as String? ?? 'start',
|
mainAxisAlignment: json['main_axis_alignment'] as String? ?? 'start',
|
||||||
visible: json['visible'] as bool? ?? true,
|
visible: json['visible'] as bool? ?? true,
|
||||||
|
visibleCondition: json['visible_condition'] as String?,
|
||||||
$type: json['type'] as String?,
|
$type: json['type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -126,20 +137,7 @@ Map<String, dynamic> _$RowToJson(_Row instance) => <String, dynamic>{
|
|||||||
'spacing': instance.spacing,
|
'spacing': instance.spacing,
|
||||||
'main_axis_alignment': instance.mainAxisAlignment,
|
'main_axis_alignment': instance.mainAxisAlignment,
|
||||||
'visible': instance.visible,
|
'visible': instance.visible,
|
||||||
'type': instance.$type,
|
'visible_condition': instance.visibleCondition,
|
||||||
};
|
|
||||||
|
|
||||||
_SizedBox _$SizedBoxFromJson(Map<String, dynamic> json) => _SizedBox(
|
|
||||||
width: (json['width'] as num?)?.toDouble(),
|
|
||||||
height: (json['height'] as num?)?.toDouble(),
|
|
||||||
visible: json['visible'] as bool? ?? true,
|
|
||||||
$type: json['type'] as String?,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$SizedBoxToJson(_SizedBox instance) => <String, dynamic>{
|
|
||||||
'width': instance.width,
|
|
||||||
'height': instance.height,
|
|
||||||
'visible': instance.visible,
|
|
||||||
'type': instance.$type,
|
'type': instance.$type,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -149,7 +147,7 @@ _Stepper _$StepperFromJson(Map<String, dynamic> json) => _Stepper(
|
|||||||
?.map((e) => SDUIWidgetModel.fromJson(e as Map<String, dynamic>))
|
?.map((e) => SDUIWidgetModel.fromJson(e as Map<String, dynamic>))
|
||||||
.toList(),
|
.toList(),
|
||||||
visible: json['visible'] as bool? ?? true,
|
visible: json['visible'] as bool? ?? true,
|
||||||
index: (json['index'] as num?)?.toInt(),
|
visibleCondition: json['visible_condition'] as String?,
|
||||||
$type: json['type'] as String?,
|
$type: json['type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -157,7 +155,7 @@ Map<String, dynamic> _$StepperToJson(_Stepper instance) => <String, dynamic>{
|
|||||||
'data': instance.data,
|
'data': instance.data,
|
||||||
'children': instance.children,
|
'children': instance.children,
|
||||||
'visible': instance.visible,
|
'visible': instance.visible,
|
||||||
'index': instance.index,
|
'visible_condition': instance.visibleCondition,
|
||||||
'type': instance.$type,
|
'type': instance.$type,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -167,6 +165,7 @@ _PageView _$PageViewFromJson(Map<String, dynamic> json) => _PageView(
|
|||||||
.map((e) => SDUIWidgetModel.fromJson(e as Map<String, dynamic>))
|
.map((e) => SDUIWidgetModel.fromJson(e as Map<String, dynamic>))
|
||||||
.toList(),
|
.toList(),
|
||||||
visible: json['visible'] as bool? ?? true,
|
visible: json['visible'] as bool? ?? true,
|
||||||
|
visibleCondition: json['visible_condition'] as String?,
|
||||||
$type: json['type'] as String?,
|
$type: json['type'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -174,5 +173,22 @@ Map<String, dynamic> _$PageViewToJson(_PageView instance) => <String, dynamic>{
|
|||||||
'data': instance.data,
|
'data': instance.data,
|
||||||
'children': instance.children,
|
'children': instance.children,
|
||||||
'visible': instance.visible,
|
'visible': instance.visible,
|
||||||
|
'visible_condition': instance.visibleCondition,
|
||||||
|
'type': instance.$type,
|
||||||
|
};
|
||||||
|
|
||||||
|
_SizedBox _$SizedBoxFromJson(Map<String, dynamic> json) => _SizedBox(
|
||||||
|
width: (json['width'] as num?)?.toDouble(),
|
||||||
|
height: (json['height'] as num?)?.toDouble(),
|
||||||
|
visible: json['visible'] as bool? ?? true,
|
||||||
|
visibleCondition: json['visible_condition'] as String?,
|
||||||
|
$type: json['type'] as String?,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SizedBoxToJson(_SizedBox instance) => <String, dynamic>{
|
||||||
|
'width': instance.width,
|
||||||
|
'height': instance.height,
|
||||||
|
'visible': instance.visible,
|
||||||
|
'visible_condition': instance.visibleCondition,
|
||||||
'type': instance.$type,
|
'type': instance.$type,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user