CouponClipper class
Clips a widget to the form of a coupon card shape
- Inheritance
-
- Object
- Listenable
- CustomClipper<
Path> - CouponClipper
Constructors
- CouponClipper({double borderRadius = 8, double curveRadius = 20, double curvePosition = 100, Axis curveAxis = Axis.horizontal, TextDirection direction = TextDirection.ltr, bool clockwise = false})
-
Paints a coupon shape around any widget.
const
Properties
- borderRadius → double
-
Border radius value.
final
- clockwise → bool
-
If
false
(by default), then the border radius will be drawn inside the child, otherwise outside.final - curveAxis → Axis
-
The direction of the curve, whether it's set vertically or
horizontally.
final
- curvePosition → double
-
The curve position, which specifies the curve position depending
on the its child's size.
final
- curveRadius → double
-
The curve radius value, which specifies its size.
final
- direction → TextDirection
-
If
curveAxis
set toAxis.vertical
, then direction is useful for languages like (Ar, Fa, ...).final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be notified when it is time to reclip.
inherited
-
getApproximateClipRect(
Size size) → Rect -
Returns an approximation of the clip returned by getClip, as
an axis-aligned Rect. This is used by the semantics layer to
determine whether widgets should be excluded.
inherited
-
getClip(
Size size) → Path -
Returns a description of the clip given that the render object being
clipped is of the given size.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies when it is time to reclip.
inherited
-
shouldReclip(
covariant CustomClipper< Path> oldClipper) → bool -
Called whenever a new instance of the custom clipper delegate class is
provided to the clip object, or any time that a new clip object is created
with a new instance of the custom clipper delegate class (which amounts to
the same thing, because the latter is implemented in terms of the former).
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited