Questions tagged [flutter-getx]

GetX is a state management, dependency injection, and route management solution for Flutter.

1530 questions
3
votes
1 answer

checkbox list does not update in flutter getx

I am using GetX for the state management in flutter project. My problem is when I click on the checkbox it updates the state in controller but does not show the result in UI. In general the changed state should change the UI too. I am not sure what…
Speeder
  • 120
  • 3
  • 12
3
votes
4 answers

How to forcefully close GetX Snackbar?

I am using Get.snackbar() to show the process of connection to API. I don't understand how programmatically close a snackbar? I have the following code: @override Future getImportantData(String inputData) async { try { final token…
3
votes
1 answer

GetX Get.toNamed() is ignoring onGenerateRoute on Navigator

I have a problem, I'm using GetX in my Flutter Application. I need to use nested navigation cause I'm using BottomNavigationBar. First I have a Navigator Widget, the problem is when the Get.toNamed method is called and the onGenerateRoute is not…
user9378857
  • 51
  • 1
  • 4
3
votes
3 answers

XXXController not found you need to call Get.put or Get.lazyPut

I am trying to create simple app with next layout: Buttons should switch Widget1\Widget2. I wrote next code (copy-past ready): import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import…
Dmitry Bubnenkov
  • 9,415
  • 19
  • 85
  • 145
3
votes
1 answer

Navigation Error with GetX State Management:

I can navigate first two screen (HomeMovie, HomeTvSeries) with Get.rootDelegate.toNamed method. But when I try to navigate to Detail Page from either of them, I am getting an error. I have followed the docs and examples but I couldn't find anything.…
Hazar Belge
  • 1,009
  • 4
  • 20
3
votes
2 answers

Is it ok to use both GetX and Get_it at the same time?

I want to use GetX in my flutter project for state management. I don't know how I can achieve dependency injection with GetX though. Is it ok to use Get_it along with GetX in the same project? I feel like doing so makes the code cluttered. Or should…
Shaw
  • 61
  • 1
  • 3
3
votes
1 answer

How to listen to a FocusNode with GetX in Flutter

I've just discovered GetX and I love it! Is there a neat way of listening to a FocusNode with GetX instead of using a StatefulWidget? class CustomTextField extends StatefulWidget { const CustomTextField({Key? key}) : super(key: key); @override …
JakesMD
  • 1,646
  • 2
  • 15
  • 35
3
votes
4 answers

Flutter: How to change text color using getX?

I want to change the color of a ListTile text on clicking on the tile how can I do that also the color should only be changed for a specific selected tile. My approach is as following: ListView.builder( itemCount:…
Aman Rawat
  • 217
  • 3
  • 9
3
votes
3 answers

GetStorage always returns null in flutter

Code print("Before : ${GetStorage().read("XXX")}"); GetStorage().write("XXX", 1); print("After : ${GetStorage().read("XXX")}"); This is my Code. Every time I run the App, the Output is Before : null After : 1 Why is the storage data…
Prateek BB
  • 167
  • 1
  • 9
3
votes
3 answers

Null check operator used on a null value in flutter getx

My code is giving the Null check operator used on a null value error although I can't found any null value in the code. I don't know which screen is actually causing the error but surely it is out of these two screens only which are Splash…
yogender
  • 202
  • 3
  • 12
3
votes
1 answer

GetX: Controller for each item in a list

Using Flutter with GetX. I have a GetX controller for items and I have a list of items. When I use final ItemController c = Get.find(); it uses the same controller for each item in the list and the values within every item get overwritten. How can…
Simpler
  • 1,317
  • 2
  • 16
  • 31
3
votes
2 answers

Can I use getx controller inside another getx controller?

I am using Get (getx) package to manage the state of my app, and I am trying to use a controller inside another one. For example I have a class the contains methods for firebase authentication class FirebaseAuthController extends GetxController { …
Ali Alqallaf
  • 789
  • 9
  • 24
3
votes
1 answer

'package:flutter/src/widgets/will_pop_scope.dart': Failed assertion: line 135 pos 12: '_route == ModalRoute.of(context)': is not true

I am using Getx State Management. I have a LOGINSCREEN and its GetxController. In that GetxController I have defined a FormKey like this final formKey = GlobalKey(); When from any other screen I navigate directly back to LOGINSCREEN (For…
JC18
  • 65
  • 5
3
votes
4 answers

How to use GetX on a value?

I want to make a Password TextField in which the content visibility can be controlled by the suffix icon. The code may like this: import 'package:flutter/material.dart'; import 'package:get/get.dart'; void main() { runApp(TestGetX()); } class…
刘维兵
  • 109
  • 1
  • 5
3
votes
1 answer

Flutter GetX: Animation with GetxController

I'm trying GetX for my new project and tried to use AnimationController which is inspired this comment. Everything works fine with default value for Tween -> blur & spread & AnimationController -> duration. What I'm doing: 1: Created an widget with…
Anu Tig3r
  • 143
  • 1
  • 7