Questions tagged [flutter-getx]

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

1530 questions
4
votes
4 answers

Obx ListView not updating after value changes

I am having a RxList called todoData. On the basis of this list, a ListView.builder builds a list and in each list there is a button. When this button is clicked the done field of the respective item is updated to either true or false. But, though…
Ajit Kumar
  • 367
  • 1
  • 10
  • 35
4
votes
1 answer

flutter getx, getview with two controllers

I'm a little bit confused with how GetView works. I currently have a page that needs to have at least 2 different controllers. From what I've seen, people mostly use GetView as opposed to Get.find() for better code format, however GetView seems to…
4
votes
1 answer

Flutter: GetX place multiple pages on the stack

I use Getx for route management in my Flutter application. When a certain notification arrives and the app starts from terminated state I want: launch the / route (launch screen) go to potm/:match_id route when user presses back go to…
alexlipa
  • 1,131
  • 2
  • 12
  • 27
4
votes
1 answer

BuildContext when using GetX

I try refactor my flutter app and start using GetX library. I using library "flutter_form_builder", and some methods here need BuildContext argument. For example: String? Function(T?) FormBuilderValidators.equal( BuildContext context, Object…
sosnus
  • 968
  • 10
  • 28
4
votes
1 answer

Flutter, GetX initState

can someone explain how to use onInit in GetX and is it important to use the dispose/onClose ? i want to GET api data and show it from the start of the app already googled it didn't find anything helpful :(
CCP
  • 886
  • 1
  • 10
  • 30
4
votes
1 answer

navigatorKey.currentContext is Always Null

I want to switch to a screen when an FCM background message receives. But for this context is required which I definitely don't have inside FirebaseBackgroundMessageHandler so after searching on the internet and I found that I can get the current…
Siddharth Mehra
  • 1,691
  • 1
  • 9
  • 32
4
votes
1 answer

Flutter: How do I update markers' position in google map using Getx Obx?

I have following view import 'dart:async'; import 'package:get/get.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import '../../Controllers/mapview_controller.dart'; class MapViewerPage…
WatsMyName
  • 4,240
  • 5
  • 42
  • 73
4
votes
1 answer

Flutter GetX Obx [Get] the improper use of a GetX has been detected. You should only use GetX or Obx for the specific widget that will be updated

I am using GetX and heavily using Obx to build by UI in a reactive way, however, I've always stumbled whenever I need to do some processing of my Rx-variables and it ended up with this error: [Get] the improper use of a GetX has been…
Zennichimaro
  • 5,236
  • 6
  • 54
  • 78
4
votes
1 answer

GetX - How replace an old route with a new route?

Navigator.of(context).replace(oldRoute: oldRoute, newRoute: newRoute); How to using this origin Flutter Api in Getx? I am using the named routes in project like this : GetPage( name: Routes.SELECTTARGET, page: () => TargetPage(), …
zhouxinle
  • 429
  • 5
  • 16
4
votes
0 answers

Accessing GetXController in a Flutter widget test

I am in the process of implementing a widget test for a login screen. In the app, the login screen offers the user a switch control to set preferences for biometrics if they are available on the device. We are researching GetX and need to test this…
Pheepster
  • 6,045
  • 6
  • 41
  • 75
4
votes
6 answers

In Flutter, Getx package unknownRoute not working

I'm starting to learn Getx in flutter, and using navigation. I want to set unknownRoute, in case that there is a typo etc in the namedroute, so the app should go to a default page. I do like this: return GetMaterialApp( title: 'Named…
RJB
  • 1,704
  • 23
  • 50
4
votes
1 answer

Flutter Web: Right click -> Browser Context Menu -> Open Link in New Tab

I have a basic website using GetX for navigation. I have inkwells with ontap functions which navigate to a new view. Right now, if you right click these buttons there is no "open link in new tab/window", "save link as" or "copy link address". Is…
Najo
  • 71
  • 1
  • 3
4
votes
2 answers

Flutter - GetX: The list literal type 'List' isn't of expected type 'RxList'

I'm a beginner of Flutter. I'm making a sort of shopping list app. Using this tutorial https://www.youtube.com/watch?v=ZnevdXDH25Q I'm trying to use GetX for state management. I have this class named 'Items' which has some attributes. I create a…
mlazzarotto91
  • 103
  • 3
  • 13
4
votes
3 answers

can I use Getx and Bloc state management in one project ( Social Network app , big project ) without problems?

My project is a Social network hybrid mobile app that is made with flutter, dart ( frontend ) and Nodejs as a backend, the point that I hired front end developers that made part of the project ( 35 % of the project ) using GetX as state Management,…
4
votes
3 answers

Passing Constructor value from view to controller in getx

So this is my view that has constructor in it. I want to pass this constructor value products to my controller i.e WishListIconController. This view is actually a widget called in many views in my current project so I pass value to it using…
Aabhash Rai
  • 147
  • 1
  • 9