Questions tagged [flutter-getx]

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

1530 questions
0
votes
0 answers

how do i solve this error when i try to get data from the api

I have an error when getting data from an api. I'm using get connect for this but I'm getting an error. my api has a bearer token, and i'm already getting this token on startup using shared preferences, but when i start the app i get an error that i…
0
votes
2 answers

Flutter GetX state management can't update the variables state

I Can't Change the state of any variable with .obs, RxType and Rx(); And when i try to change it it will give errors that ican't assign a value type int to variable type RxInt. Here is the code: class StateController extends GetxController { late…
Hama Sabah
  • 342
  • 4
  • 9
0
votes
2 answers

How can I translate hint text in GetX?

I want to translate my hint text, but I don't know how. Is there a way I can translate this? InternationalPhoneNumberInput( searchBoxDecoration: InputDecoration( hintText: 'country_code',)) // How can I translate this in GetX?
0
votes
1 answer

GetxController structure

class Controller extends GetxController { int currentIdx = ''.obs; void updateInt(int idx) { currentIdx = idx.obs; } } here is my controller. Now I put this line a widget to get idx value and assign immediately to currentIdx…
0
votes
1 answer

Flutter with Getx ImagePicker does not work properly

Why does the image update only when I save file? image_picker version image_picker: ^0.8.4+3 My Code related to ImagePicker // image_picker_controller.dart // controller import 'dart:io'; import 'package:get/get.dart'; import…
Ryan
  • 37
  • 1
  • 10
0
votes
2 answers

flutter getx initialroute delay

I am using getx. I want to add a delay to the initialRoute of GetMatrialApp. initialRoute : splash screen I want to stay on splashscrren for 2-3 seconds and then go to the login screen. There is no delay even if you put a delay function in the…
lhyojin0821
  • 175
  • 9
0
votes
1 answer

List.contains not working with initialized List

I have a fixed List i.e fixGuestList that is being initialized in init(). On a button tap, a list of Guests appears. On tapping the guest, the selected guest is being added to the fixed list i.e fixGuestList. So basically I'm adding elements from…
Shakun's
  • 354
  • 4
  • 15
0
votes
0 answers

Obx widget is not updating on observable variable change

I have two forms which updates a non-observable User model on the form input's onChanged. Along with this, I have a state enum (observable) which determines whether or not the user is registering/logging in. The login controller roughly has this…
0
votes
2 answers

Navigte back with params in flutter using GetX and accessing the results in the previous page

I am creating a flutter app which enables a user to select a contact and display the selected contact before navigating back from the list of contact. class ContactsList extends StatelessWidget { final List contacts; …
0
votes
1 answer

Obx does not update RangeSlider GetX

Declared out of Widget build scope: Rx values = RangeValues(MIN_USD_AMOUNT, MAX_USD_AMOUNT).obs; Rx labels = RangeLabels(MIN_USD_AMOUNT.toString(), MAX_USD_AMOUNT.toString()).obs; this is in the Container in…
John63s
  • 11
  • 4
0
votes
1 answer

Connect scrollcontroller to multiple screens using getx - flutter

I have four screens on my app, first one displays a list of messages using a listview, second one has a button with an input that sends messages, third screen connects the first and second screen together and the fourth screen is my getx controller…
Brightcode
  • 660
  • 9
  • 27
0
votes
2 answers

is possible to insert item into map if it does not exist and otherwise increment its occurrence in dart/flutter?

I have a shopping cart controller in dart/flutter with GetX statemanager. I have two different arrays with the same items. When a product is added to the cart, i want to first check if the item exists in a map. If so, i increment its occurrence,…
0
votes
1 answer

Flutter changing theme using GetX?

I made a changeable theme in flutter and later I made multi-language support, I used getx for theme switching, I used easy_localization for language change. When I use GetMeterialapp on the main page, it doesn't work, when I do Meterialapp it works…
0
votes
1 answer

Cannot update DropdownButtonFormField field value in flutter with getx obs

I am using getx obs with fluter and the below is json response. [{"id":1,"designation":"Deputy General Manager"},{"id":2,"designation":"Executive Director, Technical Operations","designation_short_code":"ED,…
0
votes
0 answers

GetX: how to access previousley updated value not on widget?

I have 2 screens: ShowProductDetail and EditProductDetail. The Product model class Product { String? id; String? name; String? description; double? price; double? discount; int? originalStockCount; int? currentStockCount; } And the…
anta40
  • 6,511
  • 7
  • 46
  • 73