StacWrap class

A Stac model representing Flutter's Wrap widget.

A widget that displays its children in multiple horizontal or vertical runs.

StacWrap(
  direction: StacAxis.horizontal,
  alignment: StacWrapAlignment.start,
  spacing: 8.0,
  runAlignment: StacWrapAlignment.start,
  runSpacing: 8.0,
  crossAxisAlignment: StacWrapCrossAlignment.start,
  children: [
    StacText(data: 'Child 1'),
    StacText(data: 'Child 2'),
    StacText(data: 'Child 3'),
  ],
)
{
  "type": "wrap",
  "direction": "horizontal",
  "alignment": "start",
  "spacing": 8.0,
  "runAlignment": "start",
  "runSpacing": 8.0,
  "crossAxisAlignment": "start",
  "children": [
    {"type": "text", "data": "Child 1"},
    {"type": "text", "data": "Child 2"},
    {"type": "text", "data": "Child 3"}
  ]
}
Inheritance
Annotations
  • @JsonSerializable.new()

Constructors

StacWrap({StacAxis? direction, StacWrapAlignment? alignment, double? spacing, StacWrapAlignment? runAlignment, double? runSpacing, StacWrapCrossAlignment? crossAxisAlignment, StacTextDirection? textDirection, StacVerticalDirection? verticalDirection, StacClip? clipBehavior, List<StacWidget>? children})
Creates a StacWrap with the given properties.
const
StacWrap.fromJson(Map<String, dynamic> json)
Creates a StacWrap from JSON.
factory

Properties

alignment → StacWrapAlignment?
How the children within a run should be placed in the main axis. Defaults to StacWrapAlignment.start.
final
children → List<StacWidget>?
The widgets below this widget in the tree.
final
clipBehavior → StacClip?
How to clip the content. Defaults to StacClip.hardEdge in the Flutter widget.
final
crossAxisAlignment → StacWrapCrossAlignment?
How the children within a run should be aligned relative to each other in the cross axis. Defaults to StacWrapCrossAlignment.start.
final
direction → StacAxis?
The direction to lay out the children. Defaults to StacAxis.horizontal.
final
hashCode → int
The hash code for this object.
no setterinherited
jsonData → Map<String, dynamic>?
Raw JSON data for this widget
finalinherited
runAlignment → StacWrapAlignment?
How the runs themselves should be placed in the cross axis. Defaults to StacWrapAlignment.start.
final
runSpacing → double?
The amount of space to insert between adjacent runs. Defaults to 0.0.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spacing → double?
The amount of space to insert between adjacent children in a run. Defaults to 0.0.
final
textDirection → StacTextDirection?
Determines the order to lay children out horizontally and how to interpret start and end values. If null, the ambient Directionality is used (which typically provides a TextDirection).
final
type → String
Widget type identifier.
no setteroverride
verticalDirection → StacVerticalDirection?
Determines the order to lay children out vertically and how to interpret start and end values. Defaults to StacVerticalDirection.down.
final

Methods

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

Operators

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