NeumorphicShadowPainter class

A custom painter that extends NeumorphicShapePainter to draw shadows for neumorphic design elements.

This painter is responsible for rendering the shadow effects that give the neumorphic elements their characteristic look. It handles the light and dark shadows to create the illusion of depth and elevation.

Inheritance

Constructors

NeumorphicShadowPainter.new({required List<Shadow> shadows, ShapeBorder shape = const ContinuousRectangleBorder(), double strokeWidth = 0})
Creates a NeumorphicShadowPainter.

Properties

hashCode int
The hash code for this object.
no setterinherited
innerPath Path
The inner path of the shape.
getter/setter pairinherited
innerRect Rect
The inner rectangle of the shape.
getter/setter pairinherited
outerPath Path
The outer path of the shape.
getter/setter pairinherited
outerRect Rect
The outer rectangle of the shape.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowPaint Paint
The paint object used to draw the shadows.
final
shadows List<Shadow>
The list of shadows to apply to the shape.
final
shape ShapeBorder
The shape of the Neumorphic element.
finalinherited
strokeWidth double
The width of the stroke for the shape.
finalinherited

Methods

calculateShape(Offset offset, Size size) → void
Calculates the shape of the Neumorphic element.
inherited
convertRadiusToSigma(double radius) double
Converts a radius value to a sigma value.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paintShadow(Canvas canvas, {Path? path}) → void
Paints the shadow effect on the shape.
toString() String
A string representation of this object.
inherited

Operators

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