Future checkBookmarkOrNot(String checkerUid) async {
    List<dynamic> arrayField = [];
    var userSnap = await FirebaseFirestore.instance
        .collection('users')
        .doc(_auth.currentUser!.uid)
        .get();
    arrayField = userSnap['bookmarkUids'];
    bool have = arrayField.contains(checkerUid);
    return have; } 
s
have is bool value which is true when checkuid in bookmarkUids array
Comments
Post a Comment