flutter_corner_shape library

CSS corner-shape for Flutter.

Provides round, scoop, bevel, notch, squircle, and superellipse corner shapes — with per-corner control, smooth animations, and drop-in ShapeBorder + Clipper widgets.

Quick Start

import 'package:flutter_corner_shape/flutter_corner_shape.dart';

// Scoop all corners (ticket/coupon shape)
Container(
  decoration: ShapeDecoration(
    color: Colors.orange,
    shape: CornerShapeBorder(
      borderRadius: BorderRadius.circular(30),
      cornerShape: CornerShapeSpec.scoop,
    ),
  ),
)

CSS ↔ Dart Mapping

CSS Dart
corner-shape: round CornerShapeSpec.round
corner-shape: scoop CornerShapeSpec.scoop
corner-shape: bevel CornerShapeSpec.bevel
corner-shape: notch CornerShapeSpec.notch
corner-shape: squircle CornerShapeSpec.squircle
corner-shape: square CornerShapeSpec.square
corner-shape: superellipse(-1.5) CornerShapeSpec.all(CornerShapeValue.superellipse(-1.5))
corner-shape: round scoop bevel notch CornerShapeSpec.only(topLeft: ..., ...)

Classes

ClipCornerShape
A widget that clips its child using a corner-shaped rectangle.
CornerShapeBorder
A ShapeBorder that applies CSS-style corner shapes to a rectangle.
CornerShapeDecoration
A convenience Decoration that combines color, gradient, image, shadows, and corner shapes into one declaration.
CornerShapeSpec
Specifies the CornerShapeValue for each corner of a rectangle, mirroring CSS corner-shape shorthand.
CornerShapeSpecTween
A Tween that interpolates between two CornerShapeSpecs.
CornerShapeValue
A value representing the curvature of a corner, modeled after the CSS superellipse() function.

Enums

CornerShapeType
Defines the shape of a corner, mirroring CSS corner-shape values.