gpt4 book ai didi

search - Flutter - 更改 SearchDelegate 的搜索提示文本

转载 作者:IT老高 更新时间:2023-10-28 12:36:45 26 4
gpt4 key购买 nike

SearchDelegate 的当前实现中,没有更改提示文本的选项。当查询为空时,搜索屏幕会在查询字段中显示“搜索” 作为提示文本。

提示文本目前在第 395 行定义如下:

final String searchFieldLabel = MaterialLocalizations.of(context).searchFieldLabel;

然而,有一个 existing issue to this subject reported .

我无法为此提出任何解决方案。您知道该问题的任何解决方法吗?

最佳答案

目前 SearchDelegate 有一个可选成员“searchFieldLabel”来指定搜索字段的标签。它应该看起来像这样:

  @override
String get searchFieldLabel => 'custom label';

关于search - Flutter - 更改 SearchDelegate 的搜索提示文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54518741/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com