You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I wanted to ask it is okay to extend GetXController by creating a Parent Controller and have their child Controller extending it.
Basically the idea is,
I want to create a parent controller known as AuthController extends GetXController,
my child Controller would be SignInController, ForgotPasswordController, and SignUpController and each of them will be extending AuthController.
Reason for this is because in each of the child's Controller, I have common functions such as
getOTPCode, getUserInfo and so on.
However as I try to find for resources relating to GetXController, so far this is considered anti-pattern, whereby the more appropriate pattern would be:
AuthController will be the main Controller, and I had to put() or lazyPut() the child's Controller into AuthController and then Get.find() in AuthController itself?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all, I wanted to ask it is okay to extend GetXController by creating a Parent Controller and have their child Controller extending it.
Basically the idea is,
I want to create a parent controller known as AuthController extends GetXController,
my child Controller would be SignInController, ForgotPasswordController, and SignUpController and each of them will be extending AuthController.
Reason for this is because in each of the child's Controller, I have common functions such as
getOTPCode, getUserInfo and so on.
However as I try to find for resources relating to GetXController, so far this is considered anti-pattern, whereby the more appropriate pattern would be:
AuthController will be the main Controller, and I had to put() or lazyPut() the child's Controller into AuthController and then Get.find() in AuthController itself?
Advice is much appreciated 🙏
Beta Was this translation helpful? Give feedback.
All reactions