avoid-incorrect-image-opacity
Warns when an Image
widget is wrapped into an Opacity
widget.
Passing a value for the opacity
parameter is much more efficient than using the Opacity
widget.
Example
❌ Bad:
// LINT
Opacity(
opacity: 1,
child: Image.asset('...'),
);
✅ Good:
Image.asset(
'...',
opacity: const AlwaysStoppedAnimation(0.5),
);