Spacing enum

Semantic spacing tiers for the design token system.

Use the extension methods to get scaled SizedBox, EdgeInsets, or raw double values.

Usage

Column(
  children: [
    Text('Title'),
    Spacing.sm.gap,      // scaled vertical SizedBox
    Text('Subtitle'),
    Spacing.md.gap,      // scaled vertical SizedBox
    Text('Body'),
  ],
)

Container(
  padding: Spacing.lg.insets,  // scaled EdgeInsets.all
  margin: Spacing.sm.insetsH,  // scaled EdgeInsets.symmetric(horizontal:)
)
Inheritance
Available extensions

Values

xs → const Spacing
sm → const Spacing
md → const Spacing
lg → const Spacing
xl → const Spacing
xxl → const Spacing

Properties

gap SizedBox

Available on Spacing, provided by the SpacingExtension extension

A vertical SizedBox with scaled height.
no setter
gapAll SizedBox

Available on Spacing, provided by the SpacingExtension extension

A SizedBox with both scaled width and height.
no setter
gapW SizedBox

Available on Spacing, provided by the SpacingExtension extension

A horizontal SizedBox with scaled width.
no setter
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
insets EdgeInsets

Available on Spacing, provided by the SpacingExtension extension

EdgeInsets.all(scaled).
no setter
insetsB EdgeInsets

Available on Spacing, provided by the SpacingExtension extension

EdgeInsets.only(bottom: scaled).
no setter
insetsH EdgeInsets

Available on Spacing, provided by the SpacingExtension extension

EdgeInsets.symmetric(horizontal: scaled).
no setter
insetsL EdgeInsets

Available on Spacing, provided by the SpacingExtension extension

EdgeInsets.only(left: scaled).
no setter
insetsR EdgeInsets

Available on Spacing, provided by the SpacingExtension extension

EdgeInsets.only(right: scaled).
no setter
insetsT EdgeInsets

Available on Spacing, provided by the SpacingExtension extension

EdgeInsets.only(top: scaled).
no setter
insetsV EdgeInsets

Available on Spacing, provided by the SpacingExtension extension

EdgeInsets.symmetric(vertical: scaled).
no setter
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value double

Available on Spacing, provided by the SpacingExtension extension

The scaled value based on the general scale factor.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<Spacing>
A constant List of the values in this enum, in order of their declaration.