gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
TextFormField flutter. how to show suffix and prefix whatever they are ALWAYS. thx
- User
TextFormField flutter. how to show suffix and prefix whatever they are ALWAYS. thx
- Assistant
To show prefix and suffix always in a TextFormField widget in Flutter, you can use the prefix and suffix property of the widget.
Here is an example of how to do it:
TextFormField( decoration: InputDecoration( labelText: 'Username', prefixIcon: Icon(Icons.person), suffix: Text('@gmail.com'), ), ),In this example, the prefixIcon property is used to show the person icon as a prefix, and the suffix property is used to show the '@gmail.com' as a suffix. These elements will always be visible in the TextFormField widget.
You can replace the prefix icon and suffix text with whatever you want to display as a prefix or suffix.