Ad

The Size Of The Button Has Risen On The Screen

- 1 answer

enter image description here

I tried all the button types of flutter, but the horizontal size does not change in all of them.

Ad

Answer

Try this style: ElevatedButton.styleFrom(fixedSize: Size([width], [height])), Example:

ElevatedButton(
          onPressed: () {},
          child: const Text('240 x 80'),
          style: ElevatedButton.styleFrom(
              fixedSize: const Size(240, 80), primary: Colors.deepOrange),
        ),
Ad
source: stackoverflow.com
Ad