Questions tagged [flutter-getx]

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

1530 questions
0
votes
1 answer

Using Flutter GetX and an API, how do I display the API data into a Text widget?

I have been watching YouTube videos and reading how to use GetX to display API data but I cannot get it to work with my API. I cannot figure out what I am missing to be able to display the price of a stock from my StockQuoteModel. I am attempting…
romajc
  • 19
  • 1
  • 6
0
votes
2 answers

getx and weird problem: text won't change on UI

I am trying to create a search function from firebase and i am using getx for the state management I counter this weird problem, when I try to use the function directly it work, but when I use the firebase function it does not. I will explain more…
0
votes
1 answer

update does not work in onStart Getx Flutter

I have a getx Controller and I want to call a certain function and restart UI every time my Controller gets build... I use onStart function to do this @override get onStart { getBalance().then((value) { update([1]); }); return…
Ardeshir ojan
  • 1,914
  • 1
  • 13
  • 36
0
votes
1 answer

Getting error code 415 unsupported media type with GetConnect library in Flutter

I am trying to make a GET request with the api key and headers. I keep getting the '415 Unsupported Media Type' error. I have tried including the 'content-type' as 'application/json' in the headers but I still get the same error. There is very…
0
votes
0 answers

type 'Future' is not a subtype of type 'FutureOr' in type cast while trying to retrive bluetooth state in flutter

See error screenshot I'm trying to monitor the state of the bluetooth device. For example a users bluetooth is turned on before entering the app. I want the bluetooth swtich to be turned on in the app. I am using GetX for state…
Wesle6
  • 31
  • 3
0
votes
1 answer

I would like to be able to change the Fontfamily when I press the ElevatedButton in flutter

I want the Textfield and the fontFamily in the picture at the top to change when the ElevatedButton is pressed. What should I do? I want to try GetX. home_page.dart ListView( scrollDirection: Axis.horizontal, children: [ FontFamilyWidget( …
LiDe
  • 35
  • 1
  • 7
0
votes
2 answers

Flutter GetX controller getting null instead of data

I have an API (which does work and returns a response, and I even can see the response 1 line above the return statement), but for some reason, when the data should be passed to the variable, I receive null, instead of the returned value. the…
Slava Bugz
  • 318
  • 5
  • 17
0
votes
1 answer

Flutter slider value is not update inside getx dialog

I am trying to build a slider widget inside a dialog. I am using GetX, and a GetxController but the value of the slider or any other widget is not updating when I am trying to change it. It only updates after I reopen the dialog. This is my code for…
alexmro
  • 55
  • 2
  • 12
0
votes
1 answer

Which package is better flutter_secure_storage or getx in my scenario?

I am using the https://pub.dev/packages/flutter_secure_storage (uses Await/Async functions) to store a value and later retrieve it. Note that everytime I open the app, I will update the value. I just use this for the purpose of storing and…
inter cretasyo
  • 149
  • 1
  • 12
0
votes
1 answer

GetX microservice with FloatingActionButton + What's a good choice? GetX or Flutter BLoC?

Anyone here have used GetX Dialog Component inside of FloatingActionButton (FAB) in Flutter? i have tried it. but, i still got error when implemented in build debug. can you have to give me a good choice. what's a good choic GetX or Flutter BLoC?…
Michael Fernando
  • 117
  • 1
  • 10
0
votes
0 answers

NoSuchMethodError: The method '[]' was called on null. Receiver: null. Tried calling: []("duyuru")

// my controller class DuyuruController extends GetxController { FirebaseFirestore _firebaseFirestore = FirebaseFirestore.instance; TextEditingController duyuru = TextEditingController(); Rx> duyurumodel =…
0
votes
1 answer

There's no error but I am not getting data from my firestore database while using GetX flutter

Controllers are working right and so is everything. However, I am not able to display data that I added to my firestore database. Below is the widget to display the data. class ProductsWidget extends StatelessWidget { @override Widget…
0
votes
0 answers

cant store user info locally with shared preferences and local storage

This code is from my local storage data file and from my testing i guess the bug is laying in the setUser method or somewhere in the next file. class LocalStorageData extends GetxController{ static const CACHED_USER_DATA = 'CACHED_USER_DATA'; …
0
votes
0 answers

Getx controller return null after using it for one time

I am working on an application (something like a quiz app to do some calculations). For each screen I have a controller and one of these screens is the result screen. Everything works fine in the first attempt, however, in the second attempt, when I…
Ali Alqallaf
  • 789
  • 9
  • 24
0
votes
2 answers

Flutter GetX Timer Error. HomePage is not refreshed

I'm trying to get data every 30 seconds but I don't understand how to do it. There is no problem with the Getx controller file I created. I am able to pull the data but it is not refreshing. This is my controller: class AllCoinController extends…
regenin
  • 291
  • 9
  • 18