Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter : How to Fix SuffixIcon at the bottom of the Multiline Enable TextField?

How to Fix SuffixIcon at the bottom of the Multiline Enable TextField like WhatsApp ?

Here's the Current Scenario :

enter image description here

Here's what I want to achieve :

enter image description here

How can I achieve this ?

Here's the code for the Textfield:

Container(
        width: 350,
        padding: EdgeInsets.symmetric(horizontal: 15),
        decoration: BoxDecoration(
            color: Color(0xffEDEDED),
            borderRadius: BorderRadius.circular(20)),
        child: TextFormField(
          keyboardType: TextInputType.multiline,
          maxLines: null,
          decoration: InputDecoration(
              border: InputBorder.none,
              hintText: 'Type here...',
              hintStyle: TextStyle(color: Color(0xff606060), fontSize: 12),
              suffixIcon: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                mainAxisSize: MainAxisSize.min,
                children: [
                  IconButton(
                      icon: Icon(Icons.camera_alt), onPressed: () {}),
                  IconButton(
                      icon: Icon(Icons.send), onPressed: sendMessage),
                ],
              )),
        ),
      )
like image 672
Kishan Somaiya Avatar asked Oct 29 '25 03:10

Kishan Somaiya


1 Answers

Let me know this works.

Container(
              width: 350,
              padding: EdgeInsets.symmetric(horizontal: 15),
              decoration: BoxDecoration(
                  color: Color(0xffEDEDED),
                  borderRadius: BorderRadius.circular(20)),
              child: TextFormField(
                keyboardType: TextInputType.multiline,
                maxLines: null,
                decoration: InputDecoration(
                    border: InputBorder.none,
                    hintText: 'Type here...',
                    hintStyle: TextStyle(color: Color(0xff606060), fontSize: 12),
                    suffixIcon: Column(
                      mainAxisSize: MainAxisSize.max,
                      mainAxisAlignment: MainAxisAlignment.end,
                      children: [
                        Row(
                          crossAxisAlignment: CrossAxisAlignment.end,
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          mainAxisSize: MainAxisSize.min,
                          children: [
                            IconButton(
                                icon: Icon(Icons.camera_alt), onPressed: () {}),
                            IconButton(icon: Icon(Icons.send), onPressed: () {}),
                          ],
                        ),
                      ],
                    )),
              ),
            ),
like image 162
imgkl Avatar answered Oct 30 '25 17:10

imgkl