screenshotOn method

  1. @override
Future<bool> screenshotOn()
override

Return true if screenshot capabilities has been successfully enabled or is currently enabled and false otherwise. throw UnmimplementedError if not implement

Always returns true when an iOS build runs on a Mac — screenshots are permitted there by default.

Releases only the prevention claim made via screenshotOff. While an overlay mode is active, protection remains engaged (the overlay holds its own claim) until the overlay is turned off — e.g. via overlayOff.

Implementation

@override
Future<bool> screenshotOn() async {
  final result = await methodChannel.invokeMethod<bool>(screenShotOnConst);
  return result ?? false;
}