screenshot
screenshot copied to clipboard
The width of the image captured using captureFromWidget varies depending on the browser size on the web.
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:
full screen:
narrow screen: