getFolderStylePath static method

Path getFolderStylePath(
  1. Size size, {
  2. double topLeftRadius = 4,
  3. double slopeMargin = 20,
})

Implementation

static Path getFolderStylePath(Size size, {double topLeftRadius = 4, double slopeMargin = 20}){
  final topLeftRad = topLeftRadius ?? 4;
  final slopeMarg = slopeMargin ?? 20;
  final path = Path();
  path.lineTo(topLeftRad, 0);
  path.lineTo(size.width - slopeMarg, 0);
  path.lineTo(size.width, size.height);
  path.lineTo(0, size.height);
  path.lineTo(0, topLeftRad);
  path.arcToPoint(Offset(topLeftRad, 0), radius: Radius.circular(topLeftRad), rotation: 270);
  path.close();
  return path;
}