StacColumn class

A Stac model representing Flutter's Column widget.

Lays out its children in a vertical array. You can control how the children are laid out along the main axis and the cross axis via mainAxisAlignment, mainAxisSize, and crossAxisAlignment.

{@tool snippet} Dart Example:

StacColumn(
  spacing: 8,
  mainAxisAlignment: StacMainAxisAlignment.center,
  children: const [
    StacText(data: 'One'),
    StacText(data: 'Two'),
  ],
)

{@end-tool}

{@tool snippet} JSON Example:

{
  "type": "column",
  "spacing": 8,
  "mainAxisAlignment": "center",
  "children": [
    {"type": "text", "data": "One"},
    {"type": "text", "data": "Two"}
  ]
}

{@end-tool}

Inheritance
Annotations
  • @JsonSerializable.new()

Constructors

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

Properties

children → List<StacWidget>?
The list of widgets arranged vertically.
final
crossAxisAlignment → StacCrossAxisAlignment?
How the children should be placed along the horizontal (cross) axis.
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 vertical (main) axis.
final
mainAxisSize → StacMainAxisSize?
How much space should be occupied in the vertical direction.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spacing → double?
The space to insert between adjacent children.
final
textBaseline → StacTextBaseline?
The baseline to use for 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 vertical direction in which children are ordered.
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