What I am doing wrong?
import 'package:get/get.dart';
import 'package:flutter/foundation.dart';
class TextControllers extends GetxController {
Rx<TextEditingController> userInputController = TextEditingController().obs;
}
- Error: Type ‘TextEditingController’ not found.
Rx<TextEditingController> userInputController = TextEditingController().obs;
I am using:
dependencies:
get: ^4.6.5
2
Answers
I think you want to change the text asap text controller has new text.
for that, you should make an obs
String
.then in the
onChanged
property, assign theTextField
value to it, like this:maybe you can use this way: