どうも、ちょげ(@chogetarou)です。
OutlinedButtonのサイズを変える方法を紹介します。
方法

OutlinedButton.styleFromの引数「fixedSize」もしくは「minimumSize」を使うことで、サイズを設定することが出来ます。
fixedSize
child: OutlinedButton(
onPressed: () {},
child: Text('Button'),
style: OutlinedButton.styleFrom(
fixedSize: Size(200, 50), //(横、高さ)
),
),

minimumSize
child: OutlinedButton(
onPressed: () {},
child: Text('Button'),
style: OutlinedButton.styleFrom(
minimumSize: Size(300, 50) //サイズ
),
)
コメント