screenshot icon indicating copy to clipboard operation
screenshot copied to clipboard

The width of the image captured using captureFromWidget varies depending on the browser size on the web.

Open xpwmaosldk opened this issue 7 months ago • 0 comments

My code snippet is as follows:

final image = await _screenshotController.captureFromWidget(
        Container(
          decoration: BoxDecoration(
            border: Border.all(color: Colors.red),
            color: Colors.amber,
          ),
          child: targetWidget,
        ),
      );

When the browser is in full-screen mode, the left and right sides of the image are not cropped. However, when the browser size is reduced, the left and right sides of the image are cropped.

captureFromWidget is supposed to capture a widget that is not visible, but why does the captured image size vary depending on the browser size?

original: 스크린샷 2024-07-04 오후 2 32 42

full screen: 스크린샷 2024-07-04 오후 2 34 19

narrow screen: 스크린샷 2024-07-04 오후 2 34 46

xpwmaosldk avatar Jul 04 '24 05:07 xpwmaosldk