influto 1.0.0
influto: ^1.0.0 copied to clipboard
Track influencer referrals, attribution, and store-direct purchase validation in your Flutter app. Mirrors the InfluTo React Native SDK.
Changelog #
1.0.0 #
Initial release of the InfluTo Flutter SDK.
Added #
- Full influencer attribution API:
initialize,checkAttribution,identifyUser,trackEvent,getActiveCampaigns,validateCode,setReferralCode,applyCode,getReferralCode,getPrefilledCode,clearAttribution— matching the canonical cross-platform contract (wire 1.0.0). - Store-direct purchase validation via
reportPurchase(StoreKit 2 JWS on iOS, Play purchase token on Android), posting to/sdk/purchase. Supports one-time / consumable products viaproductId/price/currency(NON_RENEWING validation). checkAccess— server-authoritative premium-access check powering platform-independent comp (free-access codes that grant entitlement without a purchase); works for both RevenueCat and store-direct apps. Positive results are cached in memory and persisted across cold starts (~5-min TTL).- Default-on automatic purchase capture for store-direct apps via the companion
influto_iappackage (InfluToPurchaseObserver) — listens toin_app_purchaseand auto-reports purchases; RevenueCat apps stay silent. Declare one-time SKUs viaoneTimeProductIds. Configurable throughInfluToConfig.autoCapture. - Optional RevenueCat integration through a host-supplied
revenueCatHookcallback — no hard dependency onpurchases_flutter. ReferralCodeInputwidget with live debounced validation;showCampaignNameandshowReferrerNameboth default tofalse(influencer name hidden unless explicitly opted in).- Pure Dart implementation — only
httpandshared_preferences. Fail-soft behavior on all methods exceptinitializeandreportPurchase.