NeuContainer class
Construct a new NeuContainer
, a specialized StatelessWidget that builds
two layered AnimatedContainers, one as a solid color backdrop with edge
insets and the second conforming to the Neu-standard properties, such as
depth and curvature, to give the inner container a neumorphic or
"clay"-like appearance rising out of the lower container.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- NeuContainer
Constructors
- NeuContainer({Key? key, Color color = lightWhite, int depth = defaultDepth, EdgeInsetsGeometry insets = EdgeInsets.zero, Curvature curvature = Curvature.convex, Swell swell = Swell.emboss, double spread = defaultSpread, Alignment lightSource = defaultLightSource, AlignmentGeometry? alignment, double? width, double? height, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, BoxConstraints? constraints, ShapeBorder shape = defaultShape, Decoration? foregroundDecoration, Matrix4? transform, AlignmentGeometry? transformAlignment, Duration duration = defaultDuration, Curve curve = Curves.elasticOut, VoidCallback? onEnd, Widget? child})
-
A specialized StatelessWidget that builds two layered
AnimatedContainers, one as a solid color backdrop with edge insets
and the second conforming to the Neu-standard properties, such as
depth and curvature, to give the inner container a neumorphic or
"clay"-like appearance rising out of the lower container.
const
Properties
- alignment → AlignmentGeometry?
-
Align the child within the container.
final
- child → Widget?
-
The child contained by the container.
final
- color → Color
-
With all Neu design the basis of these decorations is a color and a
depth. Color should ideally match with or be similar to the color of the
background behind the resulting decoration. The
depth
is the extent to which this decoration will appear "extruded" from its surface. A largerdepth
increases the contrast of the shading of colors on either side of the decoration.final - constraints → BoxConstraints?
-
Additional constraints to apply to the child.
final
- curvature → Curvature
-
A Curvature is a description of the appearance of the actual surface of
the decoration. A Curvature.flat decoration has no gradient (solid-color
Gradient), while Curvature.convex orders a light -> dark gradient in a
way that inspires a "bubble"-like appearance, especially when combined
with a swell of Swell.emboss.
final
- curve → Curve
-
The Curve by which to implicitly animate any changes to the properties
of this NeuContainer. Specifically, altering one of the fields, such as
modifying padding or color, will animate changes over this animation
curve.
final
- depth → int
-
With all Neu methods the basis of these decorations is a color and a
depth. Color should ideally match or be similar to the color of the
background behind the resulting decoration. The
depth
is the extent to which this decoration will appear "extruded" from its surface. A largerdepth
increases the contrast of the shading of colors on either side of the decoration.final - duration → Duration
-
How long any changes to the visual properties of this NeuContainer will
take to fully propagate and animate. Changes are alterations to the
properties/fields of this NeuContainer, such as padding or color.
final
- foregroundDecoration → Decoration?
-
The Decoration to paint in front of the child.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Limit the width or height of this NeuContainer, excluding any
margin, in logical pixels.
final
- insets → EdgeInsetsGeometry
-
A convenience to provide a padded, solid-color backdrop on which the true
container will be rendered. In a scenario where a background is not a
solid color that matches color, then insets may be initialized
non-negligibly (such as
EdgeInsets.all(25)
) to provide a small platform for the Neumorphic effect to be more visible.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lightSource → Alignment
-
The lightSource is always set by default as
defaultLightSource
, which is Alignment.topLeft. This gives the illusion of lighting the entire neumorphic decoration from the top-left corner. All descriptions of gradient and shadow directionality and the illusion of being toggled or not toggled are based on this default light source. An overriding Alignment may be provided, however, to dynamically "relight" the decorations.final - margin → EdgeInsetsGeometry?
-
Empty space to surround the NeuContainer and any insets.
final
- onEnd → VoidCallback?
-
An optional function to perform any time the properties of this
NeuContainer are altered.
final
- padding → EdgeInsetsGeometry?
-
Empty space to inscribe inside the Container. The child, if any, is
placed inside these EdgeInsets.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → ShapeBorder
-
A ShapeBorder object provides a description of a shape for a decoration.
It can include information such as how round corners are to be or what the
border edges should look like.
final
- spread → double
-
In terms of Shadows, spread is responsible for determining how wide
an area the effect covers and how blurry the shadows appear.
final
- swell → Swell
-
A Swell is an overall depiction of how the decoration appears in terms
of being inset into the surface or extruded from it.
final
- transform → Matrix4?
-
The transformation matrix to apply before painting the container.
final
- transformAlignment → AlignmentGeometry?
-
The alignment of the origin, relative to the size of the container, if
transform is specified.
final
- width → double?
-
Limit the width or height of this NeuContainer, excluding any
margin, in logical pixels.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
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
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited