NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
pub.dev, #5709 most downloaded on pub.dev
A library for easy creation, transformation, and morphing of rounded polygonal shapes. Contains predefined Material Design shapes that can be used at various components.
Latest stable
2.0.0
Last release 1 months ago
15 Oct 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 14 of 14 stable releases
Nothing withdrawn
no release was ever pulled
11 months old
14 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
Publsihed androidx_graphics_shapes version 2.0.0.
Publsihed androidx_graphics_shapes version 2.0.0.
Aligned the package API and implementation with the newly-released Material Shapes in the official material_ui package.
RoundedPolygon API instead of hiding members behind RoundedPolygonInternals.MaterialShapes, DynamicPathBorder, StaticPathBorder, RoundedPolygonBorder, and MorphBorder back from material_3p into androidx_graphics_shapes.material_3p dependency.Removed the deprecated shapes and material_shapes libraries.
package:androidx_graphics_shapes/androidx_graphics_shapes.dart.package:androidx_graphics_shapes/material_shapes.dart imports to package:androidx_graphics_shapes/androidx_graphics_shapes.dart.Changed CornerRounding constructor parameters from positional to named.
CornerRounding.from() constructor is now unnamed (CornerRounding()) and the unnamed constructor with positional parameters is now gone.CornerRounding(radius: ..., smoothing: ...).CornerRounding.toString() override.Renamed Cubic to CubicBezier and made it a concrete immutable class.
Cubic.from() with the unnamed CubicBezier() constructor taking four Offset points (anchor0, control0, control1, anchor1) and an internal CubicBezier.raw() constructor.Cubic.empty() with the public CubicBezier.point() constructor taking an Offset.CubicBezier.straightLine() and CubicBezier.circularArc() factory constructors to accept Offset parameters instead of raw double coordinates.anchor0, control0, control1, and anchor1 getters to return Offset.pointOnCurve() public, renamed it to pointAt(), and added pointAtX() and pointAtY() methods.zeroLength() public and replaced it with the isZeroLength getter.calculateBounds({bool approximate = false}) into calculateBounds() and calculateApproximateBounds().reverse() method with the reversed getter.+, *, and / operators as well as Cubic.interpolate().Removed MutableCubic and MutablePoint.
CubicBezier instances directly.Renamed PointTransformer to ShapePointTransformer and removed TransformResult.
RoundedPolygonExtension matrix transformation methods (transformedWithMatrix2(), transformedWithMatrix3(), transformedWithMatrix4()) with Matrix2ShapePointTransformer, Matrix3ShapePointTransformer, and Matrix4ShapePointTransformer extensions on Matrix2, Matrix3, and Matrix4.asPointTransformer() method returning a ShapePointTransformer that can be passed to transformed().Renamed Feature to PolygonFeature.
Edge and Corner subclasses to EdgeFeature and CornerFeature.PolygonFeature.ignorable(), PolygonFeature.edge(), PolygonFeature.convexCorner(), and PolygonFeature.concaveCorner().isIgnorableFeature getter to isIgnorable and added isCorner getter.reversed() method with the reversed getter.PolygonFeature.cubics now returns an unmodifiable List<CubicBezier>.Refactored RoundedPolygon constructors, properties, and methods.
RoundedPolygon.regular() the unnamed RoundedPolygon() factory constructor with numVertices as a positional parameter.RoundedPolygon.fromPolygon().RoundedPolygon.fromVertices() to take a positional List<Offset> vertices parameter instead of a named List<double> vertices coordinate list.RoundedPolygon.fromFeatures() to take a positional List<PolygonFeature> features parameter instead of a named parameter.centerX and centerY parameters across all constructors with a single Offset center parameter (or Offset? center in fromVertices() and fromFeatures()).centerX and centerY getters with a public center getter of type Offset.features and cubics unmodifiable lists.calculateBounds({bool approximate = true}) into calculateBounds() and calculateApproximateBounds().approximate parameter from normalized() and added safe handling for degenerate zero-sized polygons.toPath() from RoundedPolygonExtension directly onto RoundedPolygon, changed startAngle from degrees to radians, and removed rotationPivotX and rotationPivotY parameters.RoundedPolygon.toString() to output feature and cubic counts, and updated == and hashCode to include center.Refactored Morph API and path generation utilities.
start and end properties public on Morph.Morph.asCubics() to Morph.toCubics() and removed Morph.forEachCubic().Morph.calculateBounds({bool approximate = true}) into calculateBounds() and calculateApproximateBounds().toPath() from MorphExtension directly onto Morph, made progress a positional parameter, changed startAngle from degrees to radians, and replaced rotationPivotX and rotationPivotY with Offset rotationPivot = Offset.zero.pathFromCubics() function to build a Path directly from a List<CubicBezier>.Updated MaterialShapes and shape borders.
MaterialShapes.all containing an unmodifiable list of all 35 predefined Material shapes.MaterialShapes.build*() and MaterialShapes.customPolygon() methods as well as OffsetAndRounding.MaterialShapeBorder (OutlinedBorder) with support for morphing between shapes, resuming interrupted transitions, and caching Morph instances in an LRU cache.RoundedPolygonBorder to cache Morph instances in an LRU cache for lerpFrom() and lerpTo().StaticPathBorder.getPath() to return an empty Path when given an empty or non-positive Rect.Fixed edge cases in polygon measurement and feature mapping.
MeasuredPolygon.measure() by spacing cubics evenly.MeasuredPolygon.cutAndShift().Added upstream unit test suite and GitHub Actions test workflow.
Upgraded dependencies.
vector_math to ^2.4.3.deminearchiver_lints to ^3.1.0.Your coding agent can read these notes before it upgrades. Set up the MCP server →
The shapes library is now deprecated in favor of androidx_graphics_shapes.
Introduced a new main library androidx_graphics_shapes.
shapes library is now deprecated in favor of androidx_graphics_shapes.package:androidx_graphics_shapes/shapes.dart to package:androidx_graphics_shapes/androidx_graphics_shapes.dart.Deprecated the material_shapes library in favor of package:material_3p/material_shapes.dart.
package:androidx_graphics_shapes/material_shapes.dart to package:material_3p/material_shapes.dart.Bumped minimum SDK versions to Dart 3.13 and Flutter 3.47.
Made Feature a sealed class.
Edge and Corner, which are already final classes.Upgraded dependencies to latest pinned SDK constraints.
meta to ^1.19.0.vector_math to ^2.4.2.Updated example to use the material_3p package.
Minor internal changes.
Applied minor optimizations to Cubic.split() (cartesian optimization) and Cubic.pointOnCurve().
Applied minor optimizations to Cubic.split() (cartesian optimization) and Cubic.pointOnCurve().
Fixed changelog formatting.
Removed deprecated internal extensions: RoundedPolygonInternalExtension and MorphInternalExtension.
Introduced a new abstract DynamicPathBorder class, which allows implementing bounds-dependent path borders while handling the painting logic automatically.
BorderSide support to both RoundedPolygonBorder and MorphBorder, including proper stroke alignment.strokeCap, strokeJoin and strokeMiterLimit properties allow customizing how the shape's outline will be painted. This change was propagated down to StaticPathBorder, RoundedPolygonBorder and MorphBorder as well.DynamicPathBorder.paintPathStroke() static method provides painting logic to help paint path strokes on a Canvas, e.g. in CustomPainter.paint(), RenderObject.paint(), etc.Renamed PathBorder to StaticPathBorder and changed its superclass to DynamicPathBorder.
Added Object.toString() overrides for all custom borders: DynamicPathBorder, StaticPathBorder, RoundedPolygonBorder and MorphBorder.
Added documentation clarifying the normalized path requirements to StaticPathBorder.path.
Removed deprecated internal extensions: RoundedPolygonInternalExtension and MorphInternalExtension.
RoundedPolygonExtension and MorphExtension respectively.Bumped minimum SDK versions to Dart 3.12 and Flutter 3.44.
Cleaned up internal code.
Reformatted the library with Dart 3.12 formatter changes.
Reformatted the changelog.
Changed RoundedPolygonExtension.transformedWithMatrix4() to always perform perspective transform. Removed the usePerspectiveTransform parameter.
Changed RoundedPolygonExtension.transformedWithMatrix4() to always perform perspective transform. Removed the usePerspectiveTransform parameter.
Fixed RoundedPolygon.hashCode returning different hash codes for equal objects. The features list is now being properly hashed by values.
Replaced usages of listEquals() and Object.hashAll() with ListEquality().equals() and ListEquality().hash().
Minor optimizations, as well as internal and code style changes.
Marked internal extension methods on RoundedPolygon and Morph as deprecated.
Bumped minimum Dart SDK to 3.11 and Flutter to 3.41.
Marked internal extension methods on RoundedPolygon and Morph as deprecated.
Fixed RoundedPolygonBorder.copyWith() skipping side and squash properties.
Exposed PathBorder for public use.
Added transformedWithMatrix2(), transformedWithMatrix3() and transformedWithMatrix4() methods to RoundedPolygonExtension.
Added more arguments to RoundedPolygonExtension.toPath() and MorphExtension.toPath() methods.
Optimized internal calculations and algorithms in the material_shapes library only.
Added missing 1.4.0 changelog entries.
Downgraded the dependency constraint of meta to ^1.17.0 to match the version pinned by the stable SDK.
meta to ^1.17.0 to match the version pinned by the stable SDK.Removed usages of the @immutable annotation.
Removed usages of the @immutable annotation.
Internal changes.
Addressed linter feedback.
Upgraded dependencies.
Added path caching to RoundedPolygonBorder and MorphBorder so they are no longer const-constructable.
Added path caching to RoundedPolygonBorder and MorphBorder so they are no longer const-constructable.
Implemented morphing between RoundedPolygonBorder shapes and between MorphBorder shapes (with the same morph values).
Exposed start and end properties of Morph as internal members.
Internal updates to MaterialShapes.
Added inline pragmas to internal utils.
CornerRounding() now uses positional parameters. For named parameters, CornerRounding.from() can be used.
CornerRounding() now uses positional parameters. For named parameters, CornerRounding.from() can be used.
Internal code style changes.
Updated README.md with expanded information.
Updated README.md with expanded information.
Added an empty example/main.dart for future implementation.
Added documentation comments for more items.
Optimized Point internal implementation for raw construction, making it an extension type.
Optimized Point internal implementation for raw construction, making it an extension type.
Optimized Cubic.fromPoints() internal constructor implementation.
Added identity equality checks for MutableCubic, making every instance of the class only be equal to itself.
Changed startAngle type from int to double in various APIs.
Previously mutable static members of MaterialShapes (i.e. MaterialShapes.circle, MaterialShapes.square etc.) are now final.
Applied dot shorthands across the library.
Improve overall code style and clarity.
- Initial version.
One column per month.