TxSearchDelegate<T> class
abstract
委托 showTxSearch 来定义搜索页面的内容。
详情参考SearchDelegate
Constructors
- TxSearchDelegate.new({String? searchFieldLabel, TextStyle? searchFieldStyle, InputDecorationTheme? searchFieldDecorationTheme, TextInputType? keyboardType, TextInputAction textInputAction = TextInputAction.search, bool automaticallyImplyLeading = false})
Properties
- automaticallyImplyLeading → bool
-
是否自动设置返回按钮
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- keyboardType → TextInputType?
-
用于键盘的操作按钮的类型。
final
- query ↔ String
-
AppBar 中显示的当前查询字符串.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchFieldDecorationTheme → InputDecorationTheme?
-
用于配置搜索字段的视觉对象的 InputDecorationTheme。
final
- searchFieldLabel → String?
-
搜索字段为空时显示在的提示文本。
final
- searchFieldStyle → TextStyle?
-
searchFieldLabel 的样式。
final
- textInputAction → TextInputAction
-
将软键盘配置为特定操作按钮的文本输入操作。
final
-
transitionAnimation
→ Animation<
double> -
在搜索页面淡入或淡出时触发的 Animation。
no setter
Methods
-
appBarTheme(
BuildContext context) → ThemeData - 用于配置搜索页面的主题。
-
buildActions(
BuildContext context) → List< Widget> ? - 在 AppBar 中搜索查询后显示的小组件。
-
buildBottom(
BuildContext context) → PreferredSizeWidget? - 要在 AppBar 底部显示的小部件
-
buildLeading(
BuildContext context) → Widget? - 要在 AppBar 中的当前查询之前显示的小组件。
-
buildPrefixIcon(
BuildContext context) → Widget? -
buildResults(
BuildContext context) → Widget - 用户从搜索页面提交搜索后显示的结果。
-
buildSuggestions(
BuildContext context) → Widget - 当用户在搜索字段中键入查询时,搜索页正文中显示的建议。
-
close(
BuildContext context, T result) → void - 关闭搜索页并返回到基础路由。
-
dispose(
) → void - 页面销毁时调用
-
initState(
) → void - 页面初始化时调用
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onQueryChanged(
) → void - query 变动时调用
-
showResults(
BuildContext context, [bool removeFocus = true]) → void - 从 buildSuggestions 返回的建议过渡到 buildResults 返回的 query 结果。
-
showSuggestions(
BuildContext context) → void - 从显示 buildResults 返回的结果过渡到显示 buildSuggestions 返回的建议。
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited