How to add a send button inside TextField in Flutter

0 votes

Hi Guys,

I have created a TextField in Flutter App. I want to add one send button to this field. So that when I write something in the TextField, I can press the send button within the TextField. How can I do that?

Sep 10, 2020 in Others by akhtar
• 38,170 points
3,333 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use decoration inside your TextField. This has some parameters to control the TextField. In this field, you can add suffixIcon key to add the send button as shown below.

decoration: InputDecoration( 
suffixIcon: IconButton(
 icon: Icon(Icons.send),
 onPressed: (),
 ),
 )
answered Sep 10, 2020 by MD
• 95,180 points

Related Questions In Others

0 votes
1 answer

How to add Icon to the TextField in Flutter App?

Hi@akhtar, You can add any Icon to your ...READ MORE

answered Sep 3, 2020 in Others by MD
• 95,180 points
1,129 views
0 votes
1 answer

How to add a border in a Container in Flutter?

Hi@MD, By default, you can't see any border ...READ MORE

answered Sep 10, 2020 in Others by akhtar
• 38,170 points
1,386 views
0 votes
1 answer

How to add a Header Row to a ListView in Flutter?

Hi@akhtar, You can use ListView.builder method in your ...READ MORE

answered Sep 15, 2020 in Others by MD
• 95,180 points
1,767 views
0 votes
1 answer

How to add a Webview in Flutter?

Hi@akhtar, You need to use a plugin to ...READ MORE

answered Sep 15, 2020 in Others by MD
• 95,180 points
120 views
0 votes
1 answer

What is the future of flutter?

Hi@MD, Flutter is a rather new cross-platform framework ...READ MORE

answered Jul 17, 2020 in Others by akhtar
• 38,170 points
161 views
0 votes
1 answer

What is Flutter?

Hi@akhtar, Flutter is an app SDK for building ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,180 points
252 views
0 votes
1 answer

How to install Flutter in Windows system?

Hi@akhtar, You can follow the below-given steps to ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,180 points
430 views
0 votes
1 answer

How to add a border to a widget in Flutter?

Hi@akhtar, You need to add the TextField as a child to a Container that has ...READ MORE

answered Jul 24, 2020 in Others by MD
• 95,180 points
740 views
0 votes
2 answers

How to create a floating button in Flutter?

Scaffold widget provides floatingActionButton property. You can ...READ MORE

answered Nov 9, 2020 in Others by Vijay
• 200 points
2,090 views