neu library

neu header image

pub.dev Listing | API Doc | GitHub | 🌐 Interactive Web Demo

Introduces a Neumorphic, or new skeuomorphic, helper class with a variety of static and instance methods for the simple generation of shaded decorations conforming to the neumorphic design concept.


These designs are often solid in terms of color variety: genreally a dominant color is used as a backdrop as well as the color of controls and elements. These items that typically appear on or "above" the surface in standard design systems are intended in skeumorphism to extrude from or "rise out" or into the surface.

This extrusion, which can be imagined as clay- or rubber-like, is achieved by a combination of same-color elements and background, contrasting shadows, slight variances in color shading and (potentially) gradients for the impression of natural lighting.

Instantiate a new Neu object with desired values then return its decoration properties as getters in the format buildFooDecoration; or opt to skip instantiation and directly call Neu static methods such as Neu.boxDecoration.

A new Neu.toggle can be setup to automate the changing of appearance based on a state flag, isToggled.

A NeuContainer makes deploying a Neumorphic design element "as easy as pie." A similar container widget that instead makes use of Neu.toggle is NeuToggle.


API References: Neu | NeuContainer | Neu.toggle | NeuToggle | Curvature | Swell | NeuTextSpec

Classes

Neu
A Neumorphic, or new skeuomorphic, helper class with a variety of static and instance methods for the simple generation of shaded decorations conforming to the neumorphic design concept.
NeuContainer
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.
NeuTextSpec
Construct a new NeuTextSpec as a container object for baseStyle from which to copy TextStyle as well as Rect and TextDirection fields for painting a gradient atop the text instead of just a solid color in the context of Neu.textStyle (or more specifically as a field of a new Neu object for the deployment of the Neu.buildTextStyle instance method).
NeuToggle
Create a new NeuToggle, a StatefulWidget that builds a Neu.toggle wrapped in a self-handling GestureDetector.

Enums

Curvature
A description of the appearance of "curvature" of Neu gradients based on the ordering of returned shaded colors.
Degree
{ STANDARD, SUPER } | normal, extreme | | smooth, contrasted |
Swell
A representation of a surface's boss or how it "swells".

Extensions

CurvatureUtils on Curvature
Properties to extend the utility of enum Curvature.
SwellUtils on Swell
Properties to extend the utility of enum Swell.