title: How to take screenshot in flutter during video call?
body: <p>I'm currently using agora SDK for a flutter video call. During the video call, I need to take a screenshot. Only on the video call screen, the screenshot is black and on other screens the screenshots are fine.
  By using RenderRepaintBoundary I can't able to take a screenshot,</p>
  
  <p><strong>Code used to take the screenshot:</strong></p>
  
  <pre><code>Future&lt;void&gt; _capturePng() async {
      try {
        RenderRepaintBoundary boundary =
            _globalKey.currentContext.findRenderObject();
        ui.Image image = await boundary.toImage(pixelRatio: 3.0);
        ByteData byteData =
            await image.toByteData(format: ui.ImageByteFormat.png);
        var pngBytes = byteData.buffer.asUint8List();
        final result = await ImageGallerySaver.saveImage(pngBytes);
      } catch (e) {
        print(e);
      }  }  Widget build(BuildContext context) {
      return RepaintBoundary(
          key: _globalKey,
          child: Scaffold(
              backgroundColor: Colors.black,
              body: GestureDetector(
                  onDoubleTap: () =&gt; _capturePng(),
                  child: Screenshot(
                    controller: screenshotController,
                    child: Center(
                      child: Stack(
                        children: &lt;Widget&gt;[
                          _viewRows(),
                          _toolbar(),
                        ],
                      ),
                    ),
                  ))));
  }
  </code></pre>
  
  <p>issue screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/RkPw0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RkPw0.png" alt=""></a></p>
  
  <p>working fine screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/MO0zc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MO0zc.png" alt=""></a></p>
  
  <p><a href="https://pub.dev/packages/agora_rtc_engine" rel="nofollow noreferrer">Agora SDK link</a></p>
  
  <p>replace this below code with flutter main.dart sample</p>
  
  <p><a href="https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart/files/4273568/call.zip" rel="nofollow noreferrer">videocall.zip</a></p>
  
  <p>Agora rtc version:agora_rtc_engine: ^1.0.7</p>
  
  <p>Also tried using this plugin:  screenshot: ^0.1.1
  but still, the issue occurs</p>