import 'dart:ui';

import 'package:flutter/material.dart';

class BNBCustomPainter3 extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    debugPrint("Drawing navbar...");
    Paint paint =
        new Paint()
          ..color = const Color.fromARGB(255, 79, 76, 182)
          ..style = PaintingStyle.fill;

    Path path = Path();
    path.moveTo(0, 10); // Start
    path.quadraticBezierTo(size.width * 0.20, 0, size.width * 0.35, 0);
    path.quadraticBezierTo(size.width * 0.40, 0, size.width * 0.40, 20);
    path.arcToPoint(
      Offset(size.width * 0.60, 20),
      radius: Radius.circular(20.0),
      clockwise: false,
    );
    path.quadraticBezierTo(size.width * 0.60, 0, size.width * 0.63, 0);
    path.quadraticBezierTo(size.width * 0.88, 0, size.width, 10);
    path.lineTo(size.width, size.height);
    path.lineTo(0, size.height);
    path.lineTo(0, 20);
    canvas.drawShadow(path, Colors.black, 5, true);
    canvas.drawPath(path, paint);
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) {
    return false;
  }
}
