1

I am trying to create custom navigation drawer just like bottom navigation but in navigation drawer.I am not able to achieve the view we want.I tried using custom painter but i am not expert in it.Suggest some websites where i can learn custom painter basic to advance level.

Require custom navigation

My custom painter

My code :

 class MyCustomPainter extends CustomPainter{

  @override
  void paint(Canvas canvas, Size size) {



    Paint paint0 = Paint()
      ..color = const Color.fromARGB(255, 33, 150, 243)
      ..style = PaintingStyle.fill;
     // ..strokeWidth = 1;


    Path path0 = Path();
    path0.moveTo(size.width*0.0025000,size.height*0.0042857);
    path0.quadraticBezierTo(size.width*0.2481250,size.height*0.0010714,size.width*0.3300000,0);
    path0.lineTo(size.width*0.3308333,size.height*0.1385714);
    path0.quadraticBezierTo(size.width*0.1392500,size.height*0.1384000,size.width*0.1247083,size.height*0.2564000);
    path0.quadraticBezierTo(size.width*0.1423583,size.height*0.3717143,size.width*0.3328917,size.height*0.3609143);
    path0.lineTo(size.width*0.3328417,size.height*0.9951571);
    path0.lineTo(size.width*0.0033333,size.height*0.9957143);
    path0.quadraticBezierTo(size.width*0.0031250,size.height*0.7478571,size.width*0.0025000,size.height*0.0042857);
    path0.close();

    canvas.drawPath(path0, paint0);


  }

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

}
siva
  • 149
  • 1
  • 1
  • 11

0 Answers0