1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] How can i put button inside Textformfield?

Discussão em 'Mobile' iniciado por Stack, Setembro 28, 2024 às 05:22.

  1. Stack

    Stack Membro Participativo

    I'm trying to create a Textformfield that has button inside it. Please check the screenshot.

    [​IMG]

    Here is what I have done

    TextField(
    decoration: InputDecoration(
    prefixIcon: Icon(Icons.search),
    hintText: "Search",
    border: OutlineInputBorder(
    borderRadius: BorderRadius.circular(2.w),
    borderSide: BorderSide(
    width: 0,
    style: BorderStyle.none,
    ),
    ),
    suffixIcon: ElevatedButton(
    child: Text("Search"),
    onPressed: () {},
    ),
    ),
    ),


    But here it is the result from my script

    [​IMG]

    The button is overlapping the Textformfield, how can I fix it ?

    Continue reading...

Compartilhe esta Página