Question:
I am creating a userModel instance inside my authController and want to addobs
from Getx to that userModel like: Rx<model.User>? userModel = model.User().obs;
, but the fields inside my model.User
are 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.

AuthController code:
Answer:
Add?
operator to tell explicity that the object can be null
.So the code goes like:
If you have better answer, please add a comment about this, thank you!