meilisearch 0.16.0 copy "meilisearch: ^0.16.0" to clipboard
meilisearch: ^0.16.0 copied to clipboard

Meilisearch Dart is the Meilisearch API client for Dart and Flutter developers.

example/lib/main.dart

import 'package:meilisearch/meilisearch.dart';

void main() async {
  var client = MeiliSearchClient('http://127.0.0.1:7700', 'masterKey');

  // An index where books are stored.
  await client.createIndex('books');
  var index = await client.getIndex('books');

  var documents = [
    {'book_id': 123, 'title': 'Pride and Prejudice'},
    {'book_id': 456, 'title': 'Le Petit Prince'},
    {'book_id': 1, 'title': 'Alice In Wonderland'},
    {'book_id': 1344, 'title': 'The Hobbit'},
    {'book_id': 4, 'title': 'Harry Potter and the Half-Blood Prince'},
    {'book_id': 42, 'title': 'The Hitchhiker\'s Guide to the Galaxy'}
  ];

  // Add documents into index we just created.
  await index.addDocuments(documents);

  // Search
  var result = await index.search('prience');
  print(result.hits);
}
54
likes
140
pub points
89%
popularity
screenshot

Publisher

verified publishermeilisearch.com

Meilisearch Dart is the Meilisearch API client for Dart and Flutter developers.

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (LICENSE)

Dependencies

collection, crypto, dio, json_annotation, meta

More

Packages that depend on meilisearch