StandardSuggestionsBox class

Inheritance

Constructors

StandardSuggestionsBox({Key? key, required List<String> suggestions, required double borderRadius, required Color backgroundColor, required dynamic onSuggestionSelected(String), required dynamic onTapInside(PointerEvent), required dynamic onTapOutside(PointerEvent), required double boxHeight, required EdgeInsetsGeometry boxPadding, required TextStyle suggestionTextStyle, Color? hoverColor, Color? highlightColor, Decoration? decoration})
const

Properties

backgroundColor Color
The background color of the suggestions box. This param is the same as the one in the StandardSearchBar class.
final
borderRadius double
The radius of the bottom corners of the suggestions box. This param is the same as the one in the StandardSearchBar class.
final
boxHeight double
The height of the suggestions box. This param is the same as the one in the StandardSearchBar class.
final
boxPadding EdgeInsetsGeometry
The padding of the suggestions box list tiles. This param is the same as the one in the StandardSearchBar class.
final
decoration Decoration?
The decoration of the suggestions box. This param is the same as the one in the StandardSearchBar class.
final
hashCode int
The hash code for this object.
no setterinherited
highlightColor Color?
The color of the suggestions when highlighted. This param is the same as the one in the StandardSearchBar class.
final
hoverColor Color?
The color of the suggestions when hovered. This param is the same as the one in the StandardSearchBar class.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onSuggestionSelected → dynamic Function(String)
Callback function when a suggestion is selected. Basically, it takes the selected suggestion and put it in the text field. Then, it calls the onSubmitted callback function and unfocus the text field.
final
onTapInside → dynamic Function(PointerEvent)
Callback function when the suggestions box is tapped inside. Used to detect when the suggestions box is tapped inside so that the suggestions box can be closed. Same as the onTapOutside callback function.
final
onTapOutside → dynamic Function(PointerEvent)
Callback function when the suggestions box is tapped outside. Used to detect when the suggestions box is tapped outside so that the suggestions box can be closed. Same as the onTapInside callback function.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suggestions List<String>
List of suggestions to display. The StandardSearchBar class will pass the filtered and ordered suggestions to this class.
final
suggestionTextStyle TextStyle
The text style of the suggestions. This param is the same as the one in the StandardSearchBar class.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's 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