strybok 0.3.0
strybok: ^0.3.0 copied to clipboard
Flutter SDK for Strybok deep links: receives Universal Links / App Links, resolves them to an in-app route and payload, delivers each link once, and creates links to share.
0.3.0 #
- Campaign values.
ResolvedDeepLink.campaignis aLinkCampaignwith the nullable stringssource,medium,campaign,termandcontent(plusisEmpty,isNotEmptyandtoJson()). It is nevernulland is empty when the link has none. The values are the link's defaults, overridden by theutm_*parameters of the URL that was tapped; treat them as untrusted labels. - Resolving now sends the five
utm_*parameters of the tapped URL (utm_source,utm_medium,utm_campaign,utm_term,utm_content) when their value is 1–64 characters ofA-Z a-z 0-9 . _ ~ -. Every other query parameter and the fragment are still never sent, and a URL without such a parameter produces exactly the request of 0.2.0. - The
app_openevent carries thecampaignthat resolving returned; it is left out when empty. - Deferred links (optional, off by default; nothing of it has run on a device). The package
stays pure Dart, with no native code, no store integration and no new dependency — the app
supplies the platform pieces:
- New options
deferredLinks,deferredLinkStore(aDeferredLinkStorefor the two valuesattemptsanddone; without it the feature staysdisabled),installReferrerSourcesandandroidPackageName(Android),iosBundleId,allowProbabilisticMatching,deviceFamily,localeandpasteboardMayContainLink(iOS). - Android: an
InstallReferrerSourceis a function of the app that returns the store's raw install referrer as anInstallReferrerAnswer(referrer(string),unavailableForNoworunavailable). The SDK finds its click id in it and redeems it once. - iOS:
redeemPastedLink(text)takes a link the person pasted (the SDK never reads the clipboard) and returns aPastedLinkResult;skipPastedLink(). Probabilistic matching runs only withallowProbabilisticMatching; Apple's rules forbid it, see the guide. deferredLinkStatus,deferredLinkStatusChanges(DeferredLinkStatus) andenableDeferredLinks(), to switch the feature on after a consent screen.ResolvedDeepLink.isDeferredandResolvedDeepLink.isProbabilisticMatch,falsefor every link that arrived the normal way. A deferred link is delivered throughlinks, never bygetInitialLink(), sends noapp_open, and a failed check never reachesonError.InMemoryDeferredLinkStoreinpackage:strybok/testing.dart, for tests only.
- New options
- Not source-breaking: the new constructor parameters of
StrybokandResolvedDeepLinkare optional.
0.2.0 #
createLink(routePath, {payload, title, description, imageUrl})asks the service for a short link to a screen of the app (a "Share" button) and returns aCreatedLink(url,slug,routePath,linkId). It needs the newclientKeyoption: the application's publishable key (pk_…) from the dashboard, never a secret API key.- New exceptions, thrown by
createLinkonly:StrybokUnauthorizedException,RouteNotAllowedException,StrybokRateLimitedException(withretryAfter) andStrybokValidationException(with the server'sissues). They extend the sealedStrybokException, so an exhaustiveswitchover it needs the new cases. timeout,maxRetriesandretryDelayapply tocreateLinkas well.
0.1.0 #
- Initial version:
Strybokwithinitialize,links,getInitialLink,resolveUri,dispose; host allowlist; duplicate-delivery protection; timeout and retry; typed exceptions; best-effortapp_openevents;FakeLinkSourcetest helper.