setSecure method

  1. @override
Future<void> setSecure(
  1. bool enable
)
override

This is the new method that triggers the native privacy protection. We remove getPlatformVersion because we don't need it for this package.

Implementation

@override
Future<void> setSecure(bool enable) async {
  if (enable) {
    _attachListeners();
    _applyHardenedCSS(true);
  } else {
    _removeListeners();
    _applyBlur(false);
    _applyHardenedCSS(false);
  }
}