Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
4
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

@najeira

Flutterで画像にRipple Effectをかける

以前の記事 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),
    ),
  ],
),
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
4
Help us understand the problem. What are the problem?