Future<bool> checkLiked(String questionID) async {
DocumentReference ref = questionBank.doc(questionID);
List<dynamic>? list;
await ref.get().then((value) {
list = value['userLiked'];
});
print(list!.contains(uid));
return list!.contains(uid);
}
it alawys return false also the uid already in the list and when i print the list it empty but inside the then method it contain the uid how to return the list outside the then method