Embracing parallelism with isolates
Product search is one of the most essential features of a regular e-commerce app. However, a common problem that users face when searching for something is making typos. This issue is so prevalent that several algorithms are designed to solve it by returning results that closely match the search query, even if it’s not an exact match. This approach is often referred to as fuzzy search. Algorithms like those used for implementing fuzzy search can be greedy and spend many resources on number crunching, resulting in degraded UI performance. Let’s implement the fuzzy search feature in our Candy Store app and make sure our app performance is not affected with the help of isolates.
Implementing fuzzy search in the Candy Store app
To implement this feature, we will perform the following steps:
- Add a search bar to the main products screen.
- Implement a
List<Product> search(String query)
function inAppProductRepository...