Question:I am creating a userModel instance inside my authController and want to add
obsfrom Getx to that userModel like:
Rx<model.User>? userModel = model.User().obs;, but the fields inside my
model.Userare all required.
How can I pass these parameters if they have not yet been initialized as they will get initialized after the user signs in?
I referred this github: Github where he has done it because his parameters are not “required” as it is old, but now flutter is null safe and is forcing “required” parameters in my user model.
?operator to tell explicity that the object can be
So the code goes like:
If you have better answer, please add a comment about this, thank you!