Skip to content
pubscout

nhost_dart

2.3.0, released 8 days ago by nhost.io

Dart and Flutter client for Nhost Auth, Storage, Functions, and GraphQL.

WASM-ready
$ flutter pub add nhost_dart
Source repository

What it does

Provides API clients for Nhost services, allowing users to handle authentication, file storage, serverless functions, and GraphQL helpers. It supports both cloud subdomains and self-hosted service URLs.

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

Use it when

  • You are building a Dart or Flutter application backed by Nhost.
  • You need to handle user registration, login, and multi-factor authentication.
  • You need to upload, store, and transform files securely.

Skip it when

  • Your backend is built on Firebase, Supabase, or Appwrite instead of Nhost.
  • You only require low-level HTTP networking without Nhost services.

Strengths

  • Comprehensive integration with Nhost authentication and storage APIs.
  • Supports both cloud-hosted subdomains and self-hosted project URLs.
  • Includes GraphQL adapter support.

Weaknesses

  • Tightly coupled to the Nhost ecosystem.
  • Limited documentation outside of basic initialization and sample usage.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
10

Initialize NhostClient with your subdomain or service URLs.

import 'package:nhost_dart/nhost_dart.dart';

void main() async {
  final nhost = NhostClient(
    subdomain: Subdomain(
      region: 'eu-central-1',
      subdomain: 'backend-5e69d1d7',
    ),
  );

  final authResponse = await nhost.auth.signUp(
    email: 'new-user@gmail.com',
    password: 'password-1',
  );

  await nhost.auth.signOut();
  nhost.close();
}

Alternatives

Packages that do the same job and could replace nhost_dart.

Works with

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