I'm putting my GetXController only once on the home page using :
class NewOrdersList extends StatelessWidget {
final OrdersController ordersC = Get.put(OrdersController());
...
then whenever I need the controller I simply use
OrdersController ordersC = Get.find();
and the controller itself:
@override
void onInit() {
trackLocation();
super.onInit();
}
at the end of the function trackLocation(); I use OrdersController ordersC = Get.find(); because I need to access a variable inside the controller.
but when u launch the application I see that the controller has been initialized thousands of times.
