Issue I have a stateless custom widget whose value needs to be changed according to the selection. I tried to wrap my custom object with OBX() I am receiving an error… [Get] the improper use of a GetX has been
Continue readingTag: flutter-getx
Sending types as parameters in widgets – Flutter
Issue 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;
Continue readingDiff between get.put and get.lazyput
Issue I am new to Getx‘s dependency injection, so can some one explain to me the benefits of Get.put() and Get.lazyPut() and tell me also what difference they have? Solution Short answer Get.put() will put immediately Get.lazyPut() will put when
Continue readingGetx onInit not calling
Issue Any reason why app keep stuck on splash screen? I using getx state management. If authToken not empty, it should go to main page. But onInit in controller class not calling. void main() { runApp(const MyApp()); } class MyApp
Continue readingFlutter – How to use mounted in GetX
Issue I initiate network request in GetXController, after network call back, I should judge this controller/this page is dealloc or not. If this page is not dealloced, update Page. If this page is dealloced, I do noting. As I know,
Continue readingFlutter GetX call fetch data only once in the build methode
Issue I have a method called getData() which used to load data from API, and i am displaying data in a separate screen, I have one issue which whenever I navigate to this page it rebuild the whole screen and
Continue readingERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'String' is not a subtype of type 'Map<String, dynamic>
Issue This is my code class PopularProductController extends GetxController { final PopularProductsRepo popularProductsRepo; PopularProductController({required this.popularProductsRepo}); List<dynamic> _popularProductList = []; List <dynamic> get popularProductList => _popularProductList; Future<void> getPopularProductList()async { Response response = await popularProductsRepo.getPopularProductList(); if(response.statusCode==200) { print("get products"); _popularProductList =[]; _popularProductList.addAll(Product.fromJson(response.body).products);//
Continue readingHow can make checkbox select and multiple selection with Getx
Issue my code is without button that make select all View class GetBuilder<ProductController>( builder: (controller) { return Container( height: 50, child: Transform.scale( scale: 1.2, child: Checkbox( activeColor: MyThemes.yellow, shape:RoundedRectangleBorder( borderRadius: BorderRadius.circular(5) ), splashRadius: 18.8, value: controller.items[index]["check"], onChanged:((value) { controller.CheckBrand(index, value);
Continue readingI have problem with using condition to display an image
Issue I am using image picker to get image from user then displayed in "CreateCard" UI. The issue occur when i try using condition in my UI file, i need the condition so i can check if the file image
Continue readingI can't retrieve the data from sharedprefrence string list
Issue I am trying to find a way to retrieve data from sharedPrefrence StringList.. I have these TextEditingControllers in my Controller: late TextEditingController displayname; late TextEditingController jobtitle; late TextEditingController about; late TextEditingController email; late TextEditingController address; late List<String> info; MyServices
Continue reading