どうも、ちょげ(@chogetarou)です。
OutlinedButtonにパディングを設定する方法を紹介します。
方法

OutlinedButtonにパディングを設定するには、「OutlinedButton.styleFrom」を使います。
まず、「OutlinedButton.styledFrom」を、OutlinedButtonの引数「style」に指定します。
そして、「OutlinedButton.styleFrom」の引数「padding」で、パディングを設定します。
child: OutlinedButton(
onPressed: () {},
child: Text('Button'),
style: OutlinedButton.styleFrom(
padding: EdgeInsets.all(20),
),
),

まとめ
OutlinedButton.styleFromを、「OutlinedButton」の引数「style」指定します。
そして、OutlinedButton.styleFromの引数「padding」で、パディングの設定をします。
コメント