FlutterFlowCloud class

The FlutterFlow Cloud client (14 §2): explicit initialization, one line in main, everything else self-contained — session persistence and restore, token refresh, query caching, retries.

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await FlutterFlowCloud.initialize(options: FFXDefaultOptions.current);
  runApp(const MyApp());
}

final cloud = FlutterFlowCloud.instance;
await cloud.auth.signInWithEmail(email: e, password: p);
final page = await cloud.database.query('recentEntries').execute();
Available extensions

Properties

auth → FFXAuth
final
connectors → FFXConnectors
final
database → FFXDatabase
final

Available on FlutterFlowCloud, provided by the FFXCloudDynamicLinks extension

Dynamic Links: short links on the project's link host that open this app on a route.
no setter
functions → FFXFunctions
final
hashCode → int
The hash code for this object.
no setterinherited
options → FFXOptions
final
purchases → FFXPurchases

Available on FlutterFlowCloud, provided by the FFXCloudPurchases extension

Store purchases: what the app sells and what the end user bought.
no setter
realtime → FFXRealtime
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
storage → FFXStorage
final
usesEmulator → bool
Whether this instance talks to an emulator rather than the platform: App Preview's backend, or a local ffx-emulator (initialize's useEmulator or emulatorUrl, FFX_EMULATOR_URL). The emulator refuses App Store and Google Play checks, so an app that sells buys on drip's pretend store there (cloud.purchases.checkPretend), even when it runs on a phone.
final

Methods

clearQueryCache() → Future<void>
Drops every cached query page (memory and disk).
close() → void
Releases the HTTP client (and this instance's default registration). The persisted session is untouched — the next launch restores it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

insidePreview → bool
Whether this code runs inside drip's App Preview, where there is no store: an app that sells buys on drip's pretend store there (cloud.purchases.checkPretend). usesEmulator also covers an app run against a local emulator.
no setter
instance → FlutterFlowCloud
The app-wide instance registered by initialize.
no setter

Static Methods

initialize({required FFXOptions options, FFXSessionStorage? sessionStorage, FFXCacheConfig cache = const FFXCacheConfig(), FFXRetryPolicy retryPolicy = const FFXRetryPolicy(), Client? httpClient, FFXWebSocketConnector? webSocketConnector, bool registerAsDefault = true, bool useEmulator = false, String? emulatorHost, int emulatorPort = const int.fromEnvironment('FFX_EMULATOR_PORT', defaultValue: 8790), String emulatorUrl = const String.fromEnvironment('FFX_EMULATOR_URL')}) → Future<FlutterFlowCloud>
Connects to the project, restores any persisted session (no network), and kicks off a background user refresh for restored sessions.