koah_flutter 0.1.2
koah_flutter: ^0.1.2 copied to clipboard
A Flutter package for integrating Koah ads into your application to display relevant, contextual advertising content.
0.1.2 #
- Widened plugin dependency ranges.
device_info_plusnow allows>=11.0.0 <14.0.0,flutter_secure_storage>=9.2.4 <11.0.0, andpackage_info_plus>=8.0.0 <11.0.0, so apps already on the latest plugin majors can resolvekoah_flutterwithoutdependency_overrides. Lower bounds are unchanged — existing resolutions are unaffected, and apps pinned to older plugin majors (e.g. for Android minSdk < 23) keep resolving exactly as before. - Embedded pub.dev example. A minimal chat-style
KoahCard.withContextintegration now ships inexample/and renders on the package's Example tab.
0.1.1 #
- Docs-only patch. Corrects the
pubspec.yamldependency snippet in the pub.dev README (was stale at^0.0.1). No SDK behavior changes from 0.1.0.
0.1.0 #
- Unified
requestAdAPI (v2). NewKoah.instance.requestAd(adContext:, size:, cacheKey:),Koah.instance.prefetchAd(...), andKoah.instance.cancelPrefetchAd(cacheKey)post to a new/ad_requestsendpoint that uses a discriminatedKoahAdContext(Conversation/Article/Feed/Static) for matching, copy selection, and format eligibility — same shape as iOS, Android, and React Native. The newKoahCard.withContext(adContext:, size:, cacheKey:, ...)constructor takes the context directly.KoahCard(query:, messageId:, ...)still works against the legacy/querypath but emits deprecation warnings; new code should adoptKoahCard.withContext(...). - Optional ad slot.
requestAd/prefetchAdnow accept an optionalslotparameter that surfaces in matching and reporting — lets publishers tag a single page with multiple distinct ad placements without colliding on the cache key or muddying analytics. - Prefetch / resolveAd primitives for feeds.
Koah.instance.prefetchAd(...)+KoahCard.fromCache(messageId:)let feed integrations warm a slot ahead of render and resolve it later when the cell scrolls into view. Avoids the "first frame is empty" problem in long feeds. requestPreviewAdfor publisher format previews. NewKoah.instance.requestPreviewAd(previewFormat:)returns a deterministic sample creative for a given format (small / medium / expandable / poll), so publishers can wire their preview UIs without depending on live fill.- Poll ad format. Interactive multi-choice prompt with server-tracked option events and a clickable CTA with animated reveal. Renders inside
KoahCardautomatically when the server returns a poll creative. - Ad report flow. New
Icons.more_horizaffordance on the ad caption opens a half-sheet (entry → reasons → submit) that posts to/k/report. KoahThememinimal styling API (breaking). ReplacesKoahCardStyleandKoahCardOptionswith a 4-knobKoahThemeapplied viaKoahThemeProvider. The knobs arecolorScheme(KoahColorScheme.light/.dark/.auto),accentColor(defaults to#0D0D0D, text-on-accent auto-contrasted via WCAG luminance),fontFamily(nullinherits from the host app), andcornerRadius.KoahColorScheme.autoresolves viaMediaQuery.platformBrightnessOfand re-resolves automatically when the device theme flips. Matches iOS / Android / React Native exactly.chrome:parameter for borderless embedding. Newchrome: KoahCardChrome.standard(default — surface background, 0.5dp border, padding, rounded radius) /KoahCardChrome.bare(inline content; host surface owns the chrome) on everyKoahCardconstructor. Mirrors iOS'sKoahCard(chrome: .bare)and Android'sKoahAdcomposable.- KoahCard redesign port. Visual + interaction overhaul brings Flutter to parity with the iOS/Android/RN card refresh — same chrome, spacing, typography, and image treatment.
experimentTagonrequestAd/prefetchAd. Optional tag forwarded with every ad request, so publishers can split-test creatives or surface variants without piggy-backing on the cache key.
0.0.5 #
- Unified
requestAdAPI (v2). NewKoah.requestAd(adContext: ..., size: ..., cacheKey: ...),Koah.prefetchAd(...), andKoah.cancelPrefetchAd(cacheKey), plus publicKoahAdContext(.conversation/.article/.feed/.static_),KoahAdSize, andKoahAdResulttypes. Posts to a new/ad_requestsendpoint that uses the discriminated context for matching, copy selection, and format eligibility — same wire shape as iOS 0.7.0 and Android 0.0.16. Cached entries respect the server'sexpires_at. KoahCard.withContext(adContext: ..., size: ..., cacheKey: ...)constructor. New context-based widget initializer that drives the V2 path.KoahCard.fromCache(messageId: ...)continues to read from cache for both legacy and V2 entries.- Deprecations (no behavior change).
Koah.fetchAd/process/prefetch/resolveAd/cancelPrefetchand the legacy primaryKoahCard(query:messageId:...)constructor are marked@Deprecatedwith replacement guidance. They continue to work against the older/queryendpoint for now.
0.0.4 #
- New Event Callback System: Added
KoahEventsealed class with lifecycle events (NoAdFill,AdServed,AdViewed,ImpressionTracked,AdClicked). Use theonEventparameter onKoahSuffixto handle events. - Redesigned KoahSuffix Widget: New three-section layout with header (logo, brand, domain, "Ad" label), body (ad text), and CTA button.
- Breaking: Refactored
KoahStyleconfiguration - now usesKoahHeaderStyle,KoahBodyStyle, andKoahCtaStyleinstead of previous fields.KoahContainerStylenow uses individual properties instead of a singleBoxDecoration.
0.0.2 #
- Fix dart conventions. Add formatting and switch from printing to using a logger.
0.0.1 #
- Initial Suffix Ad component with impression tracking, auth management, url launching, styling, and basic widget lifecycle.