how to use Conditional rendering with getX boolean observable


In my login controller:

class LoginController extends GetxController {
  final GlobalKey<FormState> loginFormKey = GlobalKey<FormState>();

  late TextEditingController emailController, passwordController;
  var isloading = false.obs;    <<<<<<<<<<<<

and in my view file:

  color: Colors.blueGrey,
  width: double.infinity,
  height: 150,

  child: Obx(()=>
      child: logincontroller.isloading ? CircularProgressIndicator(): Container(),


however I keep getting this message:

33:50: Error: A value of type ‘RxBool’ can’t be assigned to a variable
of type ‘bool’.


Try logincontroller.isLoading.value to check the value of RxBool

Answered By – esentis

Answer Checked By – Robin (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *