captureAsUiImage method
Captures a ui.Image. delay
is to avoid a bug, you do not need to send it
Implementation
Future<ui.Image> captureAsUiImage(
{double pixelRatio = 1,
Duration delay = const Duration(milliseconds: 20)}) async {
return Future.delayed(delay, () async {
try {
final boundary = _getRenderRepaintBoundary();
return await boundary.toImage(pixelRatio: pixelRatio);
} on Exception {
throw (Exception);
}
});
}