Fluxer is a free and open source instant messaging and VoIP platform for friends, groups, and communities. Self-host it and every feature is unlocked.
This is a package for Dart / Flutter that allows you access to the Fluxer API, and it's also used in the offical Fluxer app!
- Dart 3.11.0+ or Flutter 3.29.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)
dependencies:
fluxer_dart:
git:
url: https://github.com/fluxerapp/dart_sdk.git
#ref: maindependencies:
fluxer_dart:
path: /path/to/fluxer_dartimport 'package:dio/dio.dart';
import 'package:fluxer_dart/export.dart';
final dio = Dio(BaseOptions(baseUrl: 'https://api.fluxer.app/v1'));
dio.options.headers['Authorization'] = 'Bearer your_token_here';
final client = FluxerClient(dio);
final user = await client.users.getCurrentUser();
final guilds = await client.guilds.listGuilds();Point the Dio base URL at your own API endpoint:
final dio = Dio(BaseOptions(baseUrl: 'https://api.your-domain.com/v1'));
dio.options.headers['Authorization'] = 'Bearer your_token_here';
final client = FluxerClient(dio);Note
The default base path is https://api.fluxer.app/v1. Include the full path with the version prefix (e.g. /v1).
Found a bug? Please file an issue on the main Fluxer repository:
When reporting issues related to this Dart SDK, please:
- Add
[dart_sdk]tag at the start of the title - Include your Dart/Flutter version
- Provide a minimal code example that reproduces the issue (if possible)
- Include the SDK version you're using
Access API groups via the FluxerClient instance:
client.auth // Authentication (login, MFA, register)
client.users // Current user, settings, relationships
client.guilds // Guild CRUD, audit logs, bans
client.channels // Channels, messages, reactions, pins
client.gateway // WebSocket gateway info
client.instance // Server info (/.well-known/fluxer)
client.admin // Admin endpoints
// ... and 17 more API groupsPass auth tokens via Dio headers. The SDK does not manage auth state — your app controls the Dio instance:
// Session token (user login)
dio.options.headers['Authorization'] = 'Bearer $sessionToken';
// Bot token
dio.options.headers['Authorization'] = 'Bot $botToken';This SDK is generated from the Fluxer OpenAPI spec using openapi_retrofit_generator (Retrofit + json_serializable).
# Regenerate (requires: dart, python3, curl)
./generate.shThe generation pipeline downloads the spec, applies patches for live API divergences, generates Dart code, runs build_runner, and formats.
# Run all tests (serialization + integration)
dart test
# Run spec drift detection (checks live API vs spec)
dart test test/integration/spec_drift_test.dartIntegration tests require credentials in .env — see .env.example.
