flutterfirebase-realtime-databasesearch-suggestion

Flutter TextFormField should give suggestions based on data in firebase


Can anybody give me a hint ? If you need further information please write a comment.


Solution

  • For Autocomplete solutions, it's advisable to maintain a master list of all entries and keywords that would be searchable, in practice this can be all stored in an array in a single Firestore document - firestore document restrictions apply. You would maintain this with cloud functions based on your design and potentially cloud triggers.

    With the new Bundle feature from Firestore, you can allow every client to have direct access to this information, it's only up to you to process the search input and compare it to the master document.