How returning of data from addOnSuccessListener{} works in Kotlin?
I am trying to get user data from Firebase Firestore database , I am intended to get info of user who is currently logged in. Now for make this information accessible from other Classes I created get method for username and email,
when I used get method from Another class , I got an indexOutOfBoundsException with list index 0,size 0.
How am I supposed to return data from inside of addOnSuccessListener(), And what is the reason my array is empty although I added the data on it
package...