top static method
FadeContainer
top({
- required BuildContext context,
- required Widget child,
- Color? fadeColor,
- double stopFade = 0.03,
Implementation
static FadeContainer top({
required BuildContext context,
required Widget child,
Color? fadeColor,
double stopFade = 0.03,
}) {
Color overlayColor = fadeColor ?? context.colorScheme.surface;
return FadeContainer(
child: child,
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
fadeColors: [
overlayColor,
Colors.transparent,
],
stops: [0, stopFade],
shaderRect: (rect) => rect,
);
}