0
 Container(
            child: Row(
              children: [
                Container(child: TextField()),
                Container(child: TextField()),
              ],
            ),
          )

this code is not working on two Textfield in row.

Ravindra S. Patil
  • 11,757
  • 3
  • 13
  • 40

1 Answers1

0

Try below code and wrap your TextField inside Expanded Widget:

Container(
  margin: EdgeInsets.all(10),
  child: Row(
    mainAxisAlignment: MainAxisAlignment.spaceBetween,
    children: [
      Expanded(
        child: TextField(
          decoration: InputDecoration(
            border: OutlineInputBorder(),
          ),
        ),
      ),
      const SizedBox(
        width: 10,
      ),
      Expanded(
        child: TextField(
          decoration: InputDecoration(
            border: OutlineInputBorder(),
          ),
        ),
      ),
    ],
  ),
),

Result-> image

Ravindra S. Patil
  • 11,757
  • 3
  • 13
  • 40