shareRouteWithUsers method
//////////// //////////// Shares a route with specific users
Implementation
// II.D - Sharing Operations
///////////////
/// Shares a route with specific users
Future<void> shareRouteWithUsers(String routeId, List<String> userIds) async {
try {
await _firestore.collection(_collectionPath).doc(routeId).update({
'sharedWith': FieldValue.arrayUnion(userIds),
});
} catch (e) {
print('Error sharing route: $e');
rethrow;
}
}