setLocationSharingEnabled method

Future<void> setLocationSharingEnabled(
  1. String groupId,
  2. bool enabled
)

Enables or disables location sharing for a group

Implementation

Future<void> setLocationSharingEnabled(String groupId, bool enabled) async {
  try {
    await _firestore.collection(_collectionPath).doc(groupId).update({
      'locationSharingEnabled': enabled,
    });
  } catch (e) {
    print('Error updating location sharing setting: $e');
    rethrow;
  }
}