takeCapture method
Implementation
@override
Future<CapturedImage?> takeCapture({int? x, int? y, int? width, int? height}) async {
Map<String, dynamic>? data;
if (x != null && y != null && width != null && height != null) {
data = {
'x': x,
'y': y,
'width': width,
'height': height,
};
}
final result = await methodChannel.invokeMethod('takeCapture', data);
if (result == null) {
return null;
}
return CapturedImage.fromMap(Map<String, dynamic>.from(result));
}