captureFrame method
Implementation
@override
Future<Uint8List?> captureFrame() async {
try {
await methodChannel.invokeMethod('captureFrame');
Uint8List frame = await methodChannel.invokeMethod('getCapturedFrame');
return frame;
} on PlatformException catch (e) {
throw Exception("Failed to capture frame: '${e.message}'");
}
}