How to Create an Image with Bezier Curves in Flutter?

An image with bezier curves at the bottom is a common requirement in many applications. ClipPath class is used to create custom clipping in Flutter. In this tutorial, we’re going to learn how to create an image with Bezier curves in Flutter using ClipPath class.

import 'dart:ui';

import 'package:flutter/material.dart';

class ImagePage extends StatefulWidget {
  const ImagePage({Key? key}) : super(key: key);

  _ImagePageState createState() => _ImagePageState();

class _ImagePageState extends State<ImagePage> {
  void initState() {

  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.blueAccent,
        appBar: AppBar(
          title: const Text('Curved Image'),
        body: SafeArea(
          child: ClipPath(
            clipper: BezierCurveClipper(),
class BezierCurveClipper extends CustomClipper<Path> {
  Path getClip(Size size) {
    var waveHeight = 10;
    Path path = new Path();
    final lowPoint = size.height - waveHeight;
    final highPoint = size.height - waveHeight*2;
    path.lineTo(0, size.height);
        size.width / 4, highPoint, size.width / 2, lowPoint);
        3 / 4 * size.width, size.height, size.width, lowPoint);
    path.lineTo(size.width, 0);

    return path;

  bool shouldReclip(CustomClipper<Path> oldClipper) => false;

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.