MenuSearchCallback typedef

MenuSearchCallback = int? Function(List<MenuItem> items, String query)

Callback for custom search-highlight logic.

Receives the current (possibly filtered) items and the query, and should return the index of the best match, or null if nothing matches.

Implementation

typedef MenuSearchCallback = int? Function(List<MenuItem> items, String query);