Flutter session replay installation
Add the PostHog Flutter SDK to your Session replay requires PostHog Flutter SDK version 4.7.0 or higher. We recommend always using the latest version. For session replay, you need to use manual initialization. Add this to your Update the minimum Android SDK version to 21 in Add this to your Update the minimum platform version to iOS 13.0 in your Go to your PostHog Project Settings and enable Record user sessions. Session recordings will not work without this setting enabled. If you're using Flutter Web, also enable the Canvas capture setting. This is required as Flutter renders your app using a browser canvas element. Initialize PostHog in your For more configuration options, see the Flutter session replay docs. For Session Replay to work, wrap your app with Visit your site or app and interact with it for at least 10 seconds to generate a recording. Navigate between pages, click buttons, and fill out forms to capture meaningful interactions. Now that you're recording sessions, continue with the resources below to learn what else Session Replay enables within the PostHog platform.Install the package
Requiredpubspec.yaml:Disable auto-init for Android
RequiredAndroidManifest.xml to disable auto-init:android/app/build.gradle:Disable auto-init for iOS
RequiredInfo.plist to disable auto-init:Podfile:Enable session recordings in project settings
RequiredInitialize PostHog with session replay
Requiredmain.dart with session replay enabled. Here are all the available options:Wrap your app with PostHogWidget
RequiredPostHogWidget and add the PosthogObserver:Watch session recordings
RecommendedNext steps
RecommendedResource Description Watching recordings How to find and watch session recordings Privacy controls How to mask sensitive data in recordings Network recording How to capture network requests in recordings Console log recording How to capture console logs in recordings More tutorials Other real-world examples and use cases