Questions tagged [flutter-textformfield]

183 questions
24
votes
9 answers

How to capitialize first letter of TextFormField in flutter

I'm trying to capitialize the first letter of Textformfield, for this i'm using the textCapitalization: TextCapitalization.words, but it's not working for Textformfield, and works for textfield please help how to do this.
TimeToCode
  • 1,458
  • 3
  • 18
  • 60
21
votes
1 answer

How can I catch event when a text field is exiting focus (on blur) in Flutter?

I look into TextFormField, the fields here isn't what I need: onChanged (called after each key pressed, I need when the user has already complete and exit the TextFormField focus) onEditingComplete (called after user press on Done key or similar,…
Chen Li Yong
  • 5,459
  • 8
  • 58
  • 124
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

Space Button on textfields , not working Flutter Web

We have a web project in flutter and sometimes space button is not working in text form fields. After refreshing the page, or after a request to server it works again. This situation is causing unstable environment for our users and thus a lot of…
Aurora
  • 422
  • 1
  • 7
  • 21
5
votes
1 answer

How can I make my textfield be the same size as the send button

I have the following text field import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { …
anonymous-dev
  • 2,897
  • 9
  • 48
  • 112
5
votes
6 answers

How to add search icon to TextField in Flutter?

Is it possible to display hint in the TextField as in the image below?
4
votes
3 answers

Flutter: How to hide suffix icon when there is no input on textformfield?

I have a TextFormField and i want its suffix icon auto hidden when the textfield is empty. Here is my code child: TextFormField( decoration: InputDecoration( contentPadding: const…
4
votes
3 answers

How to validate textfield when posting to firestore in flutter?

I have added validator in TextField but validator is not working while submitting data. Save button saves the data with null value. import 'package:cloud_firestore/cloud_firestore.dart'; import '../../screens/orders/order_success.dart'; import…
Tushar Rai
  • 2,371
  • 4
  • 28
  • 57
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

Calling Function after clicking outside a specific TextField Flutter

I have a form page and there are several TextFields and I want to call a function after clicking outside of one specific textfield. Is there any parameter of TextField that can serve my purpose or any way to do that?
Fahmida
  • 1,050
  • 8
  • 19
4
votes
1 answer

Widget testing TextFormField obscureText value

I cannot seem to find a way to widget test whether a TextFormField has obscureText set true or false. I know that TextFormField is a wrapper around TextField, and obscureText is a property of TextField, but cannot think of a way to access…
Luke
  • 1,149
  • 1
  • 7
  • 15
4
votes
3 answers

Flutter: how to create a rounded textformfield and change its background color

i created a rounded textformfield and validate it, textbox are look like this here is the code for this textbox firstly i create a container import 'package:flutter/material.dart'; class TextFieldContainer extends StatelessWidget { final Widget…
TimeToCode
  • 1,458
  • 3
  • 18
  • 60
3
votes
1 answer

How to validate TextFormFields, that are at different pages inside a PageView

So lets say I have 3 Pages : [StartingPage, NamePage, AdressPage] inside a PageView. Each of those children has a TextFormField inside it. When I am at StartingPage I want to call .validate() on the keys of the TextFormFields on NamePage and…
Christian
  • 834
  • 7
  • 18
2
votes
1 answer

How to save email and password in the iCloud Keychain in Flutter for iOS and also using auto fill?

I basically have a login page where the user can create an account, and a sign in page. I want to save the user email and password in the Keychain like sooo many apps, but I'm still not able to get this prompt : With this Flutter code :…
nicover
  • 2,213
  • 10
  • 24
2
votes
1 answer

How to insert letters in between the textfield's text in flutter

How do I insert letters in between a TextField's text in flutter? Example Text in the text field: I run faster than him. Expected Result I want to move the curser before the run and type can . TextField( controller: _controller, onChanged:…
Rosh
  • 29
  • 4
1
2 3
12 13