0

Why is flutter widgets so incompatible with each other?

Why can't have const TextField inside Row's children?

I'm using sliverboxadapter as parent to below widget.

Column(
      children: [
        const TextField( // IF I PUT HERE NO EXCEPTION
          textAlign: TextAlign.center,
          decoration: InputDecoration(
            border: OutlineInputBorder(),
            hintText: 'Enter answer',
          ),
        ),
        Row(
          children: [
          const TextField( // IF I PUT HERE ERRORS
          textAlign: TextAlign.center,
          decoration: InputDecoration(
            border: OutlineInputBorder(),
            hintText: 'Enter answer',
          ),
        ),
            ElevatedButton(
              onPressed: () {
              },
              child: const Text("Check"),
            ),
            ElevatedButton(
              onPressed: () {
              },
              child: const Text("Refresh"),
            ),
          ],
        ),
      ],
    );

0 Answers0