captureImage method
Future<Image>
captureImage({
- bool blockText = false,
- DeviceInfo? device,
- Orientation orientation = Orientation.portrait,
- bool includeDeviceFrame = false,
Renders the closest RepaintBoundary of this element into an image.
Set blockText to true to replace text with colored rectangles for
cross-platform consistency in golden tests.
If includeDeviceFrame is true and a device is provided, the image
will be wrapped with the device's frame.
See also:
- CaptureFinder to capture a finder that contains a RepaintBoundary.
Implementation
Future<ui.Image> captureImage({
bool blockText = false,
DeviceInfo? device,
Orientation orientation = Orientation.portrait,
bool includeDeviceFrame = false,
}) async {
return _captureImage(
this,
blockText: blockText,
device: device,
orientation: orientation,
includeDeviceFrame: includeDeviceFrame,
);
}