Questions tagged [texteditingcontroller]
88 questions
1
vote
2 answers
FocusNode does not auto scroll to TextFormField when item already selected - flutter
Scenario: this is a big form, the user selects the TextFormField and then manually scrolls down to the save button. if the _formKey.currentState.validate() detects validation issues we can to get the focus back the the TextFormField with…

emalware
- 73
- 1
- 9
0
votes
0 answers
Updating TextEditingController inside form generates "setState() or markNeedsBuild() called during build" exception
I've made a simple widget wrapper around TextFormField to avoid using TextEditingController everywhere and simplify working with text fields. Basically, it's bidirectional binding between model and view (changing model rebuilds widget, and changing…

ChessMax
- 2,125
- 1
- 16
- 16
0
votes
1 answer
The operator '[]' isn't defined for the type 'TextEditingController'
for(i= 0; i< 6 ; i++)
Pinput(length: 6,controller: model.otpController[i],
focusNode:focusNode,
androidSmsAutofillMethod:AndroidSmsAutofillMethod.smsUserConsentApi,
listenForMultipleSmsOnAndroid: true,
defaultPinTheme:…

sudhan
- 11
- 2
0
votes
1 answer
In TextEditingController field how to fixed label text in top in flutter
I want to fixed my label text in the top of the TextEditingController field. normality when we write something/ focus on the field then the label text go into the top. But i want to fixed label text in the top. And after focus whole background will…

Papon sarker
- 11
- 2
0
votes
2 answers
Getting error on TextFieldEditingController
I want to add textfield that has its own unique index. So I declared a list of TextFieldEditingController and call it in the Wrap(). controllers.add(TextEditingController()),. But I am getting this error while calling it. I am getting this error…

wuuyungwuu
- 83
- 13
0
votes
1 answer
Flutter TextFormfield Controller get value
This is Textformfield. It receives the value and then displays the information through it. TextEditContoller
This is page 1
Widget lngTextFormField(String label, String keyword, String text) {
TextEditingController lngtextController =…

Ppnncs
- 61
- 4
0
votes
1 answer
Exception has occurred. _CastError (type 'TextEditingController' is not a subtype of type 'String' in type cast)
Help me Error Exception has occurred
class AddProduct extends StatelessWidget {
final _formKey = GlobalKey();
final TextEditingController _nameController = TextEditingController();
final TextEditingController _descriptionController…

Ali Mustadji
- 17
- 4
0
votes
1 answer
I can't retrieve the data from sharedprefrence string list
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;
…

Mohammad Yazbeck
- 15
- 5
0
votes
1 answer
TextField (in flutter) getting filled with previously filled values (unintentionally)
On click of floatingActionButton in main.dart file, I'm calling a dialog widget.
main.dart
late ShoppingListDialog dialog;
@override
void initState() {
dialog = ShoppingListDialog();
super.initState();
}
floatingActionButton:…

Gaurav Singh
- 3
- 2
0
votes
2 answers
Using the variable in TextEditingController in another dart file
I am trying to use the variable name _firstNameCtrlr in another page or rather class file.
File1.dart
final _firstNameCtrlr = TextEditingController();
File2.dart
class TxtFrmFldCtrlr{
static void clearField(){
_firstNameCtrlr.clear();
…

flutternewbiee
- 73
- 7
0
votes
0 answers
Flutter: viewmodel keeps being rebuilt and refreshing TextEditingControllers
I'm having an issue:
The CreatePostWidget is accepting a model object called Post.
If it receives an empty Post you're creating a new one.
If it receives a post it means you're editing one.
The post has been passed from the widget to the viewmodel…

Salvatore La Fiura
- 75
- 9
0
votes
1 answer
TextEditingController.text isEmpty
I have a problem. I'm working on an application with Flutter 3 and I have to know if my TextField is returning the user entries.
I have on one side this function to test signIn with the predefined user.
Prints are here to verify the users…

Lucas
- 26
- 3
0
votes
2 answers
Changing lowercase into upper case in real time in Flutter web
Basically, I am trying to get it so that when the user types in a lowercase letter, let's say "a", the screen will output an uppercase "A" instead. This is in flutter web using a keyboard. Any ideas?

Zzz
- 229
- 1
- 12
0
votes
0 answers
Flutter text editing in child widget with validation in parent widget
I'm trying to setup a Flutter parent/child widget configuration to allow for multiple textControllers on the child widget and the parent widget to control the saving of the form answer and some validation.
I need to be able to have multiple answer…

MaylorTaylor
- 4,671
- 16
- 47
- 76
0
votes
1 answer
replace 0.00 of user input and move one step backward in flutter
sample layout input of textfield with initial value 0.00
In flutter when user input digit number, i want it to be like always replacing last digit of number and move one step backward
Example: default value is 0.00 with fixed 2 decimals…

gan jinqu
- 21
- 2