CornerSpec class Null safety

📐 CornerSpec

Define the Corner appearance options for each of the four corners in a Shape and their 🔘 radius.

Not providing an optional radius, a Shape will defer to its own Shape.radius, defaulting to _RADIUS == 10.0.

const CornerSpecs with pre-set configurations available:

CornerSpec named constructors with pre-filled Corners:

Mixed in types

Constructors

CornerSpec({Corner topLeft = Corner.ROUND, Corner topRight = Corner.ROUND, Corner bottomRight = Corner.ROUND, Corner bottomLeft = Corner.ROUND, BorderRadiusGeometry? radius})
A CornerSpec that accepts any Corner for each field, but defaults them all to Corner.ROUND. [...]
const
CornerSpec.beveledWith({Corner topLeft = Corner.BEVEL, Corner topRight = Corner.BEVEL, Corner bottomRight = Corner.BEVEL, Corner bottomLeft = Corner.BEVEL, BorderRadiusGeometry? radius})
A CornerSpec that accepts any Corner for each field, but defaults them all to Corner.BEVEL. [...]
const
CornerSpec.noneWith({Corner topLeft = Corner.NONE, Corner topRight = Corner.NONE, Corner bottomRight = Corner.NONE, Corner bottomLeft = Corner.NONE, BorderRadiusGeometry? radius})
A CornerSpec that accepts any Corner for each field, but defaults them all to Corner.NONE. [...]
const
CornerSpec.squaredWith({Corner topLeft = Corner.SQUARE, Corner topRight = Corner.SQUARE, Corner bottomRight = Corner.SQUARE, Corner bottomLeft = Corner.SQUARE, BorderRadiusGeometry? radius})
A CornerSpec that accepts any Corner for each field, but defaults them all to Corner.SQUARE. [...]
const

Properties

asSet Set<Corner>
Return the Set<Corner> of this CornerSpec's potential Corners. [...]
read-only
bottomLeft Corner
📐 Corner [...]
final
bottomRight Corner
📐 Corner [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
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.
read-only, inherited
topLeft Corner
📐 Corner [...]
final
topRight Corner
📐 Corner [...]
final

Methods

copyWith({Corner? topLeft, Corner? topRight, Corner? bottomRight, Corner? bottomLeft, BorderRadiusGeometry? radius}) CornerSpec
📋 Returns a copy of this CornerSpec with the given properties.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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

lerp(CornerSpec? a, CornerSpec? b, double t) CornerSpec?
Linearly interpolate between two CornerSpec objects. [...]

Constants

BEVELED → const CornerSpec
All corners will be Corner.BEVELed by default 🔘 _RADIUS == 10.0.
CornerSpec.beveledWith()
BEVELED_50 → const CornerSpec
All four corners will be Corner.BEVELed with 🔘 radius == 50.0.
CornerSpec.beveledWith(radius: BorderRadius.all(Radius.circular(50.0)))
BIBEVELED_50 → const CornerSpec
All four corners will be Corner.BEVELed with 🔘 radius == 50.0.
CornerSpec.beveledWith(topLeft: Corner.SQUARE, bottomRight: Corner.SQUARE, radius: BorderRadius.all(Radius.circular(50.0)))
BIBEVELED_50_FLIP → const CornerSpec
All four corners will be Corner.BEVELed with 🔘 radius == 50.0.
CornerSpec.beveledWith(topRight: Corner.SQUARE, bottomLeft: Corner.SQUARE, radius: BorderRadius.all(Radius.circular(50.0)))
CIRCLE → const CornerSpec
All four corners of the Shape are Corner.NONE; 🔘 Shape.radius is ignored.
CornerSpec.noneWith()
ROUNDED → const CornerSpec
All four corners will be Corner.ROUNDed default 🔘 _RADIUS == 10.0.
ROUNDED_50 → const CornerSpec
All four corners will be Corner.ROUNDed with 🔘 radius == 50.0.
CornerSpec(radius: BorderRadius.all(Radius.circular(50.0)))
SQUARED → const CornerSpec
All four corners of the Shape are Corner.SQUAREed; 🔘 Shape.radius is ignored.
CornerSpec.squaredWith()