1
0
Fork 0
mirror of https://github.com/fluxerapp/dart_sdk.git synced 2026-07-10 22:37:47 +00:00
Fluxer Dart SDK is a Dart client library for interacting with the Fluxer API, enabling developers to build bots, integrations, and applications that communicate with Fluxer servers. https://pub.dev/packages/fluxer_dart
  • Dart 99.8%
  • Shell 0.2%
Find a file
2026-07-10 16:34:16 +00:00
.github/workflows ci(regenerate): add repository_dispatch 2026-07-04 01:30:17 +01:00
doc chore(gen): regenerate SDK from OpenAPI spec 2026-02-23 18:07:27 +01:00
lib chore(sdk): regenerate from OpenAPI 2026-07-10 16:34:16 +00:00
media chore: add README 2026-02-17 23:24:25 +01:00
scripts ci: use FLUXER_CI_APP_USER_ID 2026-07-04 00:47:48 +01:00
test feat(gateway): expose likely-stale heartbeat ack detection 2026-06-28 20:11:55 +02:00
.env.example chore(gen): regenerate SDK with enum toJson fix and cleanup old generator artifacts 2026-03-20 16:47:10 +01:00
.gitignore chore(gen): regenerate SDK with enum toJson fix and cleanup old generator artifacts 2026-03-20 16:47:10 +01:00
.pubignore chore(sdk): regenerate from upstream OpenAPI without patches 2026-06-26 08:20:49 +02:00
analysis_options.yaml chore: exclude test files from analysis 2026-03-20 19:48:29 +01:00
build.yaml chore(sdk): regenerate from upstream OpenAPI without patches 2026-06-26 08:20:49 +02:00
CHANGELOG.md chore(sdk): regenerate from upstream OpenAPI without patches 2026-06-26 08:20:49 +02:00
LICENSE chore: create license 2026-02-17 17:44:54 +01:00
openapi_generator.yaml Fix SDK toJson() sending null fields by enabling includeIfNull annotation 2026-03-30 21:41:34 +02:00
pubspec.yaml build: upgrade openapi_sdk_gen to 2.3.1 2026-07-07 16:28:09 +01:00
README.md ci: single workflow (#3) 2026-06-27 23:58:36 +01:00

Fluxer graphic logo

Donate Documentation AGPLv3 License pub.dev package

Fluxer Dart SDK

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!

Requirements

Installation & Usage

Github

dependencies:
  fluxer_dart:
    git:
      url: https://github.com/fluxerapp/dart_sdk.git
      #ref: main

Local development

dependencies:
  fluxer_dart:
    path: /path/to/fluxer_dart

Getting Started

Basic Usage

import '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();

Self-Hosted Instance

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).

Issues & Bug Reports

Found a bug? Please file an issue on the main Fluxer repository:

Report an issue →

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

API Groups

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 groups

Authentication

Pass 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';

SDK Generation

This SDK is generated from the Fluxer OpenAPI spec using openapi_sdk_gen (Retrofit + json_serializable).

The Regenerate SDK workflow is used to synchronise.

Testing

# Run all tests (serialization + integration)
dart test

# Run spec drift detection (checks live API vs spec)
dart test test/integration/spec_drift_test.dart

Integration tests require credentials in .env — see .env.example.