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
752 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", isGreaterThanOrEqualTo: uniqueId)
.where("unique_id", isLessThanOrEqualTo: uniqueId + "zzzzzzzzzzzzzzzzzzzzzzzzzzzz")
.limit(20)
.get();
var users = response.docs.where((doc) {
String id = doc["unique_id"];
return id != MyApp.userViewModel.userCurrent.uniquePseudo;
}).toList();
print("cc34" + users.toString());
return users;
}
}