Skip to content
pubscout

nhost_sdk

5.8.1, released 8 days ago by nhost.io

Dart SDK for Nhost authentication and file storage APIs.

WASM-ready
$ flutter pub add nhost_sdk
Source repository

What it does

Provides functions to sign users in, manage sessions, and upload, download, or replace files on Nhost storage. It abstracts HTTP calls to the Nhost backend.

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

Use it when

  • You need direct Nhost auth and storage access in a pure Dart or Flutter app
  • You prefer a lightweight client without Firebase or Supabase dependencies

Skip it when

  • You need a full-featured UI auth flow (use nhost_dart or nhost_flutter_auth)
  • You require code generation for models (this package has none)

Strengths

  • Supports latest Nhost features like metadata on sign‑in and file replace
  • Works across all Dart platforms (mobile, web, desktop)
  • No codegen required, simple imperative API

Weaknesses

  • Only low‑level SDK; no ready‑made UI widgets
  • Documentation advises not to use it directly in Flutter projects
  • Limited to Nhost ecosystem

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
6
import 'package:nhost_sdk/nhost_sdk.dart';

final client = NhostClient(url: 'https://backend.nhost.app', adminSecret: 'secret');
await client.auth.signInWithEmailPassword(email: 'user@example.com', password: 'pwd');
final file = await client.storage.uploadFile(path: '/avatars/me.png', fileBytes: bytes);
print('Uploaded: ${file.id}');

Alternatives

Packages that do the same job and could replace nhost_sdk.

Works with

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