1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Flutter CustomClipper

Discussão em 'Mobile' iniciado por Stack, Outubro 10, 2024 às 10:03.

  1. Stack

    Stack Membro Participativo

    I am using Custom Clipper while creating these two widgets in Flutter, but there is a problem, how can I create it?

    [​IMG]

    Update: can be used to crop from right side

    class CustomRightClipper extends CustomClipper<Path> {
    @override
    Path getClip(Size size) {
    final path = Path();
    path.lineTo(size.width / 2, 0.0);
    path.lineTo(size.width * 0.37, 30);
    path.lineTo(0, 30);
    path.close();
    return path;
    }

    @override
    bool shouldReclip(CustomRightClipper oldClipper) => true;
    }

    Continue reading...

Compartilhe esta Página