getGroupJoinedArrayForUserList method

Future getGroupJoinedArrayForUserList(
  1. String userId
)

Implementation

Future<dynamic> getGroupJoinedArrayForUserList(String userId) async {
  late List<dynamic> groupList;
  await FirebaseFirestore.instance
      .collection("userJGroup")
      .doc(userId)
      .get()
      .then((value) {
    groupList = value.data()?["joinedGroups"] ?? [];
  });
  return groupList;
}