SearchableDropdownFormField<T> class

Inheritance
Annotations

Constructors

SearchableDropdownFormField({required List<SearchableDropdownMenuItem<T>>? items, Key? key, SearchableDropdownController<T>? controller, void onSaved(T?)?, String? validator(T?)?, T? initialValue, AutovalidateMode? autovalidateMode, Widget? hintText, EdgeInsetsGeometry? margin, bool isEnabled = true, VoidCallback? disabledOnTap, Widget errorWidget(String?)?, Widget backgroundDecoration(Widget)?, void onChanged(T?)?, Widget? noRecordTex, Widget? trailingIcon, Widget? trailingClearIcon, Widget? leadingIcon, String? searchHintText, double? dropDownMaxHeight, bool isDialogExpanded = true, bool hasTrailingClearIcon = true, double? dialogOffset})
SearchableDropdownFormField.future({required Future<List<SearchableDropdownMenuItem<T>>?> futureRequest()?, SearchableDropdownController<T>? controller, Key? key, void onSaved(T?)?, String? validator(T?)?, SearchableDropdownMenuItem<T>? initialValue, AutovalidateMode? autovalidateMode, Widget? hintText, EdgeInsetsGeometry? margin, bool isEnabled = true, VoidCallback? disabledOnTap, Widget errorWidget(String?)?, Widget backgroundDecoration(Widget)?, void onChanged(T?)?, Widget? noRecordTex, Widget? trailingIcon, Widget? trailingClearIcon, Widget? leadingIcon, String? searchHintText, double? dropDownMaxHeight, Duration? changeCompletionDelay, bool isDialogExpanded = true, bool hasTrailingClearIcon = true, double? dialogOffset})
SearchableDropdownFormField.paginated({required Future<List<SearchableDropdownMenuItem<T>>?> paginatedRequest(int, String?)?, int? requestItemCount, Key? key, SearchableDropdownController<T>? controller, void onSaved(T?)?, String? validator(T?)?, SearchableDropdownMenuItem<T>? initialValue, AutovalidateMode? autovalidateMode, Widget? hintText, EdgeInsetsGeometry? margin, bool isEnabled = true, VoidCallback? disabledOnTap, Widget errorWidget(String?)?, Widget backgroundDecoration(Widget)?, void onChanged(T?)?, Widget? noRecordTex, Widget? trailingIcon, Widget? trailingClearIcon, Widget? leadingIcon, String? searchHintText, Duration? changeCompletionDelay, double? dropDownMaxHeight, bool isDialogExpanded = true, bool hasTrailingClearIcon = true, double? dialogOffset})

Properties

autovalidateMode AutovalidateMode
Used to enable/disable this form field auto validation and update its error text.
finalinherited
backgroundDecoration → (Widget Function(Widget child)?)
Background decoration of dropdown, i.e. with this you can wrap dropdown with Card.
final
builder FormFieldBuilder<T>
Function that returns the widget representing this form field. It is passed the form field state as input, containing the current value and validation state of this field.
finalinherited
changeCompletionDelay Duration?
Delay of dropdown's search callback after typing complete.
final
controller SearchableDropdownController<T>?
final
dialogOffset double?
Dialog offset from dropdown.
final
disabledOnTap VoidCallback?
final
Height of dropdown's dialog, default: MediaQuery.of(context).size.height*0.3.
final
enabled bool
Whether the form is able to receive user input.
finalinherited
errorWidget → (Widget Function(String? errorText)?)
Validation Error widget which is shown under dropdown.
final
futureRequest → (Future<List<SearchableDropdownMenuItem<T>>?> Function()?)
Future service which is returns DropdownMenuItem list.
final
hashCode int
The hash code for this object.
no setterinherited
hasTrailingClearIcon bool
Activates clear icon trailing.
final
hintText Widget?
Hint text shown when the dropdown is empty.
final
initialFutureValue SearchableDropdownMenuItem<T>?
Initial value for future and paginated dropdowns.
final
initialValue → T?
An optional value to initialize the form field to, or null otherwise.
finalinherited
isDialogExpanded bool
If its true dialog will be expanded all width of screen, otherwise dialog will be same size of dropdown.
final
isEnabled bool
Is dropdown enabled.
final
items List<SearchableDropdownMenuItem<T>>?
Dropdown items.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leadingIcon Widget?
Dropdown trailing icon.
final
margin EdgeInsetsGeometry?
Dropdowns margin padding with other widgets.
final
noRecordText Widget?
Shows if there is no record found.
final
onChanged → (void Function(T? value)?)
Returns selected Item.
final
onSaved FormFieldSetter<T>?
An optional method to call with the final value when the form is saved via FormState.save.
finalinherited
paginatedRequest → (Future<List<SearchableDropdownMenuItem<T>>?> Function(int page, String? searchKey)?)
Paginated request service which is returns DropdownMenuItem list.
final
requestItemCount int?
Paginated request item count which returns in one page, this value is using for knowledge about isDropdown has more item or not.
final
restorationId String?
Restoration ID to save and restore the state of the form field.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchHintText String?
SearchBar hint text.
final
trailingClearIcon Widget?
Dropdown trailing clear icon that clears current selected value.
final
trailingIcon Widget?
Dropdown trailing icon.
final
validator FormFieldValidator<T>?
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() FormFieldState<T>
Creates the mutable state for this widget at a given location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited