I am trying to do shape like in the image below ...
I don't know how to make it like the image ...
my code ...
ClipPath(
clipper: MyClipper(),
child: Container(
margin: EdgeInsets.only(top: size.height * 0.6),
height: 500,
width: size.width,
color: Colors.white,
),
),
The first try I made the first point on (0,1) ...
class MyClipper extends CustomClipper<Path> {
@override
Path getClip(Size size) {
var path = Path();
path.moveTo(0, size.height);
path.lineTo(0, size.height * 0.2);
// path.lineTo(size.width, size.height);
// path.lineTo(size.width, size.height * 0.5);
path.quadraticBezierTo(size.width / 2, 0, size.width, size.height * 0.2);
path.lineTo(size.width, size.height);
path.close();
return path;
}
@override
bool shouldReclip(CustomClipper<Path> oldClipper) {
return true;
}
}
the second try, I made the first point on (0,0.5) ...
class MyClipper extends CustomClipper<Path> {
@override
Path getClip(Size size) {
var path = Path();
path.moveTo(0, size.height * 0.5);
path.quadraticBezierTo(size.width / 2, 0, size.width, size.height * 0.5);
path.lineTo(size.width, size.height);
path.lineTo(0, size.height);
path.close();
return path;
}
@override
bool shouldReclip(CustomClipper<Path> oldClipper) {
return false;
}
}
I know hoe to make it from the bottom but i don't know how to make it
please I need an explanation of the answer.


