View Capture

Capture Flutter visuals Session Replay

View Capture of Flutter screens requires some additional setup. In order to start capturing visuals of a session, add the LogRocketWidget above the top level of your app that you would like captured.

import 'package:logrocket_flutter/logrocket_flutter.dart'; 

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return LogRocketWidget(
      child: MaterialApp(
        ...
      ),
    ),
  }    
}

Redaction

In Flutter session replay, widgets can be redacted from session replay by wrapping them in the LogRocketRedact widget. When widget is redacted, it appears in Session Replay as a dark grey box. This visual redaction is performed client side, so no redacted information is ever sent to LogRocket.

import 'package:logrocket_flutter/logrocket_flutter.dart'; 

class MyCheckoutPage extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Column(
      children:[
        LogRocketRedact(
          child: MyAddressForm(),
        ),
        ...
      ],
    ),
  }    
}

Pause View Capture

To pause and unpause view capture, the following LogRocket calls can be used:

import 'package:logrocket_flutter/logrocket_flutter.dart'; 

LogRocket.pauseViewCapture()
LogRocket.unpauseViewCapture()