Jerry
Jerry

Reputation: 35

Using Algolia InstantSearch with Dart via package:js/dart.js

I have been trying to use the package:js/dart.js to implement Algolia InstantSearch into an existing Dart project. I am fairly experienced with Dart, but not with javascript.

Can anyone point me to any examples of how I would do something like this?

I am trying to do the following:

  1. Create a component named "SearchComponent".
  2. Create a service named "algoliaSearchService".
  3. Use package:js/js.dart to interact with the Algolia InstantSearch javascript API.
  4. Use package:js/js.dart to initialize the InstantSearch App via the InstantSearch javascript API.
  5. Use package:js/js.dart to add an InstantSearch search-box widget to the InstantSearch App via the InstantSearch javascript API.
  6. Use package:js/js.dart to add an InstantSearch hits widget to the InstantSearch App via the InstantSearch javascript API.

Any guidance is appreciated!

Upvotes: 2

Views: 677

Answers (2)

Nayan Hathiwala
Nayan Hathiwala

Reputation: 61

You can try unofficial Dart Algolia SDK, which is independent of iOS / Android, thus it can be easily implemented in your non-Flutter projects (such as Dart website, DartAngular).

You can find it on Dart’s website, or here is the link https://pub.dartlang.org/packages/algolia and there many more features to come in newer releases.

Upvotes: 0

Marie-Laure
Marie-Laure

Reputation: 46

Unfortunately we do not have any guide on how to implement Algolia with Dart at the moment, but we would love to see Dart working with Algolia!

Could you maybe share a GitHub project that you started or maybe a JSFiddle so that we can help you progressively? It will be easier to take it from there.

You can also take a look at the Angular guide that is a bit similar to Dart.

Happy coding!

Upvotes: 1

Related Questions