toggleScreenshot method
Return true if screenshot capabilities has been
successfully toggle from it previous state and false if the attempt
to toggle failed.
throw UnmimplementedError if not implement
Always returns false when an iOS build runs on a Mac
("Designed for iPhone/iPad" on Apple silicon) — screenshot
prevention is not supported there; see screenshotOff.
Implementation
@override
Future<bool> toggleScreenshot() async {
final result = await methodChannel.invokeMethod<bool>(
toggleScreenShotConst,
);
return result ?? false;
}