NeumorphicSurfacePainter class
A custom painter that extends NeumorphicShapePainter to paint a surface with a neumorphic design. This painter is used to create the light and shadow effects that give the appearance of a raised or recessed surface.
The NeumorphicSurfacePainter class provides the necessary methods to paint the neumorphic surface with the desired shape, light source, and shadow properties.
- Inheritance
-
- Object
- NeumorphicShapePainter
- NeumorphicSurfacePainter
Constructors
- NeumorphicSurfacePainter.new({Gradient? gradient, Color? color, Gradient? borderGradient, double blur = 0, double borderBlur = 0, ShapeBorder shape = const ContinuousRectangleBorder(), double strokeWidth = 0})
- Creates a NeumorphicSurfacePainter.
Properties
- blur → double
-
The blur radius for the surface.
final
- borderBlur → double
-
The blur radius for the border.
final
- borderGradient → Gradient?
-
The gradient to apply to the border of the surface.
final
- borderPaintObject → Paint
-
The paint object used to draw the border.
final
- borderPath ↔ Path?
-
The border path.
getter/setter pair
- color → Color?
-
The color of the surface.
final
- gradient → Gradient?
-
The gradient to apply to the surface.
final
- 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
- paintObject → Paint
-
The paint object used to draw the surface.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- 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
-
paintSurface(
Canvas canvas, {Path? path}) → void - Paints the surface effect on the shape.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited