enableScreenCapture method

  1. @override
Future<void> enableScreenCapture()
override

Enables screen capture (screenshots and recordings) on supported platforms.

Removes any restrictions set by disableScreenCapture. Throws a PlatformException if the operation fails.

Implementation

@override
Future<void> enableScreenCapture() async {
  try {
    await methodChannel.invokeMethod('enableScreenCapture');
  } on PlatformException catch (e) {
    throw 'Failed to enable screen capture: ${e.message}';
  }
}