DEV Community

Discussion on: 5 Reasons why I use GetX for my application state management

Collapse
 
sujithsa007 profile image
Sujith S A • Edited

I tried passing the loading value as shown below, but it is not changing. Tried the same in a checkbox and its working though

controller.loadingScreen
? Center(child: CircularProgressIndicator())
: Container(),

controller class code
RxBool _loadingScreen = false.obs;
get loadingScreen => _loadingScreen.value;

Collapse
 
bihim profile image
Zubaer Alam Bihim

Try like

YourController.dart> var loadingScreen = false.obs; (make it public)
YourScreen.dart> controller.loadingScreen.value == true
? Center(child: CircularProgressIndicator())
: Container(),

If you have any query pm me at telegram/bihim (IDK how to hyperlink telegram).