Closed AfiqMutaz closed 2 months ago
I feel silly, after more reading and understand the documentation. You just have to let the HitsSearcher build the the list of filters for you (HitsSearcher.buildFacetList). Set which attribute that you want filtering in your Algolia Dashboard index configuration. The api reference documentation also helped me figure out sorting. https://www.algolia.com/doc/api-reference/widgets/refinement-list/flutter/
The question exists in the docs but the docs lacks implementation specifically for Dart/Flutter. I have an array attribute 'services'. I've already added the attribute to attributesForFaceting. The 'services' attribute contains string values such as 'cleaner', 'electrician', 'plumber' and etc. I'm just not quite sure on how to implement it. Much of the code below is from the Getting Started docs, in their example, a string attribute is used. In its current state of my implementation, the StreamBuilder's snapshot is null. How does the helper know what services are there? Does it read from my index all the available services from the attribute?