How to declare a reactive firebase user using getx package


I want to declare a FirebaseUser (from the firebase_auth package), in a reactive way.

Rx<FirebaseUser> firebaseUser = Rx<FirebaseUser>();

But Rx<FirebaseUser>() give me the error

"1 positional argument(s) expected, but 0 found".

Any work around ?


Are you using a null safety version of GetX?

If so, this is probably what you’re looking for:

Rxn<User> firebaseUser = Rxn<User>();

Answered By – Loren.A

Answer Checked By – Mildred Charles (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.