Row class
A layout widget that arranges its children horizontally in a flexible row.
The Row widget is inspired by Flutter’s Row, but it generates
HTML table-based layouts optimized for consistent email and web rendering.
It automatically divides space equally among children (unless custom columnWidths are provided), supports padding, margin, gaps, borders, and background colors.
Example:
Row(
gap: 12,
backgroundColor: "#f9f9f9",
padding: EdgeInsets.all(16),
children: [
FlintText("Name"),
FlintText("Email"),
FlintText("Phone"),
],
);
- Inheritance
-
- Object
- FlintWidget
- Row
Constructors
-
Row({required List<
FlintWidget> children, List<int> columnWidths = const [], double gap = 16.0, EdgeInsets? padding, EdgeInsets? margin, String? backgroundColor, BoxBorder? border, BorderRadius? borderRadius, String alignment = 'center', 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 Row widget for horizontal layout.
Properties
- alignment → String
-
The vertical alignment of the content inside each cell.
final
- backgroundColor → String?
-
The background color of the row container.
final
- border → BoxBorder?
-
Optional border around the row container.
final
- borderRadius → BorderRadius?
-
Optional border radius applied to the container.
final
-
children
→ List<
FlintWidget> -
The list of widgets to display horizontally.
final
-
columnWidths
→ List<
int> -
Specifies the width (in percentage) of each column.
final
-
directives
→ Map<
String, String> -
no setterinherited
- gap → double
-
The space (in pixels) between each column.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
finalinherited
- margin → EdgeInsets?
-
The external margin around the entire row container.
final
- padding → EdgeInsets?
-
The internal padding around the entire row container.
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 the same instance since Row is not composed dynamically.
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 -
Converts this row and its children into HTML.
override
-
toJson(
) → Map< String, dynamic> -
Converts the row and its layout properties to a JSON map.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
toText(
) → String -
Converts the row to a plain text representation.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited