Skip to content
Knowledge base

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.

App startup
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.

01

Present the help center

Connect a Help or Learn control to the SDK-owned viewer.

Open help
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.

04

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.com and 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.