Making an Image widget disabled / grayed out

Set the widget as the child of a container, and add foregroundDecoration like this:

Container(
  foregroundDecoration: BoxDecoration(
    color: Colors.grey,
    backgroundBlendMode: BlendMode.saturation,
  ),
  child: child,
)

— Update:
Based on this new video from flutter team, there is another widget for this.
The code is basically the same, and it is like this:

ColorFiltered(
  colorFilter: ColorFilter.mode(
    Colors.grey,
    BlendMode.saturation,
  ),
  child: child,
)

But I still prefer the method using Container forgroundDecoration, since container gives you more flexibilities in the same place.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)