drawShadow method

void drawShadow(
  1. Canvas canvas,
  2. Size size
)

Implementation

void drawShadow(Canvas canvas, Size size) async{
  canvas.drawPath(
      Path()
        ..addRect(
            Rect.fromPoints(Offset(-15, -15), Offset(size.width+15, size.height+15)))
        ..addOval(
            Rect.fromPoints(Offset(0, 0), Offset(size.width, size.height)))
        ..fillType = PathFillType.evenOdd,
      Paint()
        ..color= NUIColors.NUIBlack.withOpacity(0.3)
        ..maskFilter = MaskFilter.blur(BlurStyle.normal, convertRadiusToSigma(3))
  );
}