How to list subcollection on firestore? [duplicate]

It is mentioned on the Firestore documentation:

Retrieving a list of collections is not possible with the mobile/web client libraries. You should only look up collection names as part of administrative tasks in trusted server environments. If you find that you need this capability in the mobile/web client libraries, consider restructuring your data so that subcollection names are predictable.

Methods to retrieve subcollections are only available on server libraries (Java, Nodes.js and Go). You can't yet list subcollections with client libraries.