SearchAppbar class

用于搜索的AppBar 该组件是BrnAppBar的特例包装, 实现的思路是:将BrnAppBar.title设置为textField 更多信息 请查看BrnAppBar

Inheritance

Constructors

SearchAppbar({Key? key, TextEditingController? controller, FocusNode? focusNode, dynamic leading, SearchBarLeadClickCallback? leadClickCallback, SearchBarDismissClickCallback? dismissClickCallback, SearchBarInputChangeCallback? searchBarInputChangeCallback, SearchBarInputSubmitCallback? searchBarInputSubmitCallback, String? hint, TextStyle? hintStyle, TextStyle? dismissStyle, bool showDivider = true, bool autoFocus = true, VoidCallback? onClearTap, SystemUiOverlayStyle? systemOverlayStyle, TextStyle? inputTextStyle, AppBarConfig? themeData})

Properties

autoFocus bool
是否默认获取焦点
final
child Widget
The widget below this widget in the tree.
no setteroverride
controller TextEditingController?
搜索框的文本输入控制器
final
dismissClickCallback SearchBarDismissClickCallback?
取消点击的回调
final
dismissStyle TextStyle?
右侧取消的文本Style
final
focusNode FocusNode?
搜索框的焦点控制器
final
hashCode int
The hash code for this object.
no setterinherited
hint String?
输入框的hint文字
final
hintStyle TextStyle?
输入框的hint的Style
final
inputTextStyle TextStyle?
输入框的文本Style
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leadClickCallback SearchBarLeadClickCallback?
搜索框的左侧leading
final
leading → dynamic
可以是字符串也可以是widget
final
onClearTap VoidCallback?
清空回调
final
preferredSize Size
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchBarInputChangeCallback SearchBarInputChangeCallback?
输入变化的监听
final
searchBarInputSubmitCallback SearchBarInputSubmitCallback?
输入框提交的监听
final
showDivider bool
左侧的leading和搜索的分割线
final
systemOverlayStyle SystemUiOverlayStyle?
final
themeData AppBarConfig?
getter/setter pair

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, int wrapWidth = 65}) 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