takeScreenshot method
Implementation
@override
Future<Uri?> takeScreenshot({
Duration delay = Duration.zero,
}) async {
await Future.delayed(delay);
final uriPath = await methodChannel.invokeMethod<String>('takeScreenshot');
Uri uri = Uri.file(uriPath ?? '');
return uriPath == null ? null : uri;
}