どうも、ちょげ(@chogetarou)です。
InkWellのタップによるエフェクトを無効にする方法を紹介します。
方法

InkWellのタップによるエフェクトを無効にするには、引数「splashColor」と引数「highlightColor」に「Colors.transparent」を指定します。
InkWell(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () {},
child: Container(
height: 50,
width: 250,
),
),
引数「splashColor」はリップルエフェクトの色、「hightlightColor」はタップしている時の色を指定する引数です。
これらの引数に透明色である「Colors.transparent」を指定することで、タップエフェクトを無効にすることが出来ます。
コメント