FMultiSelect<T>.searchBuilder constructor
FMultiSelect<T>.searchBuilder ({
- required Widget format(
- T
- required FutureOr<
Iterable< filter(),T> > - required FSelectSearchContentBuilder<
T> contentBuilder, - FSelectSearchFieldProperties searchFieldProperties,
- Widget contentLoadingBuilder(),
- Widget contentErrorBuilder()?,
- FMultiSelectController<
T> ? controller, - FMultiSelectStyle style()?,
- bool autofocus,
- FocusNode? focusNode,
- FFieldIconBuilder<
FMultiSelectStyle> ? prefixBuilder, - FFieldIconBuilder<
FMultiSelectStyle> ? suffixBuilder, - Widget? label,
- Widget? description,
- bool enabled,
- ValueChanged<
Set< ? onChange,T> > - void onSaved(
- Set<
T>
- Set<
- AutovalidateMode autovalidateMode,
- String? forceErrorText,
- String? validator(
- Set<
T>
- Set<
- Widget errorBuilder(),
- Widget? hint,
- bool keepHint,
- int sort(
- T,
- T
- FMultiSelectTagBuilder<
T> ? tagBuilder, - TextAlign textAlign,
- TextDirection? textDirection,
- bool clearable,
- AlignmentGeometry anchor,
- AlignmentGeometry fieldAnchor,
- FPortalConstraints popoverConstraints,
- FPortalSpacing spacing,
- Offset shift(),
- Offset offset,
- FPopoverHideRegion hideRegion,
- Widget contentEmptyBuilder(),
- ScrollController? contentScrollController,
- bool contentScrollHandles,
- ScrollPhysics contentPhysics,
- FItemDivider contentDivider,
- int min,
- int? max,
- Set<
T> ? initialValue, - Key? key,
Creates a searchable select with dynamic content based on search input.
The searchFieldProperties
can be used to customize the search field.
The filter
callback produces a list of items based on the search query either synchronously or asynchronously.
The contentBuilder
callback builds the list of items based on search results returned by filter
.
The contentLoadingBuilder
is used to show a loading indicator while the search results is processed
asynchronously by filter
.
The contentErrorBuilder
is used to show an error message when filter
is asynchronous and fails.
Implementation
factory FMultiSelect.searchBuilder({
required Widget Function(T) format,
required FutureOr<Iterable<T>> Function(String) filter,
required FSelectSearchContentBuilder<T> contentBuilder,
FSelectSearchFieldProperties searchFieldProperties,
Widget Function(BuildContext, FSelectSearchStyle) contentLoadingBuilder,
Widget Function(BuildContext, Object?, StackTrace)? contentErrorBuilder,
FMultiSelectController<T>? controller,
FMultiSelectStyle Function(FMultiSelectStyle)? style,
bool autofocus,
FocusNode? focusNode,
FFieldIconBuilder<FMultiSelectStyle>? prefixBuilder,
FFieldIconBuilder<FMultiSelectStyle>? suffixBuilder,
Widget? label,
Widget? description,
bool enabled,
ValueChanged<Set<T>>? onChange,
void Function(Set<T>)? onSaved,
AutovalidateMode autovalidateMode,
String? forceErrorText,
String? Function(Set<T>) validator,
Widget Function(BuildContext, String) errorBuilder,
Widget? hint,
bool keepHint,
int Function(T, T)? sort,
FMultiSelectTagBuilder<T>? tagBuilder,
TextAlign textAlign,
TextDirection? textDirection,
bool clearable,
AlignmentGeometry anchor,
AlignmentGeometry fieldAnchor,
FPortalConstraints popoverConstraints,
FPortalSpacing spacing,
Offset Function(Size, FPortalChildBox, FPortalBox) shift,
Offset offset,
FPopoverHideRegion hideRegion,
Widget Function(BuildContext, FMultiSelectStyle) contentEmptyBuilder,
ScrollController? contentScrollController,
bool contentScrollHandles,
ScrollPhysics contentPhysics,
FItemDivider contentDivider,
int min,
int? max,
Set<T>? initialValue,
Key? key,
}) = _SearchSelect<T>;