FormItemChipsField constructor

FormItemChipsField({
  1. Key? key,
  2. TextEditingController? controller,
  3. List<String>? initialItems,
  4. Color? backgroundColor,
  5. String separator = ",",
  6. bool enabled = true,
  7. bool dense = false,
  8. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(vertical: 10),
  9. EdgeInsetsGeometry contentPadding = const EdgeInsets.all(10),
  10. Color? color,
  11. bool allowEmpty = false,
  12. InputBorder? border,
  13. InputBorder? disabledBorder,
  14. Color? subColor,
  15. String? hintText,
  16. String? counterText = "",
  17. String? labelText,
  18. String? lengthErrorText = "",
  19. Widget? prefix,
  20. Widget? suffix,
  21. bool readOnly = false,
  22. required Widget chipBuilder(
    1. BuildContext context,
    2. _ChipsInputState<String> state,
    3. String value
    ),
  23. required Widget suggestionBuilder(
    1. BuildContext context,
    2. _ChipsInputState<String> state,
    3. String value
    ),
  24. FutureOr<List<String>> findSuggestions(
    1. String searchText
    )?,
  25. void onChanged(
    1. List<String> values
    )?,
  26. void onChipTapped(
    1. String value
    )?,
  27. int? maxChips,
  28. double? suggestionsBoxMaxHeight,
  29. TextInputType inputType = TextInputType.text,
  30. bool obscureText = false,
  31. bool autocorrect = true,
  32. void onSaved(
    1. List<String> value
    )?,
  33. String validator(
    1. String? value
    )?,
  34. String? initialURI,
})

Implementation

FormItemChipsField({
  Key? key,
  this.controller,
  this.initialItems,
  this.backgroundColor,
  this.separator = ",",
  bool enabled = true,
  this.dense = false,
  this.padding = const EdgeInsets.symmetric(vertical: 10),
  this.contentPadding = const EdgeInsets.all(10),
  this.color,
  this.allowEmpty = false,
  this.border,
  this.disabledBorder,
  this.subColor,
  this.hintText,
  this.counterText = "",
  this.labelText,
  this.lengthErrorText = "",
  this.prefix,
  this.suffix,
  this.readOnly = false,
  required this.chipBuilder,
  required this.suggestionBuilder,
  this.findSuggestions,
  this.onChanged,
  this.onChipTapped,
  this.maxChips,
  this.suggestionsBoxMaxHeight,
  this.inputType = TextInputType.text,
  this.obscureText = false,
  this.autocorrect = true,
  void Function(List<String> value)? onSaved,
  String Function(String? value)? validator,
  String? initialURI,
}) : super(
          key: key,
          builder: (state) {
            return const Empty();
          },
          onSaved: (value) {
            onSaved?.call(value?.split(separator) ?? const []);
          },
          validator: validator,
          initialValue: initialURI,
          enabled: enabled);