Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:flutter_app/main.dart';
- class CustomShapeClipper extends CustomClipper<Path> {
- @override
- Path getClip(Size size) {
- final Path path = Path();
- path.lineTo(0.0, size.height);
- path.lineTo(0.0, size.height-40);
- path.quadraticBezierTo(size.width / 4, size.height, size.width / 2, size.height);
- path.quadraticBezierTo(size.width - (size.width / 4), size.height, size.width, size.height - 40);
- path.lineTo(size.width, 0.0);
- path.lineTo(size.width, 0.0);
- path.close();
- return path;
- }
- @override
- bool shouldReclip(CustomClipper oldClipper) => true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement