withBottomFade method
Widget
withBottomFade({
- required BuildContext context,
- Color? fadeColor,
- double startFade = 0.97,
- AlignmentGeometry? begin,
- AlignmentGeometry? end,
- List<
double> ? stops, - Rect shaderRect()?,
- BlendMode? blendMode,
Implementation
Widget withBottomFade({
required BuildContext context,
Color? fadeColor,
double startFade = 0.97,
AlignmentGeometry? begin,
AlignmentGeometry? end,
List<double>? stops,
Rect Function(Rect)? shaderRect,
BlendMode? blendMode,
}) {
Color overlayColor = fadeColor ?? Theme.of(context).colorScheme.surface;
return FadeContainer(
child: this,
fadeColors: [context.transparent, overlayColor],
begin: begin ?? Alignment.topCenter,
end: end ?? Alignment.bottomCenter,
stops: stops ?? [startFade, 1.0],
shaderRect: shaderRect ?? (rect) => rect,
blendMode: blendMode ?? BlendMode.srcATop,
);
}