getGroupJoinedArrayForUserListCreate function

List getGroupJoinedArrayForUserListCreate(
  1. String userId
)

Implementation

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

  return [];
}