Skip to content
pubscout

typesense

0.6.0, released 4 months ago by typesense.org

Dart client library for accessing the HTTP API of the Typesense search engine.

$ flutter pub add typesense
Source repository

What it does

Provides a Dart and Flutter client to connect and interact with the Typesense search engine HTTP API. Allows performing searches, managing collections, documents, synonyms, and other engine operations.

AI-written summary of version 0.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Flutter app that connects directly to a Typesense search backend.
  • You need to execute full-text search, filtering, and sorting queries against Typesense.

Skip it when

  • You need a general-purpose HTTP client rather than a Typesense-specific API wrapper.
  • You are using a search engine other than Typesense.

Strengths

  • Direct integration with Typesense search engine APIs.
  • Supports multi-node configurations, retries, and connection timeouts.
  • Actively updated with support for recent Typesense server features.

Weaknesses

  • Still under development, meaning some APIs might change in future versions.
  • Exposing master API keys in user-facing apps is insecure; requires setting up search-only keys.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2

Add the dependency to pubspec.yaml and configure a Client with your node addresses and API key.

import 'package:typesense/typesense.dart';

void main() async {
  final config = Configuration(
    'xyz',
    nodes: {
      Node(Protocol.http, 'localhost', port: 8108),
    },
  );
  final client = Client(config);
  await client.collection('companies').documents.search({'q': 'stark'});
}

Alternatives

Packages that do the same job and could replace typesense.

  • dio

    If you want a powerful generic HTTP client for handling requests instead of the dedicated Typesense wrapper.

Works with

Packages commonly used together with typesense: ones it builds on, ones built on it, and its own family.