Questions tagged [textformfield]

248 questions
13
votes
3 answers

How to set background color for TextFormField Widget in Flutter?

This is the following code where I tried setting TextFormField Widget Color. I tried changing the color of the Container Widget and the Card Widget, but I couldn't alter the color of the TextFormField Widget in particular. child: Container( …
Kavya S
  • 511
  • 1
  • 5
  • 9
7
votes
2 answers

Flutter - TextFormField - Unable to simultaneously satisfy constraints (NSAutoresizingMaskLayoutConstraint)

With Flutter Channel stable, 2.0.1, on iPad phyisical device iOS 14.4 I have the following console message everytime I tap onto any TextFormField. [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the…
L.Keysoft
  • 308
  • 1
  • 10
7
votes
4 answers

Flutter & Textfield : How do I restrict my user from using space in textfield by automatically removing that space?

How do I restrict my user from using space in textfield by automatically removing that space when the user finish typing? For example, if the user type King of Light, it will apply as KingofLight after he/she steps away from the…
Punreach Rany
  • 2,560
  • 7
  • 23
  • 56
6
votes
4 answers

Change the cursor position from top to bottom in a Flutter textfield

I need to change the position of the cursor inside the textformfield. I managed to reduce the height of the cursor with 1, but the position of the cursor remains top. I was not be able to move it to the bottom. I wanted to achieve this: But what I…
Minato
  • 302
  • 3
  • 15
6
votes
0 answers

I can't edit always getting this info in flutter I/TextInputPlugin( 8390): Composing region changed by the framework. Restarting the input method

2 I/TextInputPlugin( 8390): Composing region changed by the framework. Restarting the input method. This happens when I click submit on my textformfield or my button. I have restarted my IDE, still shows the same message. I can't submit my…
Isaac Eze
  • 61
  • 2
6
votes
4 answers

remove the first zeros of phone input TextFormField of type numbers flutter

how can i remove the first zeros of phone number like 00963 and 031 and so on in flutter inside TextFormField ? here is my code of theTextFormField : TextFormField( keyboardType: TextInputType.phone, onSaved: (input)…
Mohammed Ali
  • 1,117
  • 1
  • 16
  • 31
5
votes
2 answers

How to pass a function as a validator in a TextFormField?

I'm wondering if I can pass a function as a validator. I tried, but got no results. Widget Field(String changedValue, String label, bool isTextObscured) { return TextFormField( decoration: InputDecoration(labelText: label), …
gabhar
  • 187
  • 1
  • 4
  • 14
4
votes
2 answers

How to remove space between prefixIcon and texformfield text?

How to remove space after prefix icon in TextFormField in flutter? I've already tried isCollapsed = true, isDense = true. And I have set my contentPadding: EdgeInsets.all(0). Using prefix instead of prefixIcon however solves my issue, but there is…
4
votes
2 answers

How to set dropdown selected item into TextFormField in Flutter

I created dropdown in TextFormField in flutter, i successfully loaded list (bankDataList) into dropdown which is dynamic list. Data is showing into dropdown list. But i have a problem to assign "value : _bankChoose" into DropDownButton , it is not…
Rakesh Saini
  • 660
  • 2
  • 7
  • 20
4
votes
3 answers

How to reduce padding between label text and bottom line in TextformField in Flutter?

This is what I have: This is what I want: I want to remove the space between label text and bottom line, how to do that?
Abhishek Kumar
  • 191
  • 1
  • 11
4
votes
4 answers

flutter TextFormField validation display alignment error

I have a TextFormField with validation on Empty. In order to control height, TextFormField was nested inside Container widget. Which cause unexpected side effect of displaying error message overlap as attached pictures. to test sample code, press…
Ko Lynn
  • 134
  • 4
  • 8
3
votes
1 answer

TextFormField with mask text input formatter clear the content while changing the value

Im building a form with several fields and Im initializing their values with controllers. Some fields are pure text fields but others have a mask, like a phone and zipcode fields. Once I put the field on focus and start to backspace to erase the…
3
votes
1 answer

Flutter Getx isn't updating initialValue of TextFormField

If i use the same variable in a Text Widget it works but not on TextFormField.
3
votes
1 answer

Flutter TextFormField Cursor Reset To First position of letter after onChanged

I need some help regarding flutter textformfield This is my code for the textfield controller. The problem is when I type new word,the cursor position is moved automatically from right to left (reset)(before first letter inside box). How I can make…
Flt
  • 91
  • 7
3
votes
0 answers

Flutter TextFormField reloads current screen when focused in comment box

I am facing some issue when I click on the comment box the keyboard appear and then quickly disappear and reload the complete page here is the complete code. StreamBuilder( stream: reviewStream, builder:…
1
2 3
16 17