Pure Dart
The DNotifier Dart SDK is pure Dart β no Flutter dependency. Use it in CLI tools, Dart servers, scripts, and any Dart 3 project that needs realtime messaging, AI, or workflows without a UI framework.
Requirements
Dart SDK
3.0 or later
DNotifier credentials
From app.dnotifier.com
β Install β Dart / Flutter (same package, skip Flutter steps)
Create a Dart project
dart create my_dnotifier_service
cd my_dnotifier_serviceAdd to pubspec.yaml:
name: my_dnotifier_service
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
dnotifier: ^1.1.10dart pub getWebSocket server or worker
Pure Dart on Linux, macOS, or Windows can hold persistent WebSocket connections β ideal for relay services, bots, and background workers.
Run with defines:
HTTP transport for APIs and scripts
One-shot scripts and REST-style services use HTTP:
Environment configuration
Compile-time defines
Runtime environment variables
For server deployments, read from Platform.environment:
Never commit secrets. Use your host's secret manager in production.
Knowledge base batch jobs
Index documents from the filesystem or a database:
Use transport: 'http' and respect plan word limits.
β Manage documents
Workflows in Dart
β Run a workflow
Concurrency
DNotifier is not isolate-safe. Use one instance per isolate:
Single worker
One DNotifier, one event loop
Multiple workers
One isolate per worker, each with its own userId
Isolate.spawn
Pass messages between isolates; do not share the client
Logging and observability
Enable SDK session logging for AI dashboard telemetry:
Workflow observability is enabled per workflow with observability: true.
β Session logging Β· Workflow observability
Deployment targets
VM (dart run / compiled exe)
Full WebSocket and HTTP support
Docker
Long-running ws services work well
Cloud Run / serverless
Prefer http for short-lived invocations
Pure Dart vs Flutter
Package
dnotifier
Same dnotifier package
WebSocket
β
β
UI lifecycle
Manual (signals, process exit)
dispose(), AppLifecycleState
Web target
Dart web compiler
Flutter Web
If you add a UI later, the same SDK calls transfer to Flutter with minimal changes.
Next steps
Node.js platform guide (JavaScript equivalent for servers)
Last updated