Issue 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 = DataModel().obs; updateAuthor(){ dataModel.value.book!.author = ""; } } While updating
Continue readingTag: flutter-getx
Binding without using "Get.to()" for GetX in Flutter
Issue 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
Continue readingFlutter GetX Snackbar Actions
Issue I was wondering how to implement GetX’s Snackbar but with actions. I know how to write SnackbarActions on the usual ScaffoldSnackbar provided with Flutter. I was wondering if there was a way to get this same functionality in GetX’s
Continue readingGetx not updating list of TextFormField correctly
Issue I am using Getx and ListView.builder in a Flutter Web app to render a list of items with TextFormField. Each rendered item has a delete button. When I click to delete an item, the list containing the data seems
Continue readingMultiple Instance with GetX tag not working in flutter
Issue 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 State<MyHomePage> createState() =>
Continue readingTextButton in different file not recognized as TextButton
Issue I am using GetX in a Flutter project. Using a function like Get.snackbar() will allow me to show a SnackBar, in which I want to inlcude a button using mainButton. This button has to be of type TextButton. Because
Continue readingFlutter Serializing objects types problem
Issue I’m using the json_serializable: ^6.3.1 pub package to auto generate toJson() & FromJson() and i’m having this class import ‘package:json_annotation/json_annotation.dart’; part ‘maintenance_super_request.g.dart’; @JsonSerializable() class MaintenanceSuperRequest extends DetailedRequest { // String? sp_key; final List<String> services; final Unit unit; double? totalCost;
Continue readinghow to manage the state correctly using getbuilder
Issue i am facing a problem on managing the state using GetBuilder i am creating an app looks like twitter you can publish a post and like a post …etc enter image description here i have this Row Contains favorite
Continue readingwhat is Get.create() in the Getx package and what it does
Issue reading the Getx package documentation, I faced this method: Get.create<ShoppingController>(() => ShoppingController()); and it says: Get.create(()=>Controller()) will generate a new Controller each time you call Get.find(), but, I don’t seem to understand what this means and how it differs
Continue readingtype 'Rx<DateTime>' is not a subtype of type 'DateTime' in type cast
Issue I called the showDatePicker function to be used on the registration screen. Since I wrote with getx, I used obs for instant display of the selected value, but I encountered the error as below. "type ‘Rx’ is not a
Continue reading