You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
justMusic/Sources/justMUSIC/lib/services/UserService.dart

22 lines
594 B

import 'package:cloud_firestore/cloud_firestore.dart';
import '../main.dart';
class UserService {
Future<List<QueryDocumentSnapshot<Map<String, dynamic>>>> getUsersByIdUnique(
String uniqueId) async {
QuerySnapshot<Map<String, dynamic>> response = await FirebaseFirestore
.instance
.collection("users")
.where("unique_id", arrayContains: uniqueId)
.get();
var users = response.docs.where((doc) {
String id = doc["id"];
return id != MyApp.userViewModel.userCurrent.id;
}).toList();
return users;
}
}