stopSharingLocation method

Future<void> stopSharingLocation(
  1. String groupId,
  2. String userId
)

Stops sharing a user's location with a group

Implementation

Future<void> stopSharingLocation(String groupId, String userId) async {
  try {
    await _firestore
        .collection(_collectionPath)
        .doc(groupId)
        .collection(_locationSubcollection)
        .doc(userId)
        .delete();
  } catch (e) {
    print('Error stopping location sharing: $e');
    rethrow;
  }
}