suggestionsCallback property Null safety

SuggestionsCallback<T> suggestionsCallback

Called with the search pattern to get the search suggestions.

This callback must not be null. It is be called by the TypeAhead widget and provided with the search pattern. It should return a List of suggestions either synchronously, or asynchronously (as the result of a Future). Typically, the list of suggestions should not contain more than 4 or 5 entries. These entries will then be provided to itemBuilder to display the suggestions.


suggestionsCallback: (pattern) async {
  return await _getSuggestions(pattern);


final SuggestionsCallback<T> suggestionsCallback;