9
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Flutterで画像にRipple Effectをかける

Posted at

以前の記事 Flutter 背景色ありで Ripple Effect を効かせる にも書きましたが、Ripple Effect の手前に不透明な Widget があると、その効果が見えません。

さて、不透明である画像を表示する Image クラスに対して Ripple Effect をかけるには、Stack を使って、Image の手前に透過な Material を置きます。

new Stack(
  children: <Widget>[
    new Image.network(imageUrl),
    new Material(
      type: MaterialType.transparency,
      child: new InkWell(onTap: onPressed),
    ),
  ],
),
9
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?