YaruSearchField class

A TextField to with fully rounded corners, ideally in a YaruWindowTitleBar or YaruDialogTitleBar

Inheritance

Constructors

YaruSearchField({Key? key, String? text, void onSubmitted(String? value)?, String? hintText, double height = kYaruTitleBarItemHeight, EdgeInsets contentPadding = const EdgeInsets.only(bottom: 10, top: 10, right: 15, left: 15), bool autofocus = true, void onClear()?, void onChanged(String value)?, Radius radius = const Radius.circular(kYaruTitleBarItemHeight), YaruSearchFieldStyle style = YaruSearchFieldStyle.filled, Color? borderColor, Color? fillColor, TextEditingController? controller, FocusNode? focusNode, Widget? clearIcon})
const

Properties

autofocus bool
Defines if the TextField is autofocused on build
final
borderColor Color?
Optional Color for the border. If not provided it will fall back to ColorScheme.dividerColor.
final
clearIcon Widget?
Optional icon shown inside the clear button.
final
contentPadding EdgeInsets
The padding for the InputDecoration that defaults to EdgeInsets.only(bottom: 10,top: 10, right: 15, left: 15)
final
controller TextEditingController?
Optional controller for the internal TextField
final
fillColor Color?
Optional Color for the border. If not provided it will fall back to ColorScheme.dividerColor.
final
focusNode FocusNode?
Optional FocusNode for the internal KeyboardListener
final
hashCode int
The hash code for this object.
no setterinherited
height double
The height of the TextField that defaults to kYaruTitleBarItemHeight
final
hintText String?
Optional String used inside the internal InputDecoration
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged → (void Function(String value)?)
The callback forwarded to the TextField used when input changes
final
onClear → (void Function()?)
Optional callback used to clear the TextField. If provided an IconButton will use it as the suffix icon inside the InputDecoration
final
onSubmitted → (void Function(String? value)?)
The callback forwarded to the TextField used when the enter key is pressed
final
radius Radius
Defines the radius for the corners.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style YaruSearchFieldStyle
final
text String?
Optional String forwarded to the internal TextEditingController
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<YaruSearchField>
Creates the mutable state for this widget at a given location in the tree.
override
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