Shape class
🔰 Shape
- 📐 CornerSpec
Shape
description
- ➖
BorderSide
borders
- 🔘
Corner
BorderRadius
radius- Defers to any Shape.corners or Shape.baseCorners supplied 🔘 CornerSpec.radius, if available.
- 🔛
SurfaceLayer
padLayer
- 📏
Shape
scaling- See
double
s shapeScaleChild, shapeScaleMaterial, shapeScaleBase
- See
- Mixed-in types
Constructors
- Shape({CornerSpec corners = CornerSpec.ROUNDED, CornerSpec? baseCorners, BorderSide? border, BorderSide? baseBorder, BorderRadiusGeometry radius = _RADIUS, SurfaceLayer padLayer = SurfaceLayer.CHILD, double shapeScaleChild = 1.0, double shapeScaleMaterial = 1.0, double shapeScaleBase = 1.0})
-
- 📐 CornerSpec
Shape
description- Use
corners
to customize all four corners in a Shape and their 🔘radius
. - Specify
baseCorners
separately if desired. const
CornerSpec
s with pre-set configurations available:
const - 📐 CornerSpec
Properties
- baseBorder → BorderSide?
-
The baseBorder may be specified separately from border,
but is optional and will only impact the 📚 SurfaceLayer.BASE.
final
- baseBorderOr → BorderSide?
-
Returns nullable baseBorder if initialized, else nullable border.
no setter
- baseCorners → CornerSpec?
-
The 📐 baseCorners may be specified separately from corners,
but is optional and will only impact the 📚 SurfaceLayer.BASE.
final
- baseCornersOr → CornerSpec
-
Returns nullable baseCorners if initialized, else required corners.
no setter
- border → BorderSide?
-
Define a BorderSide decoration for the edges of this Shape.
final
- corners → CornerSpec
-
Define the Corner appearance options for each
of the four corners in a Shape and their 🔘 radius.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- padLayer → SurfaceLayer
-
Specify a 📚 SurfaceLayer as 🔛 padLayer
to receive Surface.padding value.
final
- radius → BorderRadiusGeometry
-
The 🔘 radius impacts the roundedness of default
📐 Corner.ROUND or bevel-depth of 📐 Corner.BEVEL corners.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shapeScaleBase → double
-
Declare a
double
shapeScaleBase (defaults1.0
) that a 🌟 Surface will utilize when rendering the Shape for 📚 SurfaceLayer.BASE.final - shapeScaleChild → double
-
Declare a
double
shapeScaleChild (defaults1.0
) that a 🌟 Surface will utilize when rendering its 👶child
📚 SurfaceLayer.final - shapeScaleMaterial → double
-
Declare a
double
shapeScaleMaterial (defaults1.0
) that a 🌟 Surface will utilize when rendering the Shape for 📚 SurfaceLayer.MATERIAL.final
Methods
-
copyWith(
{CornerSpec? corners, CornerSpec? baseCorners, BorderSide? border, BorderSide? baseBorder, BorderRadiusGeometry? radius, SurfaceLayer? padLayer, double? shapeScaleChild, double? shapeScaleMaterial, double? shapeScaleBase}) → Shape -
📋 Returns a copy of this
Shape
with the given properties. -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
biBeveledRectangle(
{bool flip = false, double radius = 5, bool shrinkOneCorner = false, double ratio = 5 / 4, AlignmentGeometry? shrinkCornerAlignment}) → BeveledRectangleBorder -
_DEPRECATED
- 🔰 Shape.biBeveledRectangle -
lerp(
Shape? a, Shape? b, double t) → Shape? -
If both are
null
, returnsnull
.