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