v0.3.0
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— setsAccept-Languageheader on decision and tracking requests - Feat: Granular network timeouts —
SDKConfig.requestTimeout,connectTimeout,receiveTimeout(Duration, default 10 s each);AdMoai.initializenow accepts an optionalhttp.Clientfor cert pinning, proxies, etc. - Feat:
User-Agent: AdMoaiSDK/{version}header on decision + tracking requests - Feat:
Format.videoplacement format (requiresapiVersion = "2025-11-01"+) - Feat: Destination targeting —
Destination(latitude, longitude, minConfidence), builder methodsaddDestinationTargeting/setDestinationTargeting/clearDestinationTargeting, dedup,[0.0, 1.0]validation - Feat: Video metadata fields on
Metadata—duration,aspectRatio,isSkippable,format,style - Feat:
Advertiser.idfield - Feat: Open Measurement verification —
VerificationScriptResourcemodel,Creative.verificationScriptResources,getVerificationResources()andhasOMVerification()helpers, README OM section
Fixes
- Fix:
Advertiser.name/legalName/logoUrl,Template.style,Tracking.impressionsrelaxed to nullable; partial responses no longer crash on parse - Fix:
Metadata.advertiserIdandMetadata.languagerelaxed to nullable - Fix:
getContent,getImpressionUrl,getClickUrl,getCustomUrl,getVideoEventUrlnow returnnullinstead of throwingStateErrorwhen the requested key is not present - Fix: Unmapped HTTP status codes now surface as
UnexpectedStatusError(int statusCode)instead of being collapsed into a genericNetworkError - Fix:
AdMoaiClientno longer rewraps typedAPIErrors intoNetworkError—ClientError,ServerError,ValidationError,UnexpectedStatusErrornow propagate to callers as declared - Fix:
ServerErrornow covers the full 5xx range (was only500exactly)