nhost_sdk
5.8.1, released 8 days ago by nhost.io
Dart SDK for Nhost authentication and file storage APIs.
WASM-ready
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.
- shared_preferences
For simple key‑value storage instead of Nhost file storage
97Compare - flutter_secure_storage
When you need secure local storage rather than remote Nhost storage
93Compare - sqflite
If you prefer a local SQLite database over remote file storage
96Compare
Works with
Packages commonly used together with nhost_sdk: ones it builds on, ones built on it, and its own family.
- http_parsernhost_sdk depends on itA platform-independent package for parsing and serializing HTTP formats.
- loggingnhost_sdk depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- jwt_decodernhost_sdk depends on itDecode Json Web Tokens and check expiration status without a password.
- nhost_flutter_authSame familyProvides Nhost authentication state to your Flutter app.
- nhost_graphql_adapterBuilt on nhost_sdkAdapter that connects the graphql package to an Nhost.io GraphQL backend
- nhost_dartBuilt on nhost_sdkDart and Flutter client for Nhost Auth, Storage, Functions, and GraphQL.