Questions tagged [flutter-getx]

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

1530 questions
2
votes
1 answer

FirebaseMessaging.instance.getInitialMessage() not working with Splash Screen

I have integrated Firebase Cloud Messaging to my Flutter mobile app with the help of GetX State Management. Also I used Laravel with Firebase Admin SDK to send notification to my app. The notification is working fine on both foreground state and…
Richmond
  • 423
  • 4
  • 20
2
votes
0 answers

Multiple animation behaviors on same widget - Flutter Getx Simple Animations

I am trying to build a list view with cards with different animation behaviors depending on user interactions like hovering. The hovered card needs to be scaled up and the remaining cards in the list need to be scaled down and made less…
2
votes
1 answer

Binding without using "Get.to()" for GetX in Flutter

I want to bind a controller to view 1 but I don't want to go to that view 1 via using Get.to(Page());. Instead I want to use view 1 directly inside view 2 by creating an object. Simplified code (BTW I'm using Veiw1Controller variables inside View1…
Yaya
  • 4,402
  • 4
  • 19
  • 43
2
votes
2 answers

Flutter GetX Navigation: 1 positional argument(s) expected, but 0 found

I am very new to Dart, and coding in general. I have produced this code after watching tutorials on YouTube. For the most part, I have been able to troubleshoot most of my problems on my own, yet I cannot figure out my most recent errors. The error…
sandeep rana
  • 121
  • 11
2
votes
4 answers

Flutter Getx: Can obs create a global variable?

How to make obs a global variable? Have an option of Getx that can create a global variable? For the example: class Test extends GetxController { RxString a = "".obs; } Page 1: Test test = Get.put(Test()); print(test.a.value); //"" test.a.value…
2
votes
0 answers

Flutter GetX : ScrollController attached to multiple scroll views Failed assertion: line 109 pos 12: '_positions.length == 1'

i'm using getX for state management, so i have 2 page, first page is listView for show post, and second page is for create new post, after create new post will back to first page, however after making a new post an error always…
adian
  • 128
  • 1
  • 14
2
votes
2 answers

How to attend best practice for not using UI code in the Controller with GetX flutter when I need to show a Dialog if my task complete.?

For a simple Email login with OTP code I have a structure as follows. View await _signUpCntrl.signUp(email, password); Controller _showOtpDialog(email); _showOtpDialog func return Get.dialog( AlertDialog( So the thing is…
2
votes
1 answer

Is it possible to use "formKey.currentState" inside a stateless widget with GetX?

I am trying to convert a code that uses provider package and stateful widget to use GetX package and stateless widget. One problem I do have is that I have a form that changes(from login to signup and vice versa) using animation, but when I check…
Hasani
  • 3,543
  • 14
  • 65
  • 125
2
votes
1 answer

What is the alternative for "initState()` while we using "GetX" and "statelessWidget"?

I have the following code that is inside a statefullWidget, and I want to change the statefullWidget to a statelessWidget and use GetXCintroller instead. AnimationController? _controller; Animation? _slideAnimation; Animation?…
Hasani
  • 3,543
  • 14
  • 65
  • 125
2
votes
0 answers

I have trouble using obx in flutter web

I am making a web page and I have a RxList. I wrap the widget using the list in an obx but whenever I navigate to the page containing the widget it does not show the page at all from the very beginning (even before changing the list) and it freezes.…
2
votes
1 answer

Flutter-Getx : How do I update New Date Selected in Getx dialog box?

This is the screenshot of dialog box where i want to update new date after picked up. This is what i tried in controller.dart. class AppointmentController extends GetxController { String t; var selectedDate = DateTime.now().obs; var selectedTime =…
2
votes
2 answers

How to achive this random width grid view in flutter

These texts will come from rest API. I need to show these in a bottom sheet. But I am not supposed to keep the width fix. Instead, the container's width will depend on text's length. How to make this in flutter? GridView.builder( …
Rafid Khan
  • 76
  • 5
2
votes
1 answer

GetMidleware not working on bottomNavigationBar - flutter - GetX

i have problem with GetMidleware, so i have 3 item in bottomNavigationBar: Home MyTicket Profile i want user can acces home without login so i put midleware just on myTicket and Profile, but when i click MyTicket or Profile i still can access that…
adian
  • 128
  • 1
  • 14
2
votes
0 answers

Navigation - how to add two routes at once?

When a user presses a "new message from Y" notification, I want to go into the chat page, but when the user goes back to the previous page, it should be the conversations page. I've tried something…
yoni keren
  • 300
  • 2
  • 14
2
votes
3 answers

How to navigate to desired screen when FCM Background Message received?

I am having a hard time navigating to a screen when a background FCM message receives. Currently, I am sending an FCM message with some data and when it gets received by a device then it calls this package that shows a calling notification, and when…
Siddharth Mehra
  • 1,691
  • 1
  • 9
  • 32