removeZone method

Future<bool> removeZone(
  1. String identifier
)

Removes a privacy zone by identifier.

Implementation

Future<bool> removeZone(String identifier) async {
  final zone = _zones.remove(identifier);
  if (zone == null) return false;

  _zoneChangesController.add(PrivacyZoneEvent(
    type: PrivacyZoneEventType.removed,
    zone: zone,
  ));

  await _persist();
  return true;
}