flutterflow_cloud 0.4.0-dev.1
flutterflow_cloud: ^0.4.0-dev.1 copied to clipboard
The FlutterFlow Cloud SDK for Flutter — typed database records and queries, end-user auth with self-contained persistent sessions, file storage with progress and URL caching, and a fast built-in proje [...]
Changelog #
0.4.0-dev.1 #
A pre-release for trying store purchases before they launch; cloud.purchases
may still change before 0.4.0.
cloud.purchases.recordEvents(events)posts what the app's paywall and shop saw (FFXPurchaseEvent: id,FFXPurchaseEventKind, at, source, item, plan, amount) to/v1/purchases/eventsfor Payments' Reports, and answers how many were new.FFXInsufficientCreditsError(anFFXConflictError, codeinsufficientCredits): a write whose rule callsspend()needs more credits than the end user has. It carriescredits,neededandbalance, anduserMessagecopy for the end user.FFXPurchaseState.credits(FFXCredits): the app's credits as the backend keeps them,balance(bought plus this month's free),bought,free,freeEachMonthandfreeRefillsAt, withwords(n)for "3 vet questions". A pack is checked like any purchase;checkPretendtakes itsamount.- Store purchase problems from
/v1/purchases(purchaseNotVerified,purchaseNotSold:FFXValidationError;paymentsNotConfigured,purchaseHeldByAnother:FFXConflictError) carryuserMessagecopy for the buyer. cloud.purchasesreads what the app sells and what the signed-in user bought (read()→FFXPurchaseState: purchase id, upgrade, owned unlocks, purchases and products with each store's ids) and checks a store purchase (checkAppStore,checkGooglePlay; in the preview,checkPretendrecords a purchase on drip's pretend store as anFFXStore.pretendtest purchase, in the preview's backend only), refreshing the session when the upgrade changes.FlutterFlowCloud.insidePreviewis public.cloud.purchasesis an extension (FFXCloudPurchases) inpackage:flutterflow_cloud/purchases.dart, with the purchase types; the main library doesn't export it, so an app's ownpurchasesgetter (apurchasemodel's) is untouched.- Inside App Preview, a screen preview that reads
FlutterFlowCloud.instancebefore anyinitializegets an instance the SDK connects itself, on the preview's backend with the whole-app preview's session or as a guest, instead ofFlutterFlowCloud has not been initialized. It borrows that shared session and never rotates its refresh token. The app's owninitializereplaces it. Outside App Preview nothing changes.
0.3.0 #
cloud.connectors.call(connector, operation, params: …)calls an outside service the project connected (Slack, Resend, Stripe, OpenAI, Anthropic, Gemini, Airtable, Notion, …) through the platform, for an operation declared underconnectorsin.ffx/project.json; the app carries no key. Connector refusals areFFXApiErrors whoseuserMessageis written for the app's user, and an acting call that may have gone through (connectorOutcomeUnknown) is never retried. The generatedffx.dartre-exportsFFXConnectors.- Custom claims stay current: the SDK follows the account's auth events and refreshes the session when its claims change.
cloud.auth.deleteAccount()permanently deletes the signed-in account and revokes its sessions.- Requests share one time budget across retries, and a mutation retried after a transport failure keeps its original Idempotency-Key.
- Previews in FlutterFlow reach their own backend without app changes;
FFX_EMULATOR_URLpoints the emulator client at a full URL. - Breaking:
FFXPersistedSessionhas a requiredclaimsRevision. A session saved by 0.2.x does not restore, so a signed-in user signs in again once after the upgrade (and a guest starts as a new guest).
0.2.2 #
fileReferenced(deleting a file a record still points at) is anFFXConflictError.- Generated file collections gain
allowsContentType, and theuploadpre-flight accepts single-type wildcards (image/*) the way the platform does.
0.2.1 #
- Package README replaced with a short placeholder ahead of the public documentation.
0.2.0 #
The client SDK, rebuilt as a Flutter package. Replaces ffx_client 0.1.0
(package renamed; hard break, pre-release).
FlutterFlowCloud.initialize/FlutterFlowCloud.instancereplaceFFXApp; connection settings live inFFXOptions(typically generated).- Self-contained persistent sessions on Android, iOS, macOS, Windows,
Linux, and web — no plugins. Sessions restore at initialize with
auth.currentUserhydrated from the stored snapshot and a background reconcile;authStateChanges()is aStream<FFXUser?>whose first event is the real current state. - Built-in opt-in query cache (
FFXFetchPolicy: networkOnly/networkFirst/cacheFirst/cacheOnly) with honestFFXQueryMetadata; the fictionalisFromCache: false/hasPendingWrites/ client-clockserverTimefields are gone. FFXApiError.userMessage: human-safe copy for every failure.- Storage:
uploadreturns an awaitableFFXUploadTaskwith progress, cancellation, and in-place transfer retry;getDownloadUrlcaches and single-flights signed URLs;getFile/updateFile/deleteFilecover the file record surface;FFXImagerenders private files by id. - Database:
query()parameters optional;pages()/records()cursor-following streams;aggregate()returns a typedFFXAggregateResult;batch()is the single typed batch API. FFXSignOutScopeenum replaces the stringly-typed sign-out scope;FFXGeoPointvalue type added.- Built-in generator:
dart run flutterflow_cloud:generateemits typed models/collections/queries/options from.ffx/project.json— fast, deterministic, formatted, no build_runner.