VxBox class Null safety

A convenience widget that combines common painting, positioning, and sizing widgets.

A container/VxBox first surrounds the child with padding (inflated by any borders present in the decoration) and then applies additional constraints to the padded extent (incorporating the width and height as constraints, if either is non-null). The container is then surrounded by additional empty space described from the margin.

During painting, the container first applies the given transform, then paints the decoration to fill the padded extent, then it paints the child, and finally paints the foregroundDecoration, also filling the padded extent.

Containers with no children try to be as big as possible unless the incoming constraints are unbounded, in which case they try to be as small as possible. Containers with children size themselves to their children. The width, height, and constraints arguments to the constructor override this.

By default, boxes/containers return false for all hit tests. If the color property is specified, the hit testing is handled by ColoredBox, which always returns true. If the decoration or foregroundDecoration properties are specified, hit testing is handled by Decoration.hitTest.

Available Extensions

Constructors

VxBox({Widget? child})

Properties

alignBottomCenter VxBox
read-only, inherited
alignBottomLeft VxBox
read-only, inherited
alignBottomRight VxBox
read-only, inherited
alignCenter VxBox
read-only, inherited
alignCenterLeft VxBox
read-only, inherited
alignCenterRight VxBox
read-only, inherited
alignTopCenter VxBox
read-only, inherited
alignTopLeft VxBox
read-only, inherited
alignTopRight VxBox
read-only, inherited
amber50 VxBox
Amber
read-only, inherited
amber100 VxBox
read-only, inherited
amber200 VxBox
read-only, inherited
amber300 VxBox
read-only, inherited
amber400 VxBox
read-only, inherited
amber500 VxBox
read-only, inherited
amber600 VxBox
read-only, inherited
amber700 VxBox
read-only, inherited
amber800 VxBox
read-only, inherited
amber900 VxBox
read-only, inherited
black VxBox
read-only, inherited
blue50 VxBox
Blue
read-only, inherited
blue100 VxBox
read-only, inherited
blue200 VxBox
read-only, inherited
blue300 VxBox
read-only, inherited
blue400 VxBox
read-only, inherited
blue500 VxBox
read-only, inherited
blue600 VxBox
read-only, inherited
blue700 VxBox
read-only, inherited
blue800 VxBox
read-only, inherited
blue900 VxBox
read-only, inherited
blueGray50 VxBox
Bluegray
read-only, inherited
blueGray100 VxBox
read-only, inherited
blueGray200 VxBox
read-only, inherited
blueGray300 VxBox
read-only, inherited
blueGray400 VxBox
read-only, inherited
blueGray500 VxBox
read-only, inherited
blueGray600 VxBox
read-only, inherited
blueGray700 VxBox
read-only, inherited
blueGray800 VxBox
read-only, inherited
blueGray900 VxBox
read-only, inherited
child Widget?
final
coolGray50 VxBox
Cool Gray
read-only, inherited
coolGray100 VxBox
read-only, inherited
coolGray200 VxBox
read-only, inherited
coolGray300 VxBox
read-only, inherited
coolGray400 VxBox
read-only, inherited
coolGray500 VxBox
read-only, inherited
coolGray600 VxBox
read-only, inherited
coolGray700 VxBox
read-only, inherited
coolGray800 VxBox
read-only, inherited
coolGray900 VxBox
read-only, inherited
cyan50 VxBox
Cyan
read-only, inherited
cyan100 VxBox
read-only, inherited
cyan200 VxBox
read-only, inherited
cyan300 VxBox
read-only, inherited
cyan400 VxBox
read-only, inherited
cyan500 VxBox
read-only, inherited
cyan600 VxBox
read-only, inherited
cyan700 VxBox
read-only, inherited
cyan800 VxBox
read-only, inherited
cyan900 VxBox
read-only, inherited
emerald50 VxBox
Emerald
read-only, inherited
emerald100 VxBox
read-only, inherited
emerald200 VxBox
read-only, inherited
emerald300 VxBox
read-only, inherited
emerald400 VxBox
read-only, inherited
emerald500 VxBox
read-only, inherited
emerald600 VxBox
read-only, inherited
emerald700 VxBox
read-only, inherited
emerald800 VxBox
read-only, inherited
emerald900 VxBox
read-only, inherited
fuchsia50 VxBox
Fuchsia
read-only, inherited
fuchsia100 VxBox
read-only, inherited
fuchsia200 VxBox
read-only, inherited
fuchsia300 VxBox
read-only, inherited
fuchsia400 VxBox
read-only, inherited
fuchsia500 VxBox
read-only, inherited
fuchsia600 VxBox
read-only, inherited
fuchsia700 VxBox
read-only, inherited
fuchsia800 VxBox
read-only, inherited
fuchsia900 VxBox
read-only, inherited
gray50 VxBox
Gray
read-only, inherited
gray100 VxBox
read-only, inherited
gray200 VxBox
read-only, inherited
gray300 VxBox
read-only, inherited
gray400 VxBox
read-only, inherited
gray500 VxBox
read-only, inherited
gray600 VxBox
read-only, inherited
gray700 VxBox
read-only, inherited
gray800 VxBox
read-only, inherited
gray900 VxBox
read-only, inherited
green50 VxBox
Green
read-only, inherited
green100 VxBox
read-only, inherited
green200 VxBox
read-only, inherited
green300 VxBox
read-only, inherited
green400 VxBox
read-only, inherited
green500 VxBox
read-only, inherited
green600 VxBox
read-only, inherited
green700 VxBox
read-only, inherited
green800 VxBox
read-only, inherited
green900 VxBox
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
indigo50 VxBox
Indigo
read-only, inherited
indigo100 VxBox
read-only, inherited
indigo200 VxBox
read-only, inherited
indigo300 VxBox
read-only, inherited
indigo400 VxBox
read-only, inherited
indigo500 VxBox
read-only, inherited
indigo600 VxBox
read-only, inherited
indigo700 VxBox
read-only, inherited
indigo800 VxBox
read-only, inherited
indigo900 VxBox
read-only, inherited
lightBlue50 VxBox
Light blue
read-only, inherited
lightBlue100 VxBox
read-only, inherited
lightBlue200 VxBox
read-only, inherited
lightBlue300 VxBox
read-only, inherited
lightBlue400 VxBox
read-only, inherited
lightBlue500 VxBox
read-only, inherited
lightBlue600 VxBox
read-only, inherited
lightBlue700 VxBox
read-only, inherited
lightBlue800 VxBox
read-only, inherited
lightBlue900 VxBox
read-only, inherited
lime50 VxBox
Lime
read-only, inherited
lime100 VxBox
read-only, inherited
lime200 VxBox
read-only, inherited
lime300 VxBox
read-only, inherited
lime400 VxBox
read-only, inherited
lime500 VxBox
read-only, inherited
lime600 VxBox
read-only, inherited
lime700 VxBox
read-only, inherited
lime800 VxBox
read-only, inherited
lime900 VxBox
read-only, inherited
noneShadow VxBox
Shadowing
read-only, inherited
orange50 VxBox
Orange
read-only, inherited
orange100 VxBox
read-only, inherited
orange200 VxBox
read-only, inherited
orange300 VxBox
read-only, inherited
orange400 VxBox
read-only, inherited
orange500 VxBox
read-only, inherited
orange600 VxBox
read-only, inherited
orange700 VxBox
read-only, inherited
orange800 VxBox
read-only, inherited
orange900 VxBox
read-only, inherited
outerShadow VxBox
read-only, inherited
outerShadow2Xl VxBox
read-only, inherited
outerShadow3Xl VxBox
read-only, inherited
outerShadowLg VxBox
read-only, inherited
outerShadowMd VxBox
read-only, inherited
outerShadowSm VxBox
Shadowing
read-only, inherited
outerShadowXl VxBox
read-only, inherited
p0 VxBox
read-only, inherited
p1 VxBox
read-only, inherited
p3 VxBox
read-only, inherited
p4 VxBox
read-only, inherited
p8 VxBox
read-only, inherited
p12 VxBox
read-only, inherited
p16 VxBox
read-only, inherited
p20 VxBox
read-only, inherited
p24 VxBox
read-only, inherited
p32 VxBox
read-only, inherited
p64 VxBox
read-only, inherited
pink100 VxBox
Pink
read-only, inherited
pink200 VxBox
read-only, inherited
pink300 VxBox
read-only, inherited
pink400 VxBox
read-only, inherited
pink500 VxBox
read-only, inherited
pink600 VxBox
read-only, inherited
pink700 VxBox
read-only, inherited
pink800 VxBox
read-only, inherited
pink900 VxBox
read-only, inherited
purple100 VxBox
Purple
read-only, inherited
purple200 VxBox
read-only, inherited
purple300 VxBox
read-only, inherited
purple400 VxBox
read-only, inherited
purple500 VxBox
read-only, inherited
purple600 VxBox
read-only, inherited
purple700 VxBox
read-only, inherited
purple800 VxBox
read-only, inherited
purple900 VxBox
read-only, inherited
px0 VxBox
read-only, inherited
px1 VxBox
read-only, inherited
px3 VxBox
read-only, inherited
px4 VxBox
read-only, inherited
px8 VxBox
read-only, inherited
px12 VxBox
read-only, inherited
px16 VxBox
read-only, inherited
px20 VxBox
read-only, inherited
px24 VxBox
read-only, inherited
px32 VxBox
read-only, inherited
px64 VxBox
read-only, inherited
py0 VxBox
read-only, inherited
py1 VxBox
read-only, inherited
py3 VxBox
read-only, inherited
py4 VxBox
read-only, inherited
py8 VxBox
read-only, inherited
py12 VxBox
read-only, inherited
py16 VxBox
read-only, inherited
py20 VxBox
read-only, inherited
py24 VxBox
read-only, inherited
py32 VxBox
read-only, inherited
py64 VxBox
read-only, inherited
red50 VxBox
Red
read-only, inherited
red100 VxBox
read-only, inherited
red200 VxBox
read-only, inherited
red300 VxBox
read-only, inherited
red400 VxBox
read-only, inherited
red500 VxBox
read-only, inherited
red600 VxBox
read-only, inherited
red700 VxBox
read-only, inherited
red800 VxBox
read-only, inherited
red900 VxBox
read-only, inherited
rose50 VxBox
Rose
read-only, inherited
rose100 VxBox
read-only, inherited
rose200 VxBox
read-only, inherited
rose300 VxBox
read-only, inherited
rose400 VxBox
read-only, inherited
rose500 VxBox
read-only, inherited
rose600 VxBox
read-only, inherited
rose700 VxBox
read-only, inherited
rose800 VxBox
read-only, inherited
rose900 VxBox
read-only, inherited
rounded VxBox
read-only, inherited
roundedFull VxBox
Sets the decorated box as circular.
read-only
roundedLg VxBox
read-only, inherited
roundedNone VxBox
read-only, inherited
roundedSM VxBox
read-only, inherited
roundedValue double?
@protected, read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
shadow VxBox
Shadowing
read-only, inherited
shadow2xl VxBox
To give twice extra large shadow.
read-only, inherited
shadow3xl VxBox
To give thrice extra large shadow.
read-only, inherited
shadow4xl VxBox
To give 4x extra large shadow.
read-only, inherited
shadow5xl VxBox
To give 5x extra large shadow.
read-only, inherited
shadowLg VxBox
To give large shadow.
read-only, inherited
shadowMax VxBox
To give max shadow.
read-only, inherited
shadowMd VxBox
To give medium shadow.
read-only, inherited
shadowSm VxBox
To give small shadow.
read-only, inherited
shadowXl VxBox
To give extra large shadow.
read-only, inherited
shadowXs VxBox
To give extra small shadow.
read-only, inherited
teal50 VxBox
teal
read-only, inherited
teal100 VxBox
read-only, inherited
teal200 VxBox
read-only, inherited
teal300 VxBox
read-only, inherited
teal400 VxBox
read-only, inherited
teal500 VxBox
read-only, inherited
teal600 VxBox
read-only, inherited
teal700 VxBox
read-only, inherited
teal800 VxBox
read-only, inherited
teal900 VxBox
read-only, inherited
transparent VxBox
Transparent
read-only, inherited
trueGray50 VxBox
True Gray
read-only, inherited
trueGray100 VxBox
read-only, inherited
trueGray200 VxBox
read-only, inherited
trueGray300 VxBox
read-only, inherited
trueGray400 VxBox
read-only, inherited
trueGray500 VxBox
read-only, inherited
trueGray600 VxBox
read-only, inherited
trueGray700 VxBox
read-only, inherited
trueGray800 VxBox
read-only, inherited
trueGray900 VxBox
read-only, inherited
velocityAlignment Alignment?
@protected, read / write, inherited
velocityColor Color?
@protected, read / write, inherited
velocityGradient Gradient?
@protected, read / write, inherited
velocityPadding EdgeInsetsGeometry?
Provides Padding
@protected, read / write, inherited
velocityShadow List<BoxShadow>?
@protected, read / write, inherited
violet50 VxBox
Violet
read-only, inherited
violet100 VxBox
read-only, inherited
violet200 VxBox
read-only, inherited
violet300 VxBox
read-only, inherited
violet400 VxBox
read-only, inherited
violet500 VxBox
read-only, inherited
violet600 VxBox
read-only, inherited
violet700 VxBox
read-only, inherited
violet800 VxBox
read-only, inherited
violet900 VxBox
read-only, inherited
warmGray50 VxBox
Warm Gray
read-only, inherited
warmGray100 VxBox
read-only, inherited
warmGray200 VxBox
read-only, inherited
warmGray300 VxBox
read-only, inherited
warmGray400 VxBox
read-only, inherited
warmGray500 VxBox
read-only, inherited
warmGray600 VxBox
read-only, inherited
warmGray700 VxBox
read-only, inherited
warmGray800 VxBox
read-only, inherited
warmGray900 VxBox
read-only, inherited
white VxBox
read-only, inherited
yellow50 VxBox
Yellow
read-only, inherited
yellow100 VxBox
read-only, inherited
yellow200 VxBox
read-only, inherited
yellow300 VxBox
read-only, inherited
yellow400 VxBox
read-only, inherited
yellow500 VxBox
read-only, inherited
yellow600 VxBox
read-only, inherited
yellow700 VxBox
read-only, inherited
yellow800 VxBox
read-only, inherited
yellow900 VxBox
read-only, inherited

