innerShadow method

Widget innerShadow({
  1. double? width,
  2. double? height,
  3. Color? shadowColor,
})

Implementation

Widget innerShadow({
  double? width,
  double? height,
  Color? shadowColor,
}) {
  return ClipRRect(
    borderRadius: BorderRadius.circular(4),
    child: Container(
      width: width,
      height: height,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(4),
        boxShadow: [
          BoxShadow(
            offset: const Offset(0, -4),
            blurRadius: 10,
            color: shadowColor ?? Colors.black.withOpacity(.04),
          ),
          const BoxShadow(
            blurRadius: 10,
            offset: Offset(0, 2),
            color: Colors.white,
          ),
        ],
      ),
      child: this,
    ),
  );
}