StacRow class

A Stac widget that displays its children in a horizontal array.

This widget corresponds to Flutter's Row widget and arranges its children horizontally. The main axis runs horizontally and the cross axis runs vertically.

{@tool snippet} Dart Example:

const StacRow(
  mainAxisAlignment: StacMainAxisAlignment.spaceBetween,
  children: [
    StacText(data: 'Left'),
    StacText(data: 'Right'),
  ],
)

{@end-tool}

{@tool snippet} JSON Example:

{
  "type": "row",
  "mainAxisAlignment": "spaceBetween",
  "children": [
    {"type": "text", "data": "Left"},
    {"type": "text", "data": "Right"}
  ]
}

{@end-tool}

Inheritance
Annotations
  • @JsonSerializable()

Constructors

StacRow.new({StacMainAxisAlignment? mainAxisAlignment, StacMainAxisSize? mainAxisSize, StacCrossAxisAlignment? crossAxisAlignment, StacTextDirection? textDirection, StacVerticalDirection? verticalDirection, StacTextBaseline? textBaseline, double? spacing, List<StacWidget>? children})
Creates a row widget with optional alignment and children.
const
StacRow.fromJson(Map<String, dynamic> json)
Creates a StacRow from a JSON map.
factory

Properties

children List<StacWidget>?
The widgets to display in this row.
final
crossAxisAlignment StacCrossAxisAlignment?
How the children should be placed along the cross axis (vertical).
final
hashCode int
The hash code for this object.
no setterinherited
jsonData Map<String, dynamic>?
Raw JSON data for this widget
finalinherited
mainAxisAlignment StacMainAxisAlignment?
How the children should be placed along the main axis (horizontal).
final
mainAxisSize StacMainAxisSize?
How much space should be occupied in the main axis.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spacing double?
The amount of space between each child.
final
textBaseline StacTextBaseline?
The baseline to use when aligning text.
final
textDirection StacTextDirection?
The text direction to use for resolving alignment.
final
type String
The type of the widget
no setteroverride
verticalDirection StacVerticalDirection?
The order to lay children out vertically.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this widget to a JSON map
override
toString() String
A string representation of this object.
inherited

Operators

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