Questions tagged [flutter-getx]

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

1530 questions
5
votes
2 answers

How do I set up navigator using Getx and Auto Route?

Problem: I am having trouble setting up navigation using GetX and AutoRoute. Code Setup: According to the GetX documentation, if you want to use GetX navigation you have to replace MaterialApp() with GetMaterialApp(). You also set the routes. void…
Biosx
  • 75
  • 1
  • 1
  • 7
5
votes
5 answers

How to handle Get.arguments as null in GetxController

I have following GetX controller to pass parameters to page in Flutter: UPDATED class HomeController extends GetxController { File image; String ocr_text; onInit(){ super.onInit(); image = Get.arguments['image']; ocr_text =…
laxsore
  • 143
  • 1
  • 2
  • 9
5
votes
1 answer

Field "field" required when sending FormData with MultipartFile GetConnect

I am trying to make a put request to update a user profile with GetConnect. The user profile takes some normal JSON fields and a MultipartFile for the profile picture. Here's my ProfileProvider class: class ProfileProvider extends GetConnect { …
S. M. JAHANGIR
  • 4,324
  • 1
  • 10
  • 30
5
votes
2 answers

Flutter: setState() or markNeedsBuild() called during build. Using future builder and obx

I'm using flutter and GetX, so i'm implementing Obx inside my code. I have 3 files: questionnaire.dart questionnnaire_controller.dart popup.dart Inside the popup.dart I have the layout of the popup. Inside questionnaire.dart I have the code that…
we_mor
  • 478
  • 5
  • 20
5
votes
1 answer

How to handle complex API data response in Flutter GetX using observable method

I am a newbie in the world of flutter and GetX package and I am trying to create a simple app using Laravel as my API service and I am sending the response from the API in JSON format and I am using Laravel resource API so it is sending some extra…
Shoaib Khan
  • 830
  • 1
  • 9
  • 17
5
votes
3 answers

How to use Flutter GetX Sidebar

How can I implement the design in the image (sidebar and navigation menu) in Flutter using GetX? similarly to Tabs on the web.
j.itD
  • 61
  • 4
5
votes
2 answers

create a page on a specific folder get cli | Getx Flutter

I have installed the get_cli for my flutter development. As the docs say, I use the command get create page:home to create a home module with bindings, view and controller. It is created in the lib/app/modules/home folder by default. How to create…
Abhijith Konnayil
  • 4,067
  • 6
  • 23
  • 49
5
votes
3 answers

how to Flutter Getx binds obs to Widget?

when I use Getx to update my Widget? I do not know Rx() how to contact to the thing I put in. code is _obx=Rx(). but I send data is "".obs. that is not Rx() but this is RxString(). when I use "".obs.value="newString". why Rx() can know that who…
fgyong
  • 51
  • 1
  • 1
  • 3
5
votes
4 answers

Flutter dismiss selected dialog with Getx

I am using flutter for quite some time and recently use Get to implement state management. I am facing a problem when opening a loading dialog 1st and then message dialog. Then I want to dismiss the loading dialog, but the message dialog is the one…
Geoffrey Lee
  • 387
  • 2
  • 7
  • 15
4
votes
0 answers

How to generate a map out of all translator "string".tr string in my app using Flutter Getx localization

As mentioned in GetX Documations to use GetX Localization I should create a messages.dart file that contains a map for every language as this one : import 'package:get/get.dart'; class Messages extends Translations { @override Map
Ahmed Wagdi
  • 3,913
  • 10
  • 50
  • 116
4
votes
1 answer

change the value in the list with getx, the value is updated, but the screen does not rerender

When i change the value in the list with getx, the value is updated, but the screen does not rerender. i use GetBuilder because wrapping with obx gives an error. But it still doesn't work where am I making a mistake my controller: …
Gülsen Keskin
  • 657
  • 7
  • 23
4
votes
4 answers

Flutter GetX: Where Does Get.put Go in a Widget?

I am new to GetX and am trying to learn how to use it. I have read different tutorials that inject the controller outside of the widget's build method, and others that put it inside it. class MyWidget extends StatelessWidget{ const MyWidget({Key?…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
4
votes
1 answer

Flutter Getx Stream value changes to Instance after InIt

I'm using Getx to bind a stream to userDataModel. On initialization, the value is printed from the firestore database, but later the values are null. When are try to print the value by using print(_userDataController.userDataModel.value.foodData);…
Shakun's
  • 354
  • 4
  • 15
4
votes
1 answer

Why most of the codes use Provider package and don't use GetX/Riverpod/Bloc?

I am learning Flutter. Most of the tutorials use Provider package but some others on Youtube use GetX. I searched about it and found that it seems there are another packages like Bloc, Riverpod, etc. I am confused and don't know which one to use? It…
4
votes
2 answers

how to solve Unhandled Exception: Converting object to an encodable object failed?

I created 2 classes the first one is : class Mesure { late String equipement; late String number; late String courant = ""; Mesure.init(List values) { equipement = values[0]; number = values[1]; courant =…
Abmb
  • 63
  • 4