GetX is a state management, dependency injection, and route management solution for Flutter.
Questions tagged [flutter-getx]
1530 questions
2
votes
5 answers
how to get a user's location in flutter
I want to locate the user and send his location coordinates via api to the server, Please answer with code, I've tried library geolocator: ^7.7.0
void getCurrentLocation() async {
Position position = await…
user16867349
2
votes
0 answers
Flutter getX error This Obx widget cannot be marked as needing to build because the framework is already in the process of building widgets
I'm trying to update the list from the server every time the widget is being built using GetXController here are my files :
controller.dart
var newOrders = [].obs;
getNewOrders(BuildContext context, bool notification) async {
…

Ahmed Wagdi
- 3,913
- 10
- 50
- 116
2
votes
1 answer
GetX + Flutter: how to make Obx rebuild when updating a list inside an entity (and in general, what triggers an Obx rebuild)?
I'm working on a Flutter project which uses GetX for state management.
We have some entities which contains List properties. A simplified version would be similar to this:
class UserFees extends Equatable {
final String userId;
final…

Eric Omine
- 489
- 4
- 15
2
votes
1 answer
How to get the route name of back screen
Before I back to the previous screen, is it possible to get this back name and conditional execute the needed method call?

ccd
- 5,788
- 10
- 46
- 96
2
votes
3 answers
How save and write data using GetX storage?
First I created the GetxController class
final languageController = GetStorage();
var myLocal = [];
void saveLocale(List list) {
languageController.write('savedLocale', list);
}
@override
void onInit() {
List?…

brennschluss
- 21
- 1
- 1
- 3
2
votes
2 answers
Flutter GetX variable changes but UI does not
I have two RxLists containing custom models:
var openDepartures = RxList([]);
var finishedDepartures = RxList([]);
I bind a stream to populate these RxLists with values from firebase. Since my Stream(which I am binding to the…

Lars
- 1,250
- 9
- 25
2
votes
1 answer
How to cache Future in FutureBuilder's Future.wait function to not rebuild everytime state changes
I want to use multiple Futures so I implemented Future.wait functionality in FutureBuilder.
But it keeps rebuilding whenever page state changes. How can I cache futures in Future.wait ?
Here is the code:
GetBuilder(builder:…

Umut Arpat
- 454
- 1
- 6
- 18
2
votes
2 answers
How Can I Restart My Flutter App With Getx
I am using the getx package in my application and there is something I am wondering about. Is it possible to reset all states of my app using getx?
So it's kind of like a restart.

OneMore
- 89
- 1
- 7
2
votes
1 answer
Flutter web custom url route results in 404
I'm using flutter web to build a website. I have two main routes in my website, a LoginPage which also is the initialRoute and a HomePage.
I'm using Get to move between routes and I set up the path navigation strategy using the url_strategy…

yawg567
- 111
- 5
2
votes
1 answer
how to use Conditional rendering with getX boolean observable
In my login controller:
class LoginController extends GetxController {
final GlobalKey loginFormKey = GlobalKey();
late TextEditingController emailController, passwordController;
var isloading = false.obs; …

Karan V
- 163
- 2
- 10
2
votes
2 answers
Avoid ListView's unwanted refresh
As the following animation displays, when I tap one of the list items that StreamBuilder() is querying, it shows the items data on the right darker container (it's always Instance of '_JsonQueryDocumentSnapshot'). But at the same time in each tap,…

SLendeR
- 839
- 7
- 25
2
votes
1 answer
How can we handle deep links in flutter with Get X for go to Custom pages of the application?
How can we handle deep links in flutter with Get X for go to Custom pages of the application ?
By default, by adding the desired address to the Android Manifest file:

Huseyn
- 372
- 1
- 7
- 20
2
votes
2 answers
Is it a good practice to have multiple views per module in a flutter project using GetX Pattern?
I have a flutter project using GetX library.
I try to follow the GetX Pattern (more about GetX Pattern here).
My question is about code architecture. Is it considered a good practice to have multiple views inside one module?
Currently, I have a…

Manu
- 372
- 2
- 12
2
votes
2 answers
Flutter and getx: update() does not notify GetBuilder
I have a very strange issue for my current project using Flutter and getx package. Short: the Notifier is not working. On initState from a GetBuilder I try to update an variable (.obs) and call update(), but the view knows nothing about…

Vueer
- 1,432
- 3
- 21
- 57
2
votes
1 answer
Another exception was thrown: Multiple widgets used the same GlobalKey
I am using bottom navigation bar which contains global key which i have been intialized in home controller.
I am routing my page like from page1 to page 2 and page 3 and now from page 3 i am routing back to home page then it throws the error…

Hira Kauchha
- 79
- 1
- 7