SearchableDropdownFormField<T> class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FormField<
T> - SearchableDropdownFormField
Constructors
-
SearchableDropdownFormField({Key? key, FormFieldSetter<
T> ? onSaved, FormFieldValidator<T> ? validator, T? initialValue, AutovalidateMode? autovalidateMode, Widget? hintText, EdgeInsetsGeometry? margin, T? value, bool isEnabled = true, VoidCallback? disabledOnTap, required List<SearchableDropdownMenuItem< ? items, Widget errorWidget(String? errorText)?, Widget backgroundDecoration(Widget child)?, void onChanged(T? value)?, Widget? noRecordText, Widget? trailingIcon, Widget? leadingIcon, String? searchHintText, double? dropDownMaxHeight})T> > -
SearchableDropdownFormField.future({Key? key, FormFieldSetter<
T> ? onSaved, FormFieldValidator<T> ? validator, T? initialValue, AutovalidateMode? autovalidateMode, Widget? hintText, EdgeInsetsGeometry? margin, bool isEnabled = true, VoidCallback? disabledOnTap, required Future<List< futureRequest()?, int? requestItemCount, Widget errorWidget(String? errorText)?, Widget backgroundDecoration(Widget child)?, void onChanged(T? value)?, Widget? noRecordText, Widget? trailingIcon, Widget? leadingIcon, String? searchHintText, double? dropDownMaxHeight})SearchableDropdownMenuItem< ?>T> > -
SearchableDropdownFormField.paginated({Key? key, FormFieldSetter<
T> ? onSaved, FormFieldValidator<T> ? validator, T? initialValue, AutovalidateMode? autovalidateMode, Widget? hintText, EdgeInsetsGeometry? margin, bool isEnabled = true, VoidCallback? disabledOnTap, required Future<List< paginatedRequest(int page, String? searchKey)?, int? requestItemCount, Widget errorWidget(String? errorText)?, Widget backgroundDecoration(Widget child)?, void onChanged(T? value)?, Widget? noRecordText, Widget? trailingIcon, Widget? leadingIcon, String? searchHintText, double? dropDownMaxHeight})SearchableDropdownMenuItem< ?>T> >
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
- disabledOnTap ↔ VoidCallback?
-
getter/setter pair
- dropDownMaxHeight → double?
-
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< Function()?)SearchableDropdownMenuItem< ?>T> > -
Future service which is returns DropdownMenuItem list
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hintText → Widget?
-
Hint text shown when the dropdown is empty
final
- initialValue → T?
-
An optional value to initialize the form field to, or null otherwise.
finalinherited
- isEnabled ↔ bool
-
getter/setter pair
-
items
↔ List<
SearchableDropdownMenuItem< ?T> > -
Dropdown items
getter/setter pair
- 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?
-
Shwons 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< Function(int page, String? searchKey)?)SearchableDropdownMenuItem< ?>T> > -
Paginated request service which is returns DropdownMenuItem list
getter/setter pair
- requestItemCount ↔ int?
-
Paginated request item count which returns in one page, this value is using for knowledge about isDropdown has more item or not.
getter/setter pair
- 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
- 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
- value ↔ T?
-
getter/setter pair
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