Questions tagged [flutter-getx]

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

1530 questions
2
votes
1 answer

ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'String' is not a subtype of type 'Map

This is my code class PopularProductController extends GetxController { final PopularProductsRepo popularProductsRepo; PopularProductController({required this.popularProductsRepo}); List _popularProductList = []; List
Iman Alabid
  • 31
  • 1
  • 4
2
votes
1 answer

Multiple Instance with GetX tag not working in flutter

Ive been working on a multiple instance project. so i tried doing this in the counter app. but only first instance is updating. below is my all code. class MyHomePage extends StatefulWidget { const MyHomePage({super.key}); @override …
2
votes
1 answer

Getx Flutter while updating value throwing null error

Data Model class DataModel { Book? book; DataModel({ this.book, }); } class Book { String author; Book({ required this.author, }); } Getx Controller class BookController extends GetxController{ var dataModel =…
Ajit Singh
  • 43
  • 1
  • 1
  • 4
2
votes
2 answers

Get.context in Flutter using GetX not working in release apk

I'm getting height and width of the screen size using Get.context!.height and Get.context!.width. This works perfect in Debug mode. But in the release APK, it's not working at all due to which all the elements based on these are disappearing. I also…
2
votes
3 answers

Sending types as parameters in widgets - Flutter

I'm trying to separate a widget that contains GetBuilder. I want to send type as parameter to the widget but unfortunately unable to achieve it till now. What I'm trying to do: class Widget extends StatelessWidget { final type; // A class type…
Muhammad Talha
  • 165
  • 1
  • 8
2
votes
2 answers

How to use Flutter same Page navigation with Getx route or material route?

(For example, I have a Detailpage with Similar products have the same Detailpage info(Nested navigation to same ).. how do we navigate to that page in Getx navigation or material route......and when the back button click we navigate to previous…
2
votes
1 answer

how to make Localization with Getx if there is parameter in the text

if the text like this: Text( 'Put something ${widget.profileA} might like'.tr, ), Here is the code for the translation example: class Language extends Translations { @override Map
matti peter
  • 150
  • 10
2
votes
1 answer

Understanding how Getx state update with specific id work with SetState((){})

while discovering Getx source code, I faced a piece of code that make me confused, it's not related 100% to Getx. it's about SetState(() {}) so, in the Getx there is a state update that targets only the widgets with a specific id: Disposer…
Gwhyyy
  • 7,554
  • 3
  • 8
  • 35
2
votes
2 answers

SingleChildScrollView + Controller - Page resets to top when resizing window

I am creating a flutter Web application, but have issues when resizing the window with a SingleChildScrollView + ScrollController. When I resize the browser window, the page "snaps" back up to the very top. Being a web app, most of the page…
FoxDonut
  • 252
  • 2
  • 14
2
votes
0 answers

Failed to load dynamic library 'libiris_event_handler.so': dlopen failed: library "libiris_event_handler.so" not found in Agora.io's newest SDK(6.0.0)

So, I just updated my Flutter App to run in the SDK 6.0.0, but for some reason, whenever I start the app in the emulator, I get this error message: E/flutter (15665): [ERROR:flutter/runtime/dart_isolate.cc(1111)] Unhandled exception: E/flutter…
2
votes
2 answers

Dart GetX Unexpected Null Value when refreshed

I redirected my Home View page to another view. class HomeView extends GetView { const HomeView({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return CustomScaffold( body: Column( …
CigarDon
  • 79
  • 1
  • 4
  • 14
2
votes
3 answers

GetX Unbind Stream

I am using the bindStream() function with the GetX package inside a controller. class FrediUserController extends GetxController { @override void onReady() { super.onReady(); final userController = Get.find(); …
Tomas Ward
  • 854
  • 6
  • 23
2
votes
1 answer

The following StackOverflowError was thrown building Obx(has builder, dirty, state: _ObxState#896e1): Stack Overflow

I'm using Getx package in my Flutter project, but some thing went wrong!!! In class controller I made a stream connection with firestore to fetch data and put them in a List.. In the ui class That I want to show data in, I can call the data in…
2
votes
1 answer

Flutter toggle button using Getx for state management

I'm making a toggle button to switch between the unit system, I need to do it using Getx for state management. This code works, but its using setState() instead This is the (simplified) code: import 'package:flutter/material.dart'; import…
Gryva
  • 297
  • 1
  • 11
2
votes
1 answer

I cannot show hint text in DropdownButtonFormField using Getx in flutter

I want to show a hint text in DropdownButtonFormField. However, when I add a hint text into InputDecoration, it doesn't get displayed since Getx enforces an initial value. Is there any way I can show a hint text instead of the initial value using…
Alp Karky
  • 21
  • 4