withGlossyEffect method
Adds a glossy effect overlay to the widget.
Implementation
Widget withGlossyEffect({Color overlayColor = Colors.white, double glossFactor = 0.2}) {
assert(glossFactor >= 0.0 && glossFactor <= 1.0, "Gloss factor must be between 0.0 and 1.0");
final blendedColor = overlayColor.withOpacity(glossFactor);
return Stack(
children: [
this,
Container(
color: blendedColor,
),
],
);
}