ChipsChoice<T>.single constructor

ChipsChoice<T>.single({
  1. Key? key,
  2. T? value,
  3. C2Changed<T>? onChanged,
  4. required List<C2Choice<T>> choiceItems,
  5. C2ChoiceLoader<T>? choiceLoader,
  6. C2ChoiceStyle? choiceStyle,
  7. C2ChoiceStyle? choiceActiveStyle,
  8. C2Builder<T>? choiceLabelBuilder,
  9. C2Builder<T>? choiceAvatarBuilder,
  10. C2Builder<T>? choiceBuilder,
  11. WidgetBuilder? spinnerBuilder,
  12. WidgetBuilder? placeholderBuilder,
  13. WidgetBuilder? errorBuilder,
  14. bool? wrapped = false,
  15. EdgeInsetsGeometry? padding,
  16. Axis? direction = Axis.horizontal,
  17. VerticalDirection? verticalDirection = VerticalDirection.down,
  18. TextDirection? textDirection,
  19. Clip? clipBehavior = Clip.hardEdge,
  20. ScrollPhysics? scrollPhysics,
  21. MainAxisSize? mainAxisSize = MainAxisSize.max,
  22. MainAxisAlignment? mainAxisAlignment = MainAxisAlignment.start,
  23. CrossAxisAlignment? crossAxisAlignment = CrossAxisAlignment.center,
  24. WrapAlignment? alignment = WrapAlignment.start,
  25. WrapAlignment? runAlignment = WrapAlignment.start,
  26. WrapCrossAlignment? wrapCrossAlignment = WrapCrossAlignment.start,
  27. double? spacing = 10.0,
  28. double? runSpacing = 0,
  29. String? placeholder,
  30. TextStyle? placeholderStyle,
  31. TextAlign? placeholderAlign,
  32. TextStyle? errorStyle,
  33. TextAlign? errorAlign,
  34. double? spinnerSize,
  35. Color? spinnerColor,
  36. double? spinnerThickness,
})

Costructor for single choice

Implementation

ChipsChoice.single({
  Key? key,
  T? value,
  C2Changed<T>? onChanged,
  required this.choiceItems,
  this.choiceLoader,
  this.choiceStyle,
  this.choiceActiveStyle,
  this.choiceLabelBuilder,
  this.choiceAvatarBuilder,
  this.choiceBuilder,
  this.spinnerBuilder,
  this.placeholderBuilder,
  this.errorBuilder,
  this.wrapped = false,
  this.padding,
  this.direction = Axis.horizontal,
  this.verticalDirection = VerticalDirection.down,
  this.textDirection,
  this.clipBehavior = Clip.hardEdge,
  this.scrollPhysics,
  this.mainAxisSize = MainAxisSize.max,
  this.mainAxisAlignment = MainAxisAlignment.start,
  this.crossAxisAlignment = CrossAxisAlignment.center,
  this.alignment = WrapAlignment.start,
  this.runAlignment = WrapAlignment.start,
  this.wrapCrossAlignment = WrapCrossAlignment.start,
  this.spacing = 10.0,
  this.runSpacing = 0,
  this.placeholder,
  this.placeholderStyle,
  this.placeholderAlign,
  this.errorStyle,
  this.errorAlign,
  this.spinnerSize,
  this.spinnerColor,
  this.spinnerThickness,
}) :
      assert(
      // ignore: unnecessary_null_comparison
      choiceItems != null || choiceLoader != null,
      'One of the parameters must be provided',
      ),
      assert(wrapped != null),
      _isMultiChoice = false,
      _value = value!,
      _values = null,
      _onChangedMultiple = null,
      _onChangedSingle = onChanged,
      super(key: key);