GetLifeCycle in flutter

GetLifeCycle in flutter :

GetLifeCycle in flutter

flutter getx or get lifecycle ?

GetLifeCycle in flutter :

GetxController, which serves to control events on each of its pages, GetxService is not automatically disposed (nor can be removed with Get.delete()).


It is ideal for situations where, once started, that service will remain in memory, such as Auth control for example. Only way to remove it is Get.reset().

initialized: Checks whether the controller has already been initialized.


_onStart: Internal callback that starts the cycle of this controller.

onInit: Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.


onReady: Called 1 frame after onInit(). It is the perfect place to enter navigation events, like snackbar, dialogs, or a new route, or async request.

onClose: Called before [onDelete] method.

[onClose] might be used to dispose resources used by the controller. Like closing events, or streams before the controller is destroyed. Or dispose objects that can potentially create some memory leaks, like TextEditingControllers, AnimationControllers. Might be useful as well to persist some data on disk.

The flutter tutorial  is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application.