Flutter SDK
Install the Flutter SDK
Add btx 0.0.24 to an iOS or Android Flutter app and mount the SDK-owned presentation host.
Requirements
The published btx 0.0.24 package requires Dart 3.5 or newer and Flutter 3.24
or newer. It ships native plugin implementations for iOS and Android.
- An iOS 13 or newer application when targeting iOS.
- Android API 21 or newer when using WebView-based knowledge base media.
- A BTX publishable client key registered for the app's bundle ID or package name.
- A stable customer ID available after sign-in for customer-scoped features.
Add the package
Add the published package to the host app, then run flutter pub get.
dependencies:
btx: ^0.0.24Import the facade anywhere the host configures or calls BTX.
import 'package:btx/btx.dart';Mount the SDK host
Place BtxHost inside MaterialApp when the app uses customer messages, the
knowledge base, foreground reply banners, or SDK-owned push coordination.
MaterialApp(
home: BtxHost(
child: MyAppHome(),
),
)BtxHost owns presentation and lifecycle wiring while leaving the host app in
control of navigation outside BTX. Apps that already own a root navigator key
can configure that key instead; do not use both integration shapes.
Prepare native targets
The package registers its iOS and Android plugins automatically. The host app still owns signing, bundle or package identity, notification capabilities, and provider configuration.
For knowledge base media on Android, make sure the application manifest allows network access.
<uses-permission android:name="android.permission.INTERNET" />