performDeleteOnServer function

Future<bool> performDeleteOnServer({
  1. required String placeId,
  2. required BuildContext context,
  3. required bool isEncrypted,
})

Performs the delete operation on the server. Routes to appropriate service based on whether the place is encrypted.

Implementation

Future<bool> performDeleteOnServer({
  required String placeId,
  required BuildContext context,
  required bool isEncrypted,
}) async {
  if (isEncrypted) {
    // Delete from encrypted places service.
    return await EncryptedPlacesService.deleteEncryptedPlace(
      placeId,
      context,
      const GeoMapWidget(),
    );
  } else {
    // Delete from regular places service.
    return await PlacesService.deletePlace(
      placeId,
      context,
      const GeoMapWidget(),
    );
  }
}