Column class

A layout widget that arranges its children vertically, similar to Flutter's Column widget.

The Column is part of the Flint UI framework and is designed to render flexible vertical layouts for HTML emails, web views, or text-based rendering.

It supports visual spacing (gap), layout padding and margin, background styling, border customization, and child alignment.

Example usage:

Column(
  padding: EdgeInsets.all(12),
  backgroundColor: '#f5f5f5',
  alignment: Alignment.center,
  children: [
    FlintText('Welcome to Flint!'),
    FlintButton(label: 'Get Started'),
  ],
)
Inheritance

Constructors

Column({required List<FlintWidget> children, double gap = 5.0, EdgeInsets? padding, EdgeInsets? margin, String? backgroundColor, BoxBorder? border, BorderRadius? borderRadius, Alignment alignment = Alignment.left, bool reverse = false, String? xData, String? xInit, String? xShow, Map<String, String>? xBind, Map<String, String>? xOn, String? xText, String? xHtml, String? xModel, String? xModelable, String? xFor, String? xTransition, String? xEffect, bool? xIgnore, String? xRef, bool? xCloak, String? xTeleport, bool? xIf, String? xId})
Creates a new Column widget.

Properties

alignment Alignment
The horizontal alignment of the children within the column.
final
backgroundColor String?
The background color of the column, represented as a CSS color string.
final
border BoxBorder?
The border of the column container.
final
borderRadius BorderRadius?
The border radius (corner roundness) of the column container.
final
children List<FlintWidget>
The widgets arranged vertically inside this column.
final
directives Map<String, String>
no setterinherited
gap double
The vertical space (in pixels) between child widgets.
final
hashCode int
The hash code for this object.
no setterinherited
id String
finalinherited
margin EdgeInsets?
The external margin of the column container.
final
padding EdgeInsets?
The internal padding of the column container.
final
reverse bool
Whether to render the children in reverse order.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
script FlintScript?
finalinherited
xBind Map<String, String>
finalinherited
xCloak bool?
finalinherited
xData String?
finalinherited
xEffect String?
finalinherited
xFor String?
finalinherited
xHtml String?
finalinherited
xId String?
finalinherited
xIf bool?
finalinherited
xIgnore bool?
finalinherited
xInit String?
finalinherited
xModel String?
finalinherited
xModelable String?
finalinherited
xOn Map<String, String>
finalinherited
xRef String?
finalinherited
xShow String?
finalinherited
xTeleport String?
finalinherited
xText String?
finalinherited
xTransition String?
finalinherited

Methods

buildTemplate() FlintWidget
Returns this column widget as the final build result.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renderAttributes({String? style}) String
---------------- Helper ---------------- Converts ID + directives + optional style to HTML attributes
inherited
renderScriptAttributes() String
Render attached script to HTML attributes
inherited
toHtml() String
Renders the column and its children as an HTML <div> element.
override
toJson() Map<String, dynamic>
Serializes this widget to a JSON representation.
override
toString() String
A string representation of this object.
inherited
toText() String
Renders the column and its children as plain text.
override

Operators

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