1

我正在尝试创建自定义导航抽屉,就像底部导航但在导航抽屉中。我无法实现我们想要的视图。我尝试使用自定义画家,但我不是专家。建议一些我可以学习自定义画家的网站基础到高级。

需要自定义导航

我的定制画家

我的代码:

 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;
  }

}
4

0 回答 0