withGlossyEffect method

Text withGlossyEffect({
  1. double glossFactor = 0.5,
})

Applies a glossy effect to the text.

Implementation

Text withGlossyEffect({double glossFactor = 0.5}) {
  assert(glossFactor >= 0.0 && glossFactor <= 1.0, "Gloss factor must be between 0.0 and 1.0");
  final glossyColor = Color.lerp(Colors.white, style?.color ?? Colors.black, glossFactor)!;
  return withColor(glossyColor);
}