自定义自动完成颤动

问题描述 投票:0回答:1

有没有flutter包可以实现这样的功能。我需要一个可搜索的列表,例如自动完成表单,并且在点击时将所选项目作为字符串返回。我还没有找到任何接近于此的东西。

flutter dart autocomplete
1个回答
0
投票

我想这就是你要找的

 @override
  Widget build(BuildContext context) (
    return Container(
      padding: const EdgeInsets.all(12),
      child: SubstringHighlight(
        text: dropDownItem,     // search result string from database or something
        term: searchTerm,       // user typed "et"
      ),
    );
  )

https://pub.dev/packages/substring_highlight

© www.soinside.com 2019 - 2024. All rights reserved.