Questions tagged [flutter-getx]

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

1530 questions
4
votes
4 answers

Flutter GetX trigger function when state changes

How can I call a specific function in my stateless widget, whenever my GetX state changes? E.g. whenever the index of my bottomnavigationbar changes, how can I trigger an event? Obx( () => BottomNavigationBar( …
Martin Seubert
  • 978
  • 3
  • 21
  • 37
4
votes
1 answer

How to open a sidebar using GetX in Flutter

In Flutter I have seen the method Scaffold.of(context).openDrawer() to open sidebar. Currently I am using GetX in my project. Is there any alternative in Get to open Drawer? Thanks a lot for any help.
Yakhyo Mashrapov
  • 360
  • 2
  • 13
4
votes
1 answer

Best way to use GetxController in nested widget

In my Flutter app I use GetxController as a viewModel for every view: import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'track_activity_view_model.dart'; // Main widget of the view class TrackActivityView extends…
Bobo
  • 65
  • 1
  • 6
4
votes
1 answer

Flutter Getx BottomNavigation with GetPage

I'm using getx navigation with page binding - for example: GetPage( name: Routes.pageone, page: () => PageOne(), binding: PageOneBinding(), ), GetPage( name: Routes.pagetwo, page: () => PageTwo(), binding: PageTwoBinding(), ), GetPage( …
4
votes
1 answer

Why the Hero Widget doesn't work in Flutter?

I'm developping a Flutter app with the GetX state manager. I have 2 screens and I want a hero animation between them. Here is my hero widget, I use it in my 2 screens (exactly the same) : Widget heroTest() { timeDilation = 2; // This solution…
Aymeric Le Feyer
  • 245
  • 2
  • 12
4
votes
1 answer

Getx toNamed route not working, ROUTE REPLACE called automatically, controller delete

I'm just navigating to new page using named routes, as soon as toNamed trigged new screen flashed, then closed console shows 'onDelete called', REPLACE ROUTE with navigating one. main.dart class MyApp extends StatelessWidget { // This widget is…
techieasif
  • 153
  • 2
  • 9
4
votes
1 answer

What is "dirty" in Flutter & what is causing this "dirty" state?

I am trying to learn both state management & dependancy injection with this demo project. I'm trying to demo injecting some methods all over the place like I may need to in my program. I'm using GetX because I like being able to do this without…
RobbB
  • 1,214
  • 11
  • 39
4
votes
1 answer

Proper way to persist / store data in GetXController in flutter

I have this class and use "reactive" state management e.g. "".obs Now I plan to initialize my state from local storage (get_storage) onInit() problem: where do I persist my data? As soon as some state changes, I want to persist it as well. I tried…
Toskan
  • 13,911
  • 14
  • 95
  • 185
4
votes
2 answers

Flutter getx first null value

Hello there dear internet, and thank you for getx, I have a question regarding getx rx flow &/ getx initial. I am new to getx, but a veteran in rxjs, where you get a value only emitted on .next(value); My question is: how can - by all means [4] -…
4F2E4A2E
  • 1,964
  • 26
  • 28
4
votes
1 answer

Flutter getx infinite scroll refreshing listview every end scroll

I am trying to make infinite scroll in listview. I am fetching data from API. I am using getx. My listview always rebuild when scroll end. I could not find where i did mistake. This is what i try to make My model class; List
jancooth
  • 555
  • 1
  • 10
  • 25
4
votes
2 answers

How to get argument from url in flutter web using get: ^3.26.0

return GetMaterialApp( title: title, theme: appTheme, getPages: [ GetPage(name: '/', page: () => Splash()), GetPage(name: '/update', page: () => Update()), GetPage(name: '/login', page: () => SignIn()), …
4
votes
3 answers

how to update selected radio button in flutter using getx statemanagment

I am using Flutter with GetX plugin and I have two radio buttons inside statelessWidget but the radio button doesn't changed to selected when user click on it my question is how I can update screen to show selected radio the groupValue attribute…
Mokhtar Ghaleb
  • 423
  • 13
  • 26
4
votes
2 answers

How to manage Flutter web URL routes using the GetX package?

I am developing a Flutter app for iOS, Android, and Web. I decided to use the GetX package because it makes things much easier, but I am stumped on how to handle Web URL/address bar navigation. For example, one of my screens shows details about an…
Walker Sorlie
  • 53
  • 1
  • 1
  • 7
4
votes
0 answers

Update List in FutureBuilder using GetX in Flutter

I'm using the FutureBuilder with GetX and I want to update(add, Edit or remove) the below type of list. var cardListDetails = Future.value([]).obs; Thanks in advance
Alpit Panchal
  • 709
  • 1
  • 7
  • 25
3
votes
2 answers

Flutter GetX updating locale is resetting GoRouter navigation bug

I am using GoRouter for navigation and GetX for multiple things, including updating the app's locale. It is updating the language perfectly fine, but the problem is that somehow my navigation stack is getting reset after the call. I've made a…
Chris
  • 1,828
  • 6
  • 40
  • 108