Flutter SDK
Build with the Flutter SDK
Configure the btx package for telemetry, feature flags, customer messages, knowledge base, and native integrations.
Choose the capabilities your app needs
The btx package exposes one facade for customer telemetry, feature flags,
customer messages, knowledge base content, and native push integration. Version
0.0.24 is the latest published release.
btx to a Dart 3.5 and Flutter 3.24 or newer app.Build the minimum integration
Configure once, identify the signed-in customer, then use the enabled facade surfaces from the host app.
import 'package:btx/btx.dart';
await Btx.configure(
BtxConfiguration(
publishableClientKey: 'cfk_...',
),
);
await Btx.identify(
const BtxCustomer(
externalId: 'customer_123',
name: 'Taylor',
email: 'taylor@example.com',
),
);
await Btx.log(
'checkout_started',
properties: <String, Object?>{'cartId': 'cart_123'},
);
await Btx.messenger.present();Mount BtxHost inside MaterialApp when the app uses the SDK-owned messenger,
knowledge base, foreground reply banners, or native push coordination.
MaterialApp(
home: BtxHost(
child: MyAppHome(),
),
)Use one integration order
- 01
Install and configure
Add
btx, then callBtx.configure(...)once during app startup. - 02
Identify the customer
Call
Btx.identify(...)after authentication or session restoration. - 03
Mount and connect surfaces
Place
BtxHostin the widget tree and wire messages or the knowledge base to customer-initiated controls. - 04
Add platform push when needed
Foreground replies work without push. Add iOS or Android push when customers need reply notifications while the app is inactive.
Platform support
- Telemetry, feature flags, customer messages, and knowledge base UI are supported on iOS and Android.
- iOS push uses the package-owned native bridge.
- Android push stays Firebase-neutral and uses host-supplied token and notification-open callbacks.
- Worker-isolate mode is available for telemetry only; customer-facing UI remains on the main isolate.