topAndBottom static method
FadeContainer
topAndBottom({
- required BuildContext context,
- required Widget child,
- Color? fadeColor,
- double startFade = 0.97,
Implementation
static FadeContainer topAndBottom({
required BuildContext context,
required Widget child,
Color? fadeColor,
double startFade = 0.97,
}) {
var overlayColor = fadeColor ?? context.colorScheme.surface;
return FadeContainer(
child: child,
fadeColors: [
overlayColor,
Colors.transparent,
Colors.transparent,
overlayColor
],
stops: [
0,
(1 - startFade),
startFade,
1.0,
],
shaderRect: (rect) => rect,
);
}