Flutter SDK - start method
This method is used to start the tracker. By starting the tracker, the recording of the session starts.
Signature
Section titled SignatureFuture<void> OpenReplay.instance.start({
required String projectKey,
OROptions options = OROptions.defaults,
String? serverUrl,
})
Parameters
Section titled ParametersprojectKey: String: Found in your OpenReplay dashboard under ‘Preferences > Projects’.options: OROptions: What the tracker captures, see below.serverUrl: String?: Ingest endpoint for self-hosted deployments. Omit it on OpenReplay Cloud.
Initialization Options
Section titled Initialization OptionsAvailable options:
crashes: boolCaptures Dart errors.analytics: boolCaptures touches, swipes, screens and inputs.performances: boolCaptures CPU, memory, battery and thermal state.logs: boolCapturesdebugPrintoutput.screen: boolEnables frame capture.screenshotBatchSize: ScreenshotBatchSizeFrames per upload —low(10),normal(20),high(30). Default:normal.targetLongEdge: intLongest edge of a captured frame, in pixels. Default:720.dedupeFrames: boolSkips frames identical to the previous one.maskPlatformViews: boolCovers WebViews, maps and camera previews with a placeholder.wifiOnly: boolReserved; not yet enforced.debugLogs: bool/debugImages: boolThe SDK’s own debug output. Default:false.
Default: all booleans true except debugLogs and debugImages. See initialization for the full description of each.
Frame rate and image quality come from your project settings, not from these options.
Buffered start
Section titled Buffered startTo record into a rolling buffer without creating a session — so a later trigger can ship the preceding seconds — start with coldStart() and promote it with triggerRecording():
await OpenReplay.instance.coldStart(projectKey: 'YOUR_PROJECT_KEY');
// later, when something worth recording happens
await OpenReplay.instance.triggerRecording(condition: 'checkout_error');
Server-side condition evaluation is not yet available in the Flutter SDK; call triggerRecording() from your own code.
Have questions?
Section titled Have questions?If you have any questions about this process, feel free to reach out to us on our Slack or check out our Forum.