FieldSuggestion<T> constructor
const
FieldSuggestion<T> ({
- Key? key,
- required Widget itemBuilder()?,
- required TextEditingController textController,
- required List<
T> ? suggestions, - required bool search(
- T item,
- String input
- Widget separatorBuilder()?,
- BoxController? boxController,
- BoxStyle? boxStyle,
- double? maxBoxHeight,
- InputDecoration? inputDecoration,
- TextInputType? inputType,
- FocusNode? focusNode,
- int? maxLines,
- TextStyle? inputStyle,
- FormFieldValidator<
String> ? validator, - double cursorWidth = 2,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- Brightness? keyboardAppearance,
- ScrollController? scrollController,
- double spacer = 5.0,
- int? sizeByItem,
- EdgeInsets padding = const EdgeInsets.all(12),
- bool wOpacityAnimation = false,
- bool wSlideAnimation = false,
- Duration animationDuration = const Duration(milliseconds: 400),
- SlideStyle slideStyle = SlideStyle.RTL,
- Tween<
Offset> ? slideOffset, - 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);