WxBox class

Const widget that provides a box-like layout with customizable elevation

Inheritance

Constructors

WxBox({Key? key, double? width, double? height, BoxConstraints? constraints, AlignmentGeometry? alignment, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, DecorationImage? image, List<BoxShadow>? shadows, Gradient? gradient, Color? color, ShapeBorder? border, Color? borderColor, double? borderWidth, BorderStyle? borderStyle, double? borderOffset, BorderSide? borderSide, BorderRadius? borderRadius, Clip? clipBehavior, Color? elevationColor, double? elevation, Widget? child})
Create a box widget
const
WxBox.circle({Key? key, double? radius, BoxConstraints? constraints, AlignmentGeometry? alignment, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, DecorationImage? image, List<BoxShadow>? shadows, Gradient? gradient, Color? color, Color? borderColor, double? borderWidth, BorderStyle? borderStyle, double? borderOffset, BorderSide? borderSide, BorderRadius? borderRadius, Clip? clipBehavior, Color? elevationColor, double? elevation, Widget? child})
Create a box widget with circle shape
const
WxBox.rectangle({Key? key, double? width, double? height, BoxConstraints? constraints, AlignmentGeometry? alignment, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, DecorationImage? image, List<BoxShadow>? shadows, Gradient? gradient, Color? color, Color? borderColor, double? borderWidth, BorderStyle? borderStyle, double? borderOffset, BorderSide? borderSide, BorderRadius? borderRadius, Clip? clipBehavior, Color? elevationColor, double? elevation, Widget? child})
Create a box widget with rectangle shape
const
WxBox.square({Key? key, double? size, BoxConstraints? constraints, AlignmentGeometry? alignment, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, DecorationImage? image, List<BoxShadow>? shadows, Gradient? gradient, Color? color, Color? borderColor, double? borderWidth, BorderStyle? borderStyle, double? borderOffset, BorderSide? borderSide, BorderRadius? borderRadius, Clip? clipBehavior, Color? elevationColor, double? elevation, Widget? child})
Create a box widget with square size
const
WxBox.stadium({Key? key, double? width, double? height, BoxConstraints? constraints, AlignmentGeometry? alignment, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, DecorationImage? image, List<BoxShadow>? shadows, Gradient? gradient, Color? color, Color? borderColor, double? borderWidth, BorderStyle? borderStyle, double? borderOffset, BorderSide? borderSide, BorderRadius? borderRadius, Color? elevationColor, Clip? clipBehavior, double? elevation, Widget? child})
Create a box widget with stadium shape
const

Properties

alignment AlignmentGeometry?
Align the child within the container.
final
border ShapeBorder?
A border to draw above the background color
final
borderColor Color?
The color of this side of the border.
final
borderOffset double?
The relative position of the stroke on a BorderSide in an OutlinedBorder or Border.
final
borderRadius BorderRadius?
The border radius of the rounded corners.
final
borderSide BorderSide?
The border outline's color and weight.
final
borderStyle BorderStyle?
The style of this side of the border.
final
borderWidth double?
The width of this side of the border, in logical pixels.
final
child Widget?
The widget below this widget in the tree.
final
clipBehavior Clip?
Controls how to clip. Defaults to Clip.antiAlias.
final
color Color?
The color to paint behind the child.
final
constraints BoxConstraints?
Additional constraints to apply to the child.
final
effectiveClipBehavior Clip
Clip Behavior from property with default value Clip.none
no setter
elevation double?
The z-coordinate relative to the parent at which to place this physical object. The value is non-negative.
final
elevationColor Color?
When elevation is non zero the color to use for the shadow color.
final
gradient Gradient?
A gradient to use when filling the shape.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
If non-null, requires the child to have exactly this height.
final
image DecorationImage?
An image to paint inside the shape (clipped to its outline).
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
Outer space around the widget.
final
padding EdgeInsetsGeometry?
The amount of space by which to inset the child.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadows List<BoxShadow>?
A list of shadows cast by the border.
final
width double?
If non-null, requires the child to have exactly this width.
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