setScreenRecordingProtection static method

Future<void> setScreenRecordingProtection({
  1. required ScreenProtectionMode mode,
})

Implementation

static Future<void> setScreenRecordingProtection({
  required ScreenProtectionMode mode,
}) async {
  _ensureInitialized();
  if (!_enableProtection && mode != ScreenProtectionMode.off) {
    return;
  }

  await _invokeSafely('setScreenRecordingProtection', <String, dynamic>{
    'mode': mode.name,
  });
}