FieldSuggestion<T> constructor

const FieldSuggestion<T>({
  1. Key? key,
  2. required Widget itemBuilder(
    1. BuildContext,
    2. int
    )?,
  3. required TextEditingController textController,
  4. required List<T>? suggestions,
  5. required bool search(
    1. T item,
    2. String input
    )?,
  6. Widget separatorBuilder(
    1. BuildContext,
    2. int
    )?,
  7. BoxController? boxController,
  8. BoxStyle? boxStyle,
  9. double? maxBoxHeight,
  10. InputDecoration? inputDecoration,
  11. TextInputType? inputType,
  12. FocusNode? focusNode,
  13. int? maxLines,
  14. TextStyle? inputStyle,
  15. FormFieldValidator<String>? validator,
  16. double cursorWidth = 2,
  17. double? cursorHeight,
  18. Radius? cursorRadius,
  19. Color? cursorColor,
  20. Brightness? keyboardAppearance,
  21. ScrollController? scrollController,
  22. double spacer = 5.0,
  23. int? sizeByItem,
  24. EdgeInsets padding = const EdgeInsets.all(12),
  25. bool wOpacityAnimation = false,
  26. bool wSlideAnimation = false,
  27. Duration animationDuration = const Duration(milliseconds: 400),
  28. SlideStyle slideStyle = SlideStyle.RTL,
  29. Tween<Offset>? slideOffset,
  30. Curve slideCurve = Curves.decelerate,
})

Implementation

const FieldSuggestion({
  Key? key,
  required this.itemBuilder,
  required this.textController,
  required this.suggestions,
  required this.search,
  this.separatorBuilder,
  this.boxController,
  this.boxStyle,
  this.maxBoxHeight,
  this.inputDecoration,
  this.inputType,
  this.focusNode,
  this.maxLines,
  this.inputStyle,
  this.validator,
  this.cursorWidth = 2,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.keyboardAppearance,
  this.scrollController,
  this.spacer = 5.0,
  this.sizeByItem,
  this.padding = const EdgeInsets.all(12),
  this.wOpacityAnimation = false,
  this.wSlideAnimation = false,
  this.animationDuration = const Duration(milliseconds: 400),
  this.slideStyle = SlideStyle.RTL,
  this.slideOffset,
  this.slideCurve = Curves.decelerate,
})  : future = null,
      builder = null,
      futureRebuildDuration = null,
      initialData = null,
      onData = null,
      onError = null,
      onLoad = null,
      onEmptyData = null,
      assert(
        itemBuilder != null,
        '[itemBuilder] property cannot be null, in case of "local" usage',
      ),
      assert(
        suggestions != null,
        '[suggestions] property cannot be null, in case of "local" usage',
      ),
      assert(
        search != null,
        '[search] propery cannot be null, in case of "local" usage',
      ),
      super(key: key);