koah_flutter library

Classes

AdClicked
Emitted when the user clicks the CTA button.
AdServed
Emitted when an ad has been successfully fetched and will be displayed.
AdViewed
Emitted when the ad has been viewed (1 second at 50%+ visibility).
AppExternalBrowserClosed
Emitted when the app resumes after a click handed the link to an external browser (or a deep-linked app). Counterpart to InAppBrowserClosed — exactly one of the two fires per click, chosen by the ad's navigation type.
ArticleContext
ConversationContext
FeedContext
ImpressionTracked
Emitted when the ad impression has been successfully tracked with the server.
InAppBrowserClosed
Emitted when the in-app browser opened by an ad click closes and the user returns to the app. Fires once per browser session.
Koah
Handles API requests for the Koah ad component
KoahAdContext
Discriminator the server uses to match inventory, copy, and eligible formats for an ad request.
KoahAdError
The request could not complete — a transport failure, a non-2xx response, or a response that failed to decode. Distinct from KoahAdNoFill, which is a successful "no inventory" answer.
KoahAdFilled
The server returned an ad, ready to render.
KoahAdNoFill
The request completed but the server had no ad (empty 204 / no-fill).
KoahAdResult
Outcome of a Koah.requestAd call: exactly one of KoahAdFilled, KoahAdNoFill, or KoahAdError. switch over the three cases to handle success, no-fill, and failure separately. Mirrors KoahAdResult on iOS and Android.
KoahAxisSize
How a Koah ad slot is sized along one axis (width or height). Pass null (the default) for an unbounded axis: the ad wraps its content and every renderable format is eligible. A wrap against a parent that leaves the axis unbounded (e.g. the cross axis of a scroller) still hugs a finite design-max width, so long ad copy cannot stretch the card indefinitely.
KoahAxisSizeFill
Fill the parent's available space along this axis.
KoahAxisSizeFixed
Force the rendered size to exactly dp. Behaviorally range(dp, dp).
KoahAxisSizeRange
Clamp the rendered size to min..max (logical pixels); content wraps within the band.
KoahCard
A widget that displays a card-style ad. Appearance is driven by the ambient KoahTheme — wrap your subtree in KoahThemeProvider to customize accent, color scheme, font, and card radius.
KoahDimensions
Slot dimensions for an ad request. Mirrors the web SDK's Dimensions.
KoahEvent
Sealed class representing events emitted by Koah widgets.
KoahSampleAd
A hand-constructable sample ad for previews, demo galleries, and snapshot fixtures. This is the public mirror of the SDK's internal, server-decoded ad model: it carries the same renderable fields but can never be produced from a network response, which keeps the contract clear — publishers render ads through KoahCard/Koah.requestAd, they do not fetch ad content and lay it out themselves.
KoahSampleAds
Namespace for the ready-made KoahSampleAd specimens. Access via KoahSampleAd.samples — e.g. KoahSampleAd.samples.poll.
KoahSampleAdvertiser
KoahSampleImage
KoahSampleImageVariant
KoahSamplePollOption
KoahSamplePollResult
Public mirror of a poll vote outcome used to seed a poll sample's result state.
KoahSampleProduct
KoahTheme
Public theming surface for Koah ad components. Wrap your subtree with a KoahThemeProvider passing one of these to customize the look-and-feel of every Koah ad below it in the widget tree. Mirrors Android's KoahTheme and iOS's KoahTheme, plus the web SDK's publisher token surface.
KoahThemeProvider
Provide a KoahTheme to all Koah components below this point in the widget tree. Nesting calls scopes the inner theme to its subtree.
NoAdFill
Emitted when no ad is available for the given query context.
SlotTooSmall
Emitted when a served ad can't fit its slot — the chosen format's content is taller than a forced/capped height axis — so the SDK renders nothing (zero size) instead of clipping. The publisher signature is AdServed then SlotTooSmall with no ImpressionTracked (a de-rendered card bills nothing). Give the slot more height, or leave the axis unbounded, to let a smaller format fill instead.
StaticContext

Enums

KoahAdState
Observable projection of the SDK's local ad cache for one cache key.
KoahAgeRange
Predefined visitor age buckets for ad targeting.
KoahCardChrome
Visual chrome of a KoahCard. Mirrors iOS's KoahCardChrome and Android's split between KoahCard (chrome-wrapped) and KoahAd (borderless).
KoahColorScheme
Light, dark, or follow the device.
KoahGender
The visitor's gender, for ad targeting.
KoahIncomeBracket
The visitor's annual household income bracket, in thousands of USD, for ad targeting.
KoahLogLevel
Logging level for the Koah SDK
KoahPreviewFormat
The opaque render formats the SDK can display, one case per ladder name — size lives in the name, there is no separate size axis. Pass one to KoahSampleAd to render a hand-built specimen, or to Koah.requestPreviewAd to ask the server for a canned specimen of that format (useful for integration testing every format without seeding ads in the dashboard; specimens are not impressions and do not record events).