topAndBottom static method

FadeContainer topAndBottom({
  1. required BuildContext context,
  2. required Widget child,
  3. 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,
  );
}