getx

Flutter Getx - “Xxx” not found. You need to call “Get.put(Xxx())” - But i have called Get.put(Xxx())

醉酒当歌 提交于 2021-02-11 14:16:48
问题 I have this global bindings class to initialise some services and I need it to be initialised straight away: import 'package:get/get.dart'; import 'package:vepo/data/data_provider/local_data_provider.dart'; import 'package:vepo/data/data_source/local_data_source.dart'; import 'services/authentication_service.dart'; class GlobalBindings extends Bindings { final LocalDataProvider _localDataProvider = LocalDataProvider(); @override void dependencies() { Get.put<AuthenticationService>

How to Change Screen Using Flutter Getx

我的未来我决定 提交于 2021-01-29 09:15:28
问题 i Got Questions here. How to change screen using FLutter Getx. I got GetxControll that searchUser from firestore. Here's the code. class AuthenticationC extends GetxController { final usersRef = FirebaseFirestore.instance.collection('Users'); List<QueryDocumentSnapshot> searchResultFuture; searchUser(String query) async { QuerySnapshot snapshot = await usersRef .where('DisplayName', isGreaterThanOrEqualTo: query) .get(); searchResultFuture = snapshot.docs; return snapshot.docs; } } then i

flutter passing multiple data with getx

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-27 06:35:46
问题 I want to Pass multiple data from one screen to another screen with Get package. Get.to(Second(), arguments: ["First data", "Second data"]); 回答1: Step: 1 : Sending data Get.to(Second(), arguments: ["First data", "Second data"]); Step: 2 : Get data From first screen var data = Get.arguments; 回答2: I found this solution. First screen Get.to(Second(), arguments: ["First data", "Second data"]); Second screen Declare variable (list) var one = Get.arguments; Set data Column( mainAxisAlignment: