setScreenshotProtectionEnabled static method

Future<void> setScreenshotProtectionEnabled({
  1. required bool enabled,
})

Implementation

static Future<void> setScreenshotProtectionEnabled({
  required bool enabled,
}) async {
  _ensureInitialized();
  if (!_enableProtection && enabled) {
    return;
  }

  await _invokeSafely('setScreenshotProtectionEnabled', <String, dynamic>{
    'enabled': enabled,
  });
}