There is a way to get firestore data for example " User information" into user model class in flutter? This is my User Class:
class Users {
final int id;
final String firstName;
final String lastName;
final String emailAddress;
final String imageProfile;
const Users({
this.id,
this.firstName,
this.lastName,
this.emailAddress,
this.imageProfile,
});
}
final Users currentUser = Users(
id: 'GET_DATA_FROM_FIRESTORE'/// firebaseUSer.currentUserUID
firstName: 'GET_DATA_FROM_FIRESTORE',
lastName: 'GET_DATA_FROM_FIRESTORE',
emailAddress: 'GET_DATA_FROM_FIRESTORE',
imageProfile: 'GET_DATA_FROM_FIRESTORE',
);
then pass the data with currentUser.firstName
etc.. to other widgets.
the data I need to retrieve into this class is created into SignuUp form in flutter and pushed to firestore collection