I want to get data of authenticated user from firestore and put them in variables in flutter, I do not need to display them on the screen I just want to store them in variables : I created file data.dart It has only variables . this is the file contains the variables(data.dart) (I dont have statefull widget or stateless widget) :

and this is the file where I called The variables(firbaseapi.dart):
String myId = "AfhUxYFIaHTvSOyOPlh14essssq9pJpW2"; // I want to get user id here
String myUsername = 'Sabri'; // I want to get username here
String myUrlAvatar = 'http//kdkskdskd'; // I want to get avatar URL here
I tried this but I got an error : A value of type 'Future' can't be assigned to a variable of type 'DocumentSnapshot'. Try changing the type of the variable, or casting the right-hand type to 'DocumentSnapshot'
User user = FirebaseAuth.instance.currentUser;
DocumentSnapshot snap =
FirebaseFirestore.instance.collection('Users').doc(user.uid).get();//error appear here
String myId = snap['uid'];
String myUsername = snap['name'];
String myUrlAvatar = snap['avatarurl'];
