Благодаря Thepeanut , я нашел ответ.
class HomePage extends StatefulWidget {
HomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(),
),
ClipPath(
child: Opacity(
opacity: 0.5,
child: Container(color: Colors.red),
),
clipper: CustomClipPath(),
)
],
);
}
}
class CustomClipPath extends CustomClipper<Path> {
var radius = 96.0;
@override
Path getClip(Size size) {
Path path = Path();
path.lineTo(0.0, size.height);
path.lineTo(size.width, size.height);
path.lineTo(size.width, radius);
path.arcToPoint(
Offset(size.width - radius, 0.0),
clockwise: true,
radius: Radius.circular(radius),
);
return path;
}
@override
bool shouldReclip(CustomClipper<Path> oldClipper) => true;
}