setProtection method

Future<void> setProtection(
  1. bool enabled, {
  2. bool protectInAppSwitcher = true,
  3. Color appSwitcherColor = Colors.black,
})

Implementation

Future<void> setProtection(
  bool enabled, {
  bool protectInAppSwitcher = true,
  Color appSwitcherColor = Colors.black,
}) async {
  _enabled = enabled;
  _protectInAppSwitcher = protectInAppSwitcher;
  _appSwitcherColor = appSwitcherColor;

  await _service.updateSource(
    key: _sourceKey,
    enabled: _enabled,
    protectInAppSwitcher: _protectInAppSwitcher,
    appSwitcherColor: _appSwitcherColor,
  );
}