Flutter SDK
Open the knowledge base in Flutter
Present searchable BTX help content with native image, MP4, and YouTube rendering inside the Flutter app.
Enable the knowledge base
The knowledge base is opt-in. Enable both the knowledge base and messenger, then identify a customer before calling the facade.
await Btx.configure(
BtxConfiguration(
publishableClientKey: 'cfk_...',
features: const <BtxFeature>{
BtxFeature.messenger,
BtxFeature.knowledgeBase,
},
),
);
await Btx.identify(
const BtxCustomer(externalId: 'customer_123'),
);BTX authenticates the publishable key through the existing messenger bootstrap and resolves the project automatically. Do not add a project ID to the facade configuration.
Present the help center
Connect a Help or Learn control to the SDK-owned viewer.
await Btx.knowledgeBase.present();Use Btx.knowledgeBase.dismiss() when the host needs to close the viewer.
Btx.knowledgeBase.isPresented and stateListenable are available for host
state that must observe presentation.
Open a specific article
Create a route from the article's category, section, and article slugs. Passing
the route to present(...) opens the viewer directly at that article.
await Btx.knowledgeBase.present(
articleRoute: const BtxKnowledgeBaseArticleRoute(
categorySlug: 'getting-started',
sectionSlug: 'setup',
articleSlug: 'connect-your-device',
),
);Use openArticle(route) to switch articles after the viewer already exists.
Search help content
Search updates the presented viewer with matching public articles.
await Btx.knowledgeBase.present();
await Btx.knowledgeBase.search('bluetooth pairing');Render supported article media
The packaged viewer renders hydrated article text and a narrow set of validated media from BTX public asset routes.
- Images support alt text, dimensions, captions, and local failure states.
- MP4 videos initialize only after a customer taps play and include play, pause, scrubbing, speed, and fullscreen controls.
- YouTube embeds use
youtube-nocookie.comand create an in-app WebView only after activation. - Attachment links stay separate from inline media.
- Media failures remain local so article text and other blocks continue rendering.