material_shapes library

A library for creating and morphing custom Material-style shapes with transformations and path conversion utilities for rendering.

Classes

CornerRounding
Defines the amount and quality around a given vertex of a shape. radius defines the radius of the circle which forms the basis of the rounding for the vertex. smoothing defines the amount by which the curve is extended from the circular arc around the corner to the edge between vertices.
Cubic
This class holds the anchor and control point data for a single cubic Bézier curve, with anchor points (anchor0X, anchor0Y) and (anchor1X, anchor1Y) at either end and control points (control0X, control0Y) and (control1X, control1Y) determining the slope of the curve between the anchor points.
MaterialShapeBorder
A border that fits a material-shaped border within the rectangle of the widget it is applied to.
MaterialShapes
Holds predefined Material Design shapes as RoundedPolygons that can be used at various components as they are, or as part of a Morph.
Morph
This class is used to animate between start and end polygons objects.
RoundedPolygon
The RoundedPolygon class allows simple construction of polygonal shapes with optional rounding at the vertices. Polygons can be constructed with either the number of vertices desired or an ordered list of vertices.

Functions

pathFromCubics({required Path path, required int startAngle, required bool repeatPath, required bool closePath, required List<Cubic> cubics, required double rotationPivotX, required double rotationPivotY}) Path
Returns a Path for a Cubic list.