captureFrame method

Future<Uint8List?> captureFrame()

Implementation

Future<Uint8List?> captureFrame() async {
  if (_methodChannel != null) {
    try {
      final result = await _methodChannel!.invokeMethod('captureFrame');
      return result is Uint8List ? result : null;
    } catch (e) {
      logInfo('Error capturing frame: $e');
      return null;
    }
  }
  return null;
}