baxcloud_core 0.1.5
baxcloud_core: ^0.1.5 copied to clipboard
Headless BaxCloud foundation — config, HTTP API, tokens, rooms, and analytics metadata for Flutter SDKs and UI kits.
baxcloud_core #
Headless BaxCloud foundation for Flutter SDKs and UI kits.
Features #
BaxConfig—projectId,apiKey, optionalbundleId/appVersion/buildNumberBaxApiClient— tokens, rooms, call invites, push-token registrationBaxRoomSession— room credential session helperBaxcloudUser— shared identity;avatarUrlonly here; participantmetadata+update/copyWithBaxSdkTelemetry— UI kits register package name/version; sent asdeviceMetadata.sdkon token create- On release, bump
pubspec.yamlandlib/version.dartto the same version
- On release, bump
- Call models (
BaxCallInvitation,BaxPushPlatform, …) - Analytics device + location metadata on token requests (OS, platform, model, versions, locale, country/continent)
- Host
appVersion/buildNumber= client app;sdk= BaxCloud packages - Dashboard resolves raw device model codes to marketing names where known
- Host
Installation #
dependencies:
baxcloud_core: ^0.1.5
flutter pub get
Quick start #
import 'package:baxcloud_core/baxcloud_core.dart';
var user = BaxcloudUser(
userId: 'u1',
name: 'Ada',
avatarUrl: 'https://example.com/ada.png',
metadata: {'role': 'host', 'locale': 'en'},
);
// Later — patch profile / custom map (mergeMetadata defaults to true)
user = user.update(name: 'Ada Lovelace', metadata: {'plan': 'pro'});
final config = BaxConfig(
projectId: 'your-project-id',
apiKey: 'bax_pk_your_client_key',
);
final client = BaxApiClient(config: config);
final creds = await client.createToken(
BaxTokenRequest(
roomName: 'lobby',
userId: user.userId,
userName: user.name,
avatarUrl: user.avatarUrl,
metadata: user.metadata, // participant only
// roomMetadata: {'title': 'Lobby'}, // only when room is auto-created
),
);
Prefer a client key (bax_pk_…) from the dashboard.
Documentation #
| Resource | Link |
|---|---|
| UI Kits overview | baxcloud.tech/docs/uikits |
| Calls UI Kit | baxcloud.tech/docs/uikits/calls |
| API authentication | baxcloud.tech/docs/api/authentication |
| Site | baxcloud.tech |
UI kits and BaxApiClient talk to BaxCloud for you — prefer those APIs over raw HTTP.
License #
MIT — see LICENSE.