capture method
Implementation
Future<void> capture() async {
await startCapturing(
dummy: widget.dummyBuilder(),
callback: () => captureScreenshot(widget.widgetKey),
refreshContent: () => setState(() {
// nothing to do here
}),
onStartCapturing: () => setState(() {
capturing = true;
}),
onFinishCapturing: () => setState(() {
capturing = false;
}),
);
}