NeuContainer constructor

const NeuContainer({
  1. Key? key,
  2. Color color = lightWhite,
  3. int depth = defaultDepth,
  4. EdgeInsetsGeometry insets = EdgeInsets.zero,
  5. Curvature curvature = Curvature.convex,
  6. Swell swell = Swell.emboss,
  7. double spread = defaultSpread,
  8. Alignment lightSource = defaultLightSource,
  9. AlignmentGeometry? alignment,
  10. double? width,
  11. double? height,
  12. EdgeInsetsGeometry? margin,
  13. EdgeInsetsGeometry? padding,
  14. BoxConstraints? constraints,
  15. ShapeBorder shape = defaultShape,
  16. Decoration? foregroundDecoration,
  17. Matrix4? transform,
  18. AlignmentGeometry? transformAlignment,
  19. Duration duration = defaultDuration,
  20. Curve curve = Curves.elasticOut,
  21. VoidCallback? onEnd,
  22. 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.


SEE ALSO:

  • Neu, the base class defining this design system.
  • AnimatedContainer, which this Widget will render and from which many if its parameters are copied.
  • NeuToggle for a widget like this container but that handles its own GestureDetector for the purpose of "toggling" between two Neumorphic states.

Implementation

const NeuContainer({
  Key? key,
  this.color = lightWhite,
  this.depth = defaultDepth,
  this.insets = EdgeInsets.zero,
  this.curvature = Curvature.convex,
  this.swell = Swell.emboss,
  this.spread = defaultSpread,
  this.lightSource = defaultLightSource,

  /// Container
  this.alignment,
  this.width,
  this.height,
  this.margin,
  this.padding,
  this.constraints,
  this.shape = defaultShape,
  this.foregroundDecoration,
  this.transform,
  this.transformAlignment,
  this.duration = defaultDuration,
  this.curve = Curves.elasticOut,
  this.onEnd,
  this.child,
}) : super(key: key);