Methods

alignment(Alignment val) VxBox
inherited
bgImage(DecorationImage image) VxBox
Sets the background image to the decorated box.
border({Color color = Colors.black, double width = 1.0, BorderStyle style = BorderStyle.solid}) VxBox
Bordering Sets the border of the Box.
clip(Clip clip) VxBox
Sets the clip behavior of the box.
color(Color color) VxBox
Sets the color property of the box.
gradientFrom({required Color from, List<double>? stops}) VxBox
inherited
gradientFromTo({required Color from, required Color to, List<double>? stops}) VxBox
inherited
gradientTo({required Color to, List<double>? stops}) VxBox
inherited
gradientVia({required Color from, required Color via, required Color to, List<double>? stops}) VxBox
inherited
height(double val) VxBox
Sets the height property of the box.
hexColor(String colorHex) VxBox
Sets the color property of the box using the hex color value.
linearGradient(List<Color> colors, {AlignmentGeometry begin = Alignment.centerLeft, AlignmentGeometry end = Alignment.centerRight, List<double>? stops, TileMode tileMode = TileMode.clamp, GradientTransform? transform}) VxBox
Gradienting Sets the linear gradient to the decorated box.
make({Key? key}) Widget
margin(EdgeInsetsGeometry val) VxBox
Sets the margin property of the box.
neumorphic({Color? color, VxCurve curve = VxCurve.concave, double elevation = 12.0}) VxBox
Use this to convert your box to the neumorphic design. Use it wisely.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
padding(EdgeInsetsGeometry val) VxBox
Sets the padding property of the box.
radialGradient(List<Color> colors, {AlignmentGeometry center = Alignment.center, double radius = 0.5, List<double>? stops, TileMode tileMode = TileMode.clamp, AlignmentGeometry? focal, double focalRadius = 0.0, GradientTransform? transform}) VxBox
Sets the radial gradient to the decorated box.
setChildForAlignment(VxBox child) → void
@protected, inherited
setChildForShadow(VxBox child) → void
@protected, inherited
setChildToColor(VxBox child) → void
@protected, inherited
setChildToGradient(VxBox child) → void
@protected, inherited
setChildToPad(VxBox child) → void
@protected, inherited
setChildToRound(VxBox child) → void
@protected, inherited
shadowOutline({Color? outlineColor}) VxBox
To give shadow with some outline color.
size(double width, double height) VxBox
Sets the size (width & height) property of the box.
sizePCT({required BuildContext context, required double widthPCT, required double heightPCT}) VxBox
Sets the size (width & height in percentage) property of the box.
square(double val) VxBox
Sets the height and width as square of the box.
sweepGradient(List<Color> colors, {AlignmentGeometry center = Alignment.center, double startAngle = 0.0, double endAngle = pi * 2, List<double>? stops, TileMode tileMode = TileMode.clamp, GradientTransform? transform}) VxBox
Sets the sweep gradient to the decorated box.
toString() String
A string representation of this object. [...]
inherited
transform(Matrix4 val) VxBox
transforming [...]
velocityDecoration(Color _color, VxCurve curveType, double elevation) VxNeumorph
@protected, inherited
width(double val) VxBox
Sets the width property of the box.
withConstraints(BoxConstraints constraints) VxBox
Provide a box constraint
withDecoration(BoxDecoration decoration) VxBox
Provide a custom DecoratedBox
withForegroundDecoration(BoxDecoration decoration) VxBox
Provide a custom Foreground DecoratedBox
withGradient(Gradient gradient) VxBox
Sets the defined gradient to the decorated box.
withRounded({double value = 15.0}) VxBox
inherited
withShadow(List<BoxShadow> shadows) VxBox
Provide custom list of box shadows [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited