どうも、ちょげ(@chogetarou)です。
OutlinedButtonの枠線の太さを変える方法を紹介します。
方法

OutlinedButtonの枠線の太さを変えるには、まず、引数「style」に「OutlinedButton.styleFrom」を指定します。
次に、OutlinedButton.styleFromの引数「OutlinedButton.styleFrom」の引数「side」に「BorderSide」を指定します。
最後に、BorderSideクラスの引数「width」で、枠線の太さを設定します。
OutlinedButton(
style: OutlinedButton.styleFrom(
side: BorderSide(
width: 5 //枠線の太さ
),
),
onPressed: () {},
child: Text('Button'),
)

コメント