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-onlyinherited
alignBottomLeft VxBox
read-onlyinherited
alignBottomRight VxBox
read-onlyinherited
alignCenter VxBox
read-onlyinherited
alignCenterLeft VxBox
read-onlyinherited
alignCenterRight VxBox
read-onlyinherited
alignTopCenter VxBox
read-onlyinherited
alignTopLeft VxBox
read-onlyinherited
alignTopRight VxBox
read-onlyinherited
amber50 VxBox
Amber
read-onlyinherited
amber100 VxBox
read-onlyinherited
amber200 VxBox
read-onlyinherited
amber300 VxBox
read-onlyinherited
amber400 VxBox
read-onlyinherited
amber500 VxBox
read-onlyinherited
amber600 VxBox
read-onlyinherited
amber700 VxBox
read-onlyinherited
amber800 VxBox
read-onlyinherited
amber900 VxBox
read-onlyinherited
black VxBox
read-onlyinherited
blue50 VxBox
Blue
read-onlyinherited
blue100 VxBox
read-onlyinherited
blue200 VxBox
read-onlyinherited
blue300 VxBox
read-onlyinherited
blue400 VxBox
read-onlyinherited
blue500 VxBox
read-onlyinherited
blue600 VxBox
read-onlyinherited
blue700 VxBox
read-onlyinherited
blue800 VxBox
read-onlyinherited
blue900 VxBox
read-onlyinherited
child Widget?
final
cyan50 VxBox
Cyan
read-onlyinherited
cyan100 VxBox
read-onlyinherited
cyan200 VxBox
read-onlyinherited
cyan300 VxBox
read-onlyinherited
cyan400 VxBox
read-onlyinherited
cyan500 VxBox
read-onlyinherited
cyan600 VxBox
read-onlyinherited
cyan700 VxBox
read-onlyinherited
cyan800 VxBox
read-onlyinherited
cyan900 VxBox
read-onlyinherited
emerald50 VxBox
Emerald
read-onlyinherited
emerald100 VxBox
read-onlyinherited
emerald200 VxBox
read-onlyinherited
emerald300 VxBox
read-onlyinherited
emerald400 VxBox
read-onlyinherited
emerald500 VxBox
read-onlyinherited
emerald600 VxBox
read-onlyinherited
emerald700 VxBox
read-onlyinherited
emerald800 VxBox
read-onlyinherited
emerald900 VxBox
read-onlyinherited
fuchsia50 VxBox
Fuchsia
read-onlyinherited
fuchsia100 VxBox
read-onlyinherited
fuchsia200 VxBox
read-onlyinherited
fuchsia300 VxBox
read-onlyinherited
fuchsia400 VxBox
read-onlyinherited
fuchsia500 VxBox
read-onlyinherited
fuchsia600 VxBox
read-onlyinherited
fuchsia700 VxBox
read-onlyinherited
fuchsia800 VxBox
read-onlyinherited
fuchsia900 VxBox
read-onlyinherited
gray50 VxBox
Gray
read-onlyinherited
gray100 VxBox
read-onlyinherited
gray200 VxBox
read-onlyinherited
gray300 VxBox
read-onlyinherited
gray400 VxBox
read-onlyinherited
gray500 VxBox
read-onlyinherited
gray600 VxBox
read-onlyinherited
gray700 VxBox
read-onlyinherited
gray800 VxBox
read-onlyinherited
gray900 VxBox
read-onlyinherited
green50 VxBox
Green
read-onlyinherited
green100 VxBox
read-onlyinherited
green200 VxBox
read-onlyinherited
green300 VxBox
read-onlyinherited
green400 VxBox
read-onlyinherited
green500 VxBox
read-onlyinherited
green600 VxBox
read-onlyinherited
green700 VxBox
read-onlyinherited
green800 VxBox
read-onlyinherited
green900 VxBox
read-onlyinherited
hashCode int
The hash code for this object.
read-onlyinherited
indigo50 VxBox
Indigo
read-onlyinherited
indigo100 VxBox
read-onlyinherited
indigo200 VxBox
read-onlyinherited
indigo300 VxBox
read-onlyinherited
indigo400 VxBox
read-onlyinherited
indigo500 VxBox
read-onlyinherited
indigo600 VxBox
read-onlyinherited
indigo700 VxBox
read-onlyinherited
indigo800 VxBox
read-onlyinherited
indigo900 VxBox
read-onlyinherited
lime50 VxBox
Lime
read-onlyinherited
lime100 VxBox
read-onlyinherited
lime200 VxBox
read-onlyinherited
lime300 VxBox
read-onlyinherited
lime400 VxBox
read-onlyinherited
lime500 VxBox
read-onlyinherited
lime600 VxBox
read-onlyinherited
lime700 VxBox
read-onlyinherited
lime800 VxBox
read-onlyinherited
lime900 VxBox
read-onlyinherited
neutral50 VxBox
Neutral
read-onlyinherited
neutral100 VxBox
read-onlyinherited
neutral200 VxBox
read-onlyinherited
neutral300 VxBox
read-onlyinherited
neutral400 VxBox
read-onlyinherited
neutral500 VxBox
read-onlyinherited
neutral600 VxBox
read-onlyinherited
neutral700 VxBox
read-onlyinherited
neutral800 VxBox
read-onlyinherited
neutral900 VxBox
read-onlyinherited
noneShadow VxBox
Shadowing
read-onlyinherited
orange50 VxBox
Orange
read-onlyinherited
orange100 VxBox
read-onlyinherited
orange200 VxBox
read-onlyinherited
orange300 VxBox
read-onlyinherited
orange400 VxBox
read-onlyinherited
orange500 VxBox
read-onlyinherited
orange600 VxBox
read-onlyinherited
orange700 VxBox
read-onlyinherited
orange800 VxBox
read-onlyinherited
orange900 VxBox
read-onlyinherited
outerShadow VxBox
read-onlyinherited
outerShadow2Xl VxBox
read-onlyinherited
outerShadow3Xl VxBox
read-onlyinherited
outerShadowLg VxBox
read-onlyinherited
outerShadowMd VxBox
read-onlyinherited
outerShadowSm VxBox
Shadowing
read-onlyinherited
outerShadowXl VxBox
read-onlyinherited
p0 VxBox
read-onlyinherited
p1 VxBox
read-onlyinherited
p3 VxBox
read-onlyinherited
p4 VxBox
read-onlyinherited
p8 VxBox
read-onlyinherited
p12 VxBox
read-onlyinherited
p16 VxBox
read-onlyinherited
p20 VxBox
read-onlyinherited
p24 VxBox
read-onlyinherited
p32 VxBox
read-onlyinherited
p64 VxBox
read-onlyinherited
pink50 VxBox
Pink
read-onlyinherited
pink100 VxBox
read-onlyinherited
pink200 VxBox
read-onlyinherited
pink300 VxBox
read-onlyinherited
pink400 VxBox
read-onlyinherited
pink500 VxBox
read-onlyinherited
pink600 VxBox
read-onlyinherited
pink700 VxBox
read-onlyinherited
pink800 VxBox
read-onlyinherited
pink900 VxBox
read-onlyinherited
purple50 VxBox
Purple
read-onlyinherited
purple100 VxBox
read-onlyinherited
purple200 VxBox
read-onlyinherited
purple300 VxBox
read-onlyinherited
purple400 VxBox
read-onlyinherited
purple500 VxBox
read-onlyinherited
purple600 VxBox
read-onlyinherited
purple700 VxBox
read-onlyinherited
purple800 VxBox
read-onlyinherited
purple900 VxBox
read-onlyinherited
px0 VxBox
read-onlyinherited
px1 VxBox
read-onlyinherited
px3 VxBox
read-onlyinherited
px4 VxBox
read-onlyinherited
px8 VxBox
read-onlyinherited
px12 VxBox
read-onlyinherited
px16 VxBox
read-onlyinherited
px20 VxBox
read-onlyinherited
px24 VxBox
read-onlyinherited
px32 VxBox
read-onlyinherited
px64 VxBox
read-onlyinherited
py0 VxBox
read-onlyinherited
py1 VxBox
read-onlyinherited
py3 VxBox
read-onlyinherited
py4 VxBox
read-onlyinherited
py8 VxBox
read-onlyinherited
py12 VxBox
read-onlyinherited
py16 VxBox
read-onlyinherited
py20 VxBox
read-onlyinherited
py24 VxBox
read-onlyinherited
py32 VxBox
read-onlyinherited
py64 VxBox
read-onlyinherited
radiusGeometry BorderRadiusGeometry?
@protectedread / writeinherited
red50 VxBox
Red
read-onlyinherited
red100 VxBox
read-onlyinherited
red200 VxBox
read-onlyinherited
red300 VxBox
read-onlyinherited
red400 VxBox
read-onlyinherited
red500 VxBox
read-onlyinherited
red600 VxBox
read-onlyinherited
red700 VxBox
read-onlyinherited
red800 VxBox
read-onlyinherited
red900 VxBox
read-onlyinherited
rose50 VxBox
Rose
read-onlyinherited
rose100 VxBox
read-onlyinherited
rose200 VxBox
read-onlyinherited
rose300 VxBox
read-onlyinherited
rose400 VxBox
read-onlyinherited
rose500 VxBox
read-onlyinherited
rose600 VxBox
read-onlyinherited
rose700 VxBox
read-onlyinherited
rose800 VxBox
read-onlyinherited
rose900 VxBox
read-onlyinherited
rounded VxBox
read-onlyinherited
roundedFull VxBox
Sets the decorated box as circular.
read-only
roundedLg VxBox
read-onlyinherited
roundedNone VxBox
read-onlyinherited
roundedSM VxBox
read-onlyinherited
roundedValue double?
@protectedread / writeinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
shadow VxBox
Shadowing
read-onlyinherited
shadow2xl VxBox
To give twice extra large shadow.
read-onlyinherited
shadow3xl VxBox
To give thrice extra large shadow.
read-onlyinherited
shadow4xl VxBox
To give 4x extra large shadow.
read-onlyinherited
shadow5xl VxBox
To give 5x extra large shadow.
read-onlyinherited
shadowLg VxBox
To give large shadow.
read-onlyinherited
shadowMax VxBox
To give max shadow.
read-onlyinherited
shadowMd VxBox
To give medium shadow.
read-onlyinherited
shadowSm VxBox
To give small shadow.
read-onlyinherited
shadowXl VxBox
To give extra large shadow.
read-onlyinherited
shadowXs VxBox
To give extra small shadow.
read-onlyinherited
sky50 VxBox
Sky
read-onlyinherited
sky100 VxBox
read-onlyinherited
sky200 VxBox
read-onlyinherited
sky300 VxBox
read-onlyinherited
sky400 VxBox
read-onlyinherited
sky500 VxBox
read-onlyinherited
sky600 VxBox
read-onlyinherited
sky700 VxBox
read-onlyinherited
sky800 VxBox
read-onlyinherited
sky900 VxBox
read-onlyinherited
slate50 VxBox
Slate
read-onlyinherited
slate100 VxBox
read-onlyinherited
slate200 VxBox
read-onlyinherited
slate300 VxBox
read-onlyinherited
slate400 VxBox
read-onlyinherited
slate500 VxBox
read-onlyinherited
slate600 VxBox
read-onlyinherited
slate700 VxBox
read-onlyinherited
slate800 VxBox
read-onlyinherited
slate900 VxBox
read-onlyinherited
stone50 VxBox
Stone
read-onlyinherited
stone100 VxBox
read-onlyinherited
stone200 VxBox
read-onlyinherited
stone300 VxBox
read-onlyinherited
stone400 VxBox
read-onlyinherited
stone500 VxBox
read-onlyinherited
stone600 VxBox
read-onlyinherited
stone700 VxBox
read-onlyinherited
stone800 VxBox
read-onlyinherited
stone900 VxBox
read-onlyinherited
teal50 VxBox
teal
read-onlyinherited
teal100 VxBox
read-onlyinherited
teal200 VxBox
read-onlyinherited
teal300 VxBox
read-onlyinherited
teal400 VxBox
read-onlyinherited
teal500 VxBox
read-onlyinherited
teal600 VxBox
read-onlyinherited
teal700 VxBox
read-onlyinherited
teal800 VxBox
read-onlyinherited
teal900 VxBox
read-onlyinherited
transparent VxBox
Transparent
read-onlyinherited
velocityAlignment Alignment?
@protectedread / writeinherited
velocityColor Color?
@protectedread / writeinherited
velocityGradient Gradient?
@protectedread / writeinherited
velocityPadding EdgeInsetsGeometry?
Provides Padding
@protectedread / writeinherited
velocityShadow List<BoxShadow>?
@protectedread / writeinherited
violet50 VxBox
Violet
read-onlyinherited
violet100 VxBox
read-onlyinherited
violet200 VxBox
read-onlyinherited
violet300 VxBox
read-onlyinherited
violet400 VxBox
read-onlyinherited
violet500 VxBox
read-onlyinherited
violet600 VxBox
read-onlyinherited
violet700 VxBox
read-onlyinherited
violet800 VxBox
read-onlyinherited
violet900 VxBox
read-onlyinherited
white VxBox
read-onlyinherited
yellow50 VxBox
Yellow
read-onlyinherited
yellow100 VxBox
read-onlyinherited
yellow200 VxBox
read-onlyinherited
yellow300 VxBox
read-onlyinherited
yellow400 VxBox
read-onlyinherited
yellow500 VxBox
read-onlyinherited
yellow600 VxBox
read-onlyinherited
yellow700 VxBox
read-onlyinherited
yellow800 VxBox
read-onlyinherited
yellow900 VxBox
read-onlyinherited
zinc50 VxBox
Zinc
read-onlyinherited
zinc100 VxBox
read-onlyinherited
zinc200 VxBox
read-onlyinherited
zinc300 VxBox
read-onlyinherited
zinc400 VxBox
read-onlyinherited
zinc500 VxBox
read-onlyinherited
zinc600 VxBox
read-onlyinherited
zinc700 VxBox
read-onlyinherited
zinc800 VxBox
read-onlyinherited
zinc900 VxBox
read-onlyinherited

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.
bottomLeftRounded({double? value}) VxBox
inherited
bottomRightRounded({double? value}) VxBox
inherited
bottomRounded({double? value}) VxBox
inherited
clip(Clip clip) VxBox
Sets the clip behavior of the box.
color(Color color) VxBox
Sets the color property of the box.
customRounded(BorderRadiusGeometry geometry) VxBox
inherited
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.
leftRounded({double? value}) VxBox
inherited
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.
rightRounded({double? value}) VxBox
inherited
setChildForAlignment(VxBox child) → void
@protectedinherited
setChildForShadow(VxBox child) → void
@protectedinherited
setChildToColor(VxBox child) → void
@protectedinherited
setChildToGradient(VxBox child) → void
@protectedinherited
setChildToPad(VxBox child) → void
@protectedinherited
setChildToRound(VxBox child) → void
@protectedinherited
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.
topLeftRounded({double? value}) VxBox
inherited
topRightRounded({double? value}) VxBox
inherited
topRounded({double? value}) VxBox
inherited
toString() String
A string representation of this object.
inherited
transform(Matrix4 val) VxBox
transforming
velocityDecoration(Color _color, VxCurve curveType, double elevation) VxNeumorph
@protectedinherited
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