getAllUsers method

Future<List<UserModel>> getAllUsers()

Returns list of all users.

Implementation

Future<List<UserModel>> getAllUsers() async {
  final snapshot = await firestore.collection('users').get();
  return snapshot.docs.map((doc) => UserModel.fromSnapshot(doc)).toList();
}