FormItem<V> constructor

FormItem<V>({
  1. required String hint,
  2. String header = '',
  3. FormType type = FormType.text,
  4. bool required = true,
  5. bool editable = true,
  6. bool visible = true,
  7. bool inRow = false,
  8. bool breakRow = false,
  9. bool breakCol = false,
  10. int? maxSelect = -1,
  11. int? maxItems = -1,
  12. double? widgetWidth,
  13. List<V>? options,
  14. ValueStream<List<V>>? optionsStream,
  15. ArrayMapping? arrayMapping,
  16. ObjectMapping? objectMapping,
  17. required bool validation(
    1. dynamic value
    ),
  18. required V? value,
  19. String kind = '',
  20. String? label,
  21. List<EditorType> editorTypes = const [EditorType.text],
  22. Iterable<String>? autofillHints = const <String>[],
  23. Widget customBuilder(
    1. BuildContext,
    2. V? value,
    3. dynamic onValueChange(
      1. V?
      )
    )?,
  24. Widget customArrayBuilder(
    1. V item,
    2. int index,
    3. dynamic onValueChanged(
      1. Map<String, dynamic>
      ),
    4. dynamic onRemoveItem(),
    )?,
  25. Map<String, dynamic> factory()?,
  26. bool hasSelect = true,
  27. bool hasDelete = true,
  28. bool hasColor = false,
  29. bool hasImage = false,
  30. bool hasAction = false,
  31. Stream<bool>? visibilityStream,
  32. dynamic onChange(
    1. V?
    )?,
  33. Widget suffix(
    1. void (
      1. String
      )
    )?,
  34. dynamic onTap()?,
  35. WidgetSize? size,
  36. String titleCancel = 'Cancel',
  37. String titleConfirm = 'Ok',
  38. Widget previewBuilder(
    1. String
    )?,
  39. double? maxValue,
  40. double? minValue,
  41. bool showFacility = true,
  42. List<TextInputFormatter>? inputFormatters,
  43. dynamic transform(
    1. V?
    )?,
  44. String? errorMessage,
  45. Widget? labelWidget,
  46. IconData? prefix,
  47. Widget imagePathWidget(
    1. String
    )?,
})

Implementation

FormItem({
  required this.hint,
  this.header = '',
  this.type = FormType.text,
  this.required = true,
  this.editable = true,
  this.visible = true,
  this.inRow = false,
  this.breakRow = false,
  this.breakCol = false,
  this.maxSelect = -1,
  this.maxItems = -1,
  this.widgetWidth,
  this.options,
  this.optionsStream,
  this.arrayMapping,
  this.objectMapping,
  required this.validation,
  required this.value,
  this.kind = '',
  this.label,
  this.editorTypes = const [EditorType.text],
  this.autofillHints = const <String>[],
  this.customBuilder,
  this.customArrayBuilder,
  this.factory,
  this.hasSelect = true,
  this.hasDelete = true,
  this.hasColor = false,
  this.hasImage = false,
  this.hasAction = false,
  this.visibilityStream,
  this.onChange,
  this.suffix,
  this.onTap,
  this.size,
  this.titleCancel = 'Cancel',
  this.titleConfirm = 'Ok',
  this.previewBuilder,
  this.maxValue,
  this.minValue,
  this.showFacility = true,
  this.inputFormatters,
  this.transform,
  this.errorMessage,
  this.labelWidget,
  this.prefix,
  this.imagePathWidget,
}) {
  assert(((type == FormType.image || type == FormType.images) &&
          size != null &&
          kind.isNotEmpty) ||
      type != FormType.custom ||
      (this.customBuilder != null && this.objectMapping != null));
}