Shaper class

Shaper is a class that represents a shape. it have a build that return a Path that represents the shape. it also have a invert method that return a new Shaper that invert the shape (by adding a rectangle that fill the whole widget and then subtract the shape from it).

Implementers

Constructors

Shaper({required Path path(Size parentSize)})

Properties

hashCode int
The hash code for this object.
no setterinherited
path Path Function(Size parentSize)
path is a function that takes a Size and returns a Path
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(Size parentSize, {Size? size, Matrix4? transform, AlignmentGeometry? origin = Alignment.center, AlignmentGeometry alignment = Alignment.center, Offset? offset, Offset? translate, double? margin}) Path
invert() Shaper
invert is a function that returns a new Shaper that invert the shape.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

circle({double startAngle = 0, double endAngle = 2 * pi}) Shaper
static shapes
polygon({BorderSide side = BorderSide.none, double sides = 5, double pointRounding = 0, double rotation = 0, double squash = 0}) Shaper
rect({BorderRadiusGeometry borderRadius = BorderRadius.zero}) Shaper
star({BorderSide side = BorderSide.none, double points = 5, double innerRadiusRatio = 0.4, double pointRounding = 0, double valleyRounding = 0, double rotation = 0, double squash = 0}) Shaper