VContainer class

A chainable container builder for Flutter widgets.

Constructors

VContainer({Widget? child, Alignment? alignment, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, double? width, double? height, BoxDecoration? decoration})
Creates a VContainer with optional parameters.
const

Properties

alignBottomLeft VContainer
Aligns the container to the bottom left.
no setter
alignBottomRight VContainer
Aligns the container to the bottom right.
no setter
alignCenter VContainer
Aligns the container to the center.
no setter
alignment Alignment?
The alignment of the container.
final
alignTopLeft VContainer
Aligns the container to the top left.
no setter
alignTopRight VContainer
Aligns the container to the top right.
no setter
child Widget?
The child widget.
final
decoration BoxDecoration?
The decoration of the container.
final
hashCode int
The hash code for this object.
no setterinherited
margin EdgeInsetsGeometry?
The margin outside the container.
final
padding EdgeInsetsGeometry?
The padding inside the container.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

align(Alignment a) VContainer
Sets the alignment of the container.
bg(Color color) VContainer
Sets the background color.
border({Color color = Colors.black, double width = 1}) VContainer
Adds a border to the container.
childWidget(Widget child) VContainer
Sets the child widget.
circle() VContainer
Makes the container a circle.
height(double h) VContainer
Sets the height of the container.
linearGradientBg({required List<Color> colors, AlignmentGeometry begin = Alignment.centerLeft, AlignmentGeometry end = Alignment.centerRight, List<double>? stops, TileMode tileMode = TileMode.clamp, GradientTransform? transform}) VContainer
Sets a linear gradient background.
m(double v, [double? y]) VContainer
Sets all margins (v) or horizontal (v) and vertical (y) margins.
make() Container
Builds the Flutter Container widget.
mar(EdgeInsetsGeometry p) VContainer
Sets the margin.
mb(double v) VContainer
Sets bottom margin.
ml(double v) VContainer
Sets left margin.
mr(double v) VContainer
Sets right margin.
mt(double v) VContainer
Sets top margin.
mx(double v) VContainer
Sets horizontal margin.
my(double v) VContainer
Sets vertical margin.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
opacity(double value) VContainer
Sets the opacity of the container's child.
p(double v, [double? y]) VContainer
Sets all paddings (v) or horizontal (v) and vertical (y) paddings.
pad(EdgeInsetsGeometry p) VContainer
Sets the padding.
pb(double v) VContainer
Sets bottom padding.
pl(double v) VContainer
Sets left padding.
pr(double v) VContainer
Sets right padding.
pt(double v) VContainer
Sets top padding.
px(double v) VContainer
Sets horizontal padding.
py(double v) VContainer
Sets vertical padding.
radialGradientBg({required List<Color> colors, AlignmentGeometry center = Alignment.center, double radius = 0.5}) VContainer
Sets a radial gradient background.
rounded([double radius = 8]) VContainer
Applies rounded corners with radius.
shadow({Color color = Colors.black26, double blur = 4, Offset offset = const Offset(2, 2), double spread = 0}) VContainer
Adds a box shadow to the container.
size(double w, double h) VContainer
Sets both width and height of the container.
toString() String
A string representation of this object.
inherited
width(double w) VContainer
Sets the width of the container.

Operators

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