Questions tagged [flutter-getx]

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

1530 questions
2
votes
1 answer

What are the memory management differences between Get.put(SomeClass(), permanent: true) and Get.put(SomeGetXService())

I am using Getx and its dependency injection mechanism. sometime I am overthinking - should I inject a class that should remain in memory (for good as a Singelton) using Get.put(SomeClass(), permanent: true) or…
vigdora
  • 319
  • 4
  • 11
2
votes
2 answers

How to sequentially call the Getx controllers

My Task is : I have an list of orders in firebase in users collection , I want to get information of those orders which is in orders collection, And moment a list of order is updated in the firebase users collection. The orders list should be…
2
votes
1 answer

Flutter - How to broadcast in GetX?

I have a requirement: I have A, B, C, D, E.... multi pages in App. And now When I click a button in Page E, change the keyword, All page's controller will get this notification and use this changed keyword to query the web server then update page's…
zhouxinle
  • 429
  • 5
  • 16
2
votes
2 answers

Flutter: How to trigger a bloc event in the controller?

In summary I want the "context.read().add(EnabledEvent())" to work from the controller itself or some other alternative I can use to trigger an event from the controller and update the state: class SplashCtrl extends GetxController { @override …
Megawatt
  • 165
  • 3
  • 13
2
votes
1 answer

How to combine the usage of GetX and build_value?

Our app has a lot of provider (https://pub.dev/packages/provider) code which uses built_value (https://pub.dev/packages/built_value) to be able to work with immutable data objects. Now we want to migrate the whole provider functionality to the state…
2
votes
1 answer

Getx Bottomsheet setstate doesn't update

I implemented a getx bottomsheet which i use to pick date and time. However when i select the date and time, the ui doesn't update on the bottomsheet immediately until i close and reopen the bottomsheet then the selected value appears in the…
Sharada Sharma
  • 129
  • 1
  • 11
2
votes
0 answers

Flutter Web Unexpectedly null value after call Hot Reload

We are developing a large project with flutter web. But when we run the application in debug mode, it works fine at first, but when we make a change and hot reload/hot restart, we get an Unexpected null value error. When we build our web application…
Berat Kurt
  • 95
  • 1
  • 8
2
votes
0 answers

RangeError (end): Invalid value: Only valid value is 0: 1 when generating model

Getting the error RangeError (end): Invalid value: Only valid value is 0: 1 when generating model when I try to generate model Expected Behavior when I use this command get generate model on match_details with…
Ahmed Wagdi
  • 3,913
  • 10
  • 50
  • 116
2
votes
1 answer

How to add the selected element to the page?

I have a list of news that comes from the API on the screen. Output code for one card with news(I shortened the code and left only the necessary): Widget customListTile(Article article, BuildContext context) { final newsController =…
userName
  • 903
  • 2
  • 20
2
votes
1 answer

Flutter GETX - What is the difference between variable.value = newValue and variable(newValue)?

I've always been thinking that in Flutter GetX library, if I have an observable variable defined in this way Rxn myObsObject = Rxn(); I could update its value by doing: myObsObject(newValue) / myObsObject(null) or in an…
Ale TheFe
  • 1,540
  • 15
  • 43
2
votes
1 answer

Flutter-Firestore:- Unable to upload image to firestore. its says reference object is not found

I am very new to Dart, and coding in general. I have produced this code after watching tutorials on YouTube. For the most part, I have been able to troubleshoot most of my problems on my own, here I feel I need some help. I have written code to…
sandeep rana
  • 121
  • 11
2
votes
1 answer

Does using the getx with a stateful widget in flutter cause any performance issues?

I am building a flutter application and I want to use a stateful widget in my project and want to use the getx library for state management. I was wondering if there is going to be any performance
Josh Cipher
  • 43
  • 2
  • 6
2
votes
3 answers

I need to display an Arabic date picker

I need to display an Arabic date picker , I can't control this with Locale constructor . It's only display an English view . Pick date metod DateTime selectedDate = DateTime.now(); Future _selectDate(BuildContext context) async { …
Nader Salah
  • 93
  • 1
  • 9
2
votes
2 answers

"GetXController" not found. You need to call?

I want to implement GetX binding methods, and as result, I got this error: ════════ Exception caught by widgets library ═══════════════════════════════════ The following message was thrown building MyApp(dirty): "UserController" not found. You need…
Milos N.
  • 4,416
  • 6
  • 18
  • 31
2
votes
3 answers

Flutter - How to use mounted in GetX

I initiate network request in GetXController, after network call back, I should judge this controller/this page is dealloc or not. If this page is not dealloced, update Page. If this page is dealloced, I do noting. As I know, I can write below codes…
zhouxinle
  • 429
  • 5
  • 16