getwidget
getwidget copied to clipboard
How about adding support for Future methods to "GFSearchBar"
Is your feature request related to a problem? Please describe. Yes, I think my feature request is related to the problem
Describe the solution you'd like I found that many search results are often based on network requests or database queries, but searchQueryBuilder does not support asynchronous methods, which causes a huge obstacle to the result echo, which is obviously very inconvenient
Describe alternatives you've considered I could of course write a search box myself, that would be very easy to do. But I really like this ui component, it's very easy to use, so I hope to be able to implement it directly here.
Additional context I looked at the source code and only need to modify the following lines of code to achieve support
typedef QueryBuilder<T> = List<T> Function(
String query,
List<T> list,
);
/// =============>
typedef QueryBuilder<T> = Future<List<T>> Function(
String query,
List<T> list,
);
/// ======================================
textController.addListener(() {
xxxxxxx...
}
/// =============>
textController.addListener(() async {
xxxxxxx...
}