Skip to content

v0.3.0

Choose a tag to compare

@fperez-admoai fperez-admoai released this 27 May 14:50
· 3 commits to main since this release
0f9f16c

Brings the Flutter SDK to feature parity with iOS v1.4.0 and Android v1.2.0+ and fixes a set of production crash bugs around partial server responses.

Features

  • Feat: SDKConfig.defaultLanguage — sets Accept-Language header on decision and tracking requests
  • Feat: Granular network timeouts — SDKConfig.requestTimeout, connectTimeout, receiveTimeout (Duration, default 10 s each); AdMoai.initialize now accepts an optional http.Client for cert pinning, proxies, etc.
  • Feat: User-Agent: AdMoaiSDK/{version} header on decision + tracking requests
  • Feat: Format.video placement format (requires apiVersion = "2025-11-01"+)
  • Feat: Destination targeting — Destination(latitude, longitude, minConfidence), builder methods addDestinationTargeting / setDestinationTargeting / clearDestinationTargeting, dedup, [0.0, 1.0] validation
  • Feat: Video metadata fields on Metadataduration, aspectRatio, isSkippable, format, style
  • Feat: Advertiser.id field
  • Feat: Open Measurement verification — VerificationScriptResource model, Creative.verificationScriptResources, getVerificationResources() and hasOMVerification() helpers, README OM section

Fixes

  • Fix: Advertiser.name/legalName/logoUrl, Template.style, Tracking.impressions relaxed to nullable; partial responses no longer crash on parse
  • Fix: Metadata.advertiserId and Metadata.language relaxed to nullable
  • Fix: getContent, getImpressionUrl, getClickUrl, getCustomUrl, getVideoEventUrl now return null instead of throwing StateError when the requested key is not present
  • Fix: Unmapped HTTP status codes now surface as UnexpectedStatusError(int statusCode) instead of being collapsed into a generic NetworkError
  • Fix: AdMoaiClient no longer rewraps typed APIErrors into NetworkErrorClientError, ServerError, ValidationError, UnexpectedStatusError now propagate to callers as declared
  • Fix: ServerError now covers the full 5xx range (was only 500 exactly)