どうも、ちょげ(@chogetarou)です。
OutlinedButtonにリップルエフェクトを追加する方法を紹介します。
方法

OutlinedButtonにリップルエフェクトを追加するには、まず引数「style」に「OutlinedButton.styleFrom」を指定します。
そして、指定した「OutlinedButton.styleFrom」の引数「splashFactory」に「InkRipple.splashFactory」を設定します。
OutlinedButton(
style: OutlinedButton.styleFrom(
splashFactory: InkRipple.splashFactory,
),
onPressed: () {},
child: Text('Button'),
)
コメント