convertFlutterSurfaceToImage method

Future<void> convertFlutterSurfaceToImage()

Android only. Converts the Flutter surface to an image view. Be aware that if you are conducting a perf test, you may not want to call this method since the this is an expensive operation that affects the rendering of a Flutter app.

Once the screenshot is taken, call revertFlutterImage() to restore the original Flutter surface.

Implementation

Future<void> convertFlutterSurfaceToImage() async {
  await callbackManager.convertFlutterSurfaceToImage();
}