Website: https://web.flatteredwithflutter.com/#/

We will cover briefly about

  1. Implement Search in Flutter Web

  2. Saving the user searches (Bonus)

  3. Displaying user search history (Bonus)


Implement Search in Flutter Web

Let’s start with the algorithm

We extracted out the algorithm(StringSearch) for searching and put inside a separate file called string_search.dart

StringSearch(this.input, this.searchTerm)
  • input: List<String>, e.g [‘Hey’, ‘there’]

  • searchTerm: String which the user searched. e.g here

Condition: Length of searchTerm should be more than 1 letter. e.g If user searches for h, we return empty.

Medium: https://medium.com/flutterpub/flutter-web-and-search-48bf2db8b1c4

Website: https://flatteredwithflutter.com/how-to-implement-search-in-flutter-web/

DevTo: https://dev.to/aseemwangoo/flutter-web-and-search-2j0